Skip to content

Commit ec3b93a

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "Misc fixes and minor updates all over the place: - an SGI/UV fix - a defconfig update - a build warning fix - move the boot_params file to the arch location in debugfs - a pkeys fix - selftests fix - boot message fixes - sparse fixes - a resume warning fix - ioapic hotplug fixes - reboot quirks ... plus various minor cleanups" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build/x86_64_defconfig: Enable CONFIG_R8169 x86/reboot/quirks: Add ASUS EeeBook X205TA/W reboot quirk x86/hpet: Prevent might sleep splat on resume x86/boot: Correct setup_header.start_sys name x86/purgatory: Fix sparse warning, symbol not declared x86/purgatory: Make functions and variables static x86/events: Remove last remnants of old filenames x86/pkeys: Check against max pkey to avoid overflows x86/ioapic: Split IOAPIC hot-removal into two steps x86/PCI: Implement pcibios_release_device to release IRQ from IOAPIC x86/intel_rdt: Remove duplicate inclusion of linux/cpu.h x86/vmware: Remove duplicate inclusion of asm/timer.h x86/hyperv: Hide unused label x86/reboot/quirks: Add ASUS EeeBook X205TA reboot quirk x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register x86/selftests: Add clobbers for int80 on x86_64 x86/apic: Simplify enable_IR_x2apic(), remove try_to_enable_IR() x86/apic: Fix a warning message in logical CPU IDs allocation x86/kdebugfs: Move boot params hierarchy under (debugfs)/x86/
2 parents 8a91723 + f285330 commit ec3b93a

File tree

27 files changed

+106
-57
lines changed

27 files changed

+106
-57
lines changed

arch/x86/configs/x86_64_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ CONFIG_E1000E=y
176176
CONFIG_SKY2=y
177177
CONFIG_FORCEDETH=y
178178
CONFIG_8139TOO=y
179+
CONFIG_R8169=y
179180
CONFIG_FDDI=y
180181
CONFIG_INPUT_POLLDEV=y
181182
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set

arch/x86/events/amd/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, int idx,
604604
return &amd_f15_PMC20;
605605
}
606606
case AMD_EVENT_NB:
607-
/* moved to perf_event_amd_uncore.c */
607+
/* moved to uncore.c */
608608
return &emptyconstraint;
609609
default:
610610
return &emptyconstraint;

arch/x86/events/intel/cstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* perf_event_intel_cstate.c: support cstate residency counters
2+
* Support cstate residency counters
33
*
44
* Copyright (C) 2015, Intel Corp.
55
* Author: Kan Liang ([email protected])

arch/x86/events/intel/rapl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* perf_event_intel_rapl.c: support Intel RAPL energy consumption counters
2+
* Support Intel RAPL energy consumption counters
33
* Copyright (C) 2013 Google, Inc., Stephane Eranian
44
*
55
* Intel RAPL interface is specified in the IA-32 Manual Vol3b

arch/x86/events/intel/uncore.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ extern struct list_head pci2phy_map_head;
360360
extern struct pci_extra_dev *uncore_extra_pci_dev;
361361
extern struct event_constraint uncore_constraint_empty;
362362

363-
/* perf_event_intel_uncore_snb.c */
363+
/* uncore_snb.c */
364364
int snb_uncore_pci_init(void);
365365
int ivb_uncore_pci_init(void);
366366
int hsw_uncore_pci_init(void);
@@ -371,7 +371,7 @@ void nhm_uncore_cpu_init(void);
371371
void skl_uncore_cpu_init(void);
372372
int snb_pci2phy_map_init(int devid);
373373

374-
/* perf_event_intel_uncore_snbep.c */
374+
/* uncore_snbep.c */
375375
int snbep_uncore_pci_init(void);
376376
void snbep_uncore_cpu_init(void);
377377
int ivbep_uncore_pci_init(void);
@@ -385,5 +385,5 @@ void knl_uncore_cpu_init(void);
385385
int skx_uncore_pci_init(void);
386386
void skx_uncore_cpu_init(void);
387387

388-
/* perf_event_intel_uncore_nhmex.c */
388+
/* uncore_nhmex.c */
389389
void nhmex_uncore_cpu_init(void);

arch/x86/hyperv/hv_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ void hyperv_init(void)
158158
clocksource_register_hz(&hyperv_cs_tsc, NSEC_PER_SEC/100);
159159
return;
160160
}
161+
register_msr_cs:
161162
#endif
162163
/*
163164
* For 32 bit guests just use the MSR based mechanism for reading
164165
* the partition counter.
165166
*/
166167

167-
register_msr_cs:
168168
hyperv_cs = &hyperv_cs_msr;
169169
if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE)
170170
clocksource_register_hz(&hyperv_cs_msr, NSEC_PER_SEC/100);

arch/x86/include/asm/pkeys.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
4646
static inline
4747
bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
4848
{
49+
/*
50+
* "Allocated" pkeys are those that have been returned
51+
* from pkey_alloc(). pkey 0 is special, and never
52+
* returned from pkey_alloc().
53+
*/
54+
if (pkey <= 0)
55+
return false;
56+
if (pkey >= arch_max_pkey())
57+
return false;
4958
return mm_pkey_allocation_map(mm) & (1U << pkey);
5059
}
5160

@@ -82,12 +91,6 @@ int mm_pkey_alloc(struct mm_struct *mm)
8291
static inline
8392
int mm_pkey_free(struct mm_struct *mm, int pkey)
8493
{
85-
/*
86-
* pkey 0 is special, always allocated and can never
87-
* be freed.
88-
*/
89-
if (!pkey)
90-
return -EINVAL;
9194
if (!mm_pkey_is_allocated(mm, pkey))
9295
return -EINVAL;
9396

arch/x86/include/uapi/asm/bootparam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct setup_header {
5858
__u32 header;
5959
__u16 version;
6060
__u32 realmode_swtch;
61-
__u16 start_sys;
61+
__u16 start_sys_seg;
6262
__u16 kernel_version;
6363
__u8 type_of_loader;
6464
__u8 loadflags;

arch/x86/kernel/apic/apic.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,24 +1610,15 @@ static inline void try_to_enable_x2apic(int remap_mode) { }
16101610
static inline void __x2apic_enable(void) { }
16111611
#endif /* !CONFIG_X86_X2APIC */
16121612

1613-
static int __init try_to_enable_IR(void)
1614-
{
1615-
#ifdef CONFIG_X86_IO_APIC
1616-
if (!x2apic_enabled() && skip_ioapic_setup) {
1617-
pr_info("Not enabling interrupt remapping due to skipped IO-APIC setup\n");
1618-
return -1;
1619-
}
1620-
#endif
1621-
return irq_remapping_enable();
1622-
}
1623-
16241613
void __init enable_IR_x2apic(void)
16251614
{
16261615
unsigned long flags;
16271616
int ret, ir_stat;
16281617

1629-
if (skip_ioapic_setup)
1618+
if (skip_ioapic_setup) {
1619+
pr_info("Not enabling interrupt remapping due to skipped IO-APIC setup\n");
16301620
return;
1621+
}
16311622

16321623
ir_stat = irq_remapping_prepare();
16331624
if (ir_stat < 0 && !x2apic_supported())
@@ -1645,7 +1636,7 @@ void __init enable_IR_x2apic(void)
16451636

16461637
/* If irq_remapping_prepare() succeeded, try to enable it */
16471638
if (ir_stat >= 0)
1648-
ir_stat = try_to_enable_IR();
1639+
ir_stat = irq_remapping_enable();
16491640
/* ir_stat contains the remap mode or an error code */
16501641
try_to_enable_x2apic(ir_stat);
16511642

@@ -2062,10 +2053,10 @@ static int allocate_logical_cpuid(int apicid)
20622053

20632054
/* Allocate a new cpuid. */
20642055
if (nr_logical_cpuids >= nr_cpu_ids) {
2065-
WARN_ONCE(1, "Only %d processors supported."
2056+
WARN_ONCE(1, "APIC: NR_CPUS/possible_cpus limit of %i reached. "
20662057
"Processor %d/0x%x and the rest are ignored.\n",
2067-
nr_cpu_ids - 1, nr_logical_cpuids, apicid);
2068-
return -1;
2058+
nr_cpu_ids, nr_logical_cpuids, apicid);
2059+
return -EINVAL;
20692060
}
20702061

20712062
cpuid_to_apicid[nr_logical_cpuids] = apicid;

arch/x86/kernel/cpu/intel_rdt_rdtgroup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <linux/sched/signal.h>
2929
#include <linux/sched/task.h>
3030
#include <linux/slab.h>
31-
#include <linux/cpu.h>
3231
#include <linux/task_work.h>
3332

3433
#include <uapi/linux/magic.h>

0 commit comments

Comments
 (0)