Skip to contentSkip to conversation

x86 fixes

GIT PULL Ingo Molnar 1 participant 1 message Aug 3, 2012 x86

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

HEAD: eaf4ce6c5fed6b4c55f7efcd5fc3477435cab5e9 x86-64, kcmp: The kcmp system call can be common

Various fixes.

Thanks,

Ingo

------------------>
Alan Cox (1):
x86, nops: Missing break resulting in incorrect selection on Intel

H. Peter Anvin (1):
x86-64, kcmp: The kcmp system call can be common

Jean Delvare (1):
x86: CONFIG_CC_STACKPROTECTOR=y is no longer experimental

Julia Lawall (1):
arch/x86/kernel/kdebugfs.c: Ensure a consistent return value in error case

Tomoki Sekiyama (1):
x86/ioapic: Fix NULL pointer dereference on CPU hotplug after disabling irqs

Tony Luck (2):
x86/mce: Move MCACOD defines from mce-severity.c to <asm/mce.h> x86/mce: Add quirk for instruction recovery on Sandy Bridge processors

 arch/x86/Kconfig                          |    2 +-
 arch/x86/include/asm/mce.h                |    8 ++++++
 arch/x86/kernel/alternative.c             |    2 +-
 arch/x86/kernel/apic/io_apic.c            |    4 +--
 arch/x86/kernel/cpu/mcheck/mce-severity.c |    7 -----
 arch/x86/kernel/cpu/mcheck/mce.c          |   43 +++++++++++++++++++++++++++--
 arch/x86/kernel/irq.c                     |    1 +
 arch/x86/kernel/kdebugfs.c                |    6 ++--
 arch/x86/syscalls/syscall_64.tbl          |    2 +-
 9 files changed, 58 insertions(+), 17 deletions(-)
arch/x86/Kconfig +1 -1
index c70684f..b03fe17 100644
@@ -1525,7 +1525,7 @@ config SECCOMP
 	  If unsure, say Y. Only embedded should say N here.
 
 config CC_STACKPROTECTOR
-	bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
+	bool "Enable -fstack-protector buffer overflow detection"
 	---help---
 	  This option turns on the -fstack-protector GCC feature. This
 	  feature puts, at the beginning of functions, a canary value on
arch/x86/include/asm/mce.h +8 -0
index 441520e..a3ac52b 100644
@@ -33,6 +33,14 @@
 #define MCI_STATUS_PCC   (1ULL<<57)  /* processor context corrupt */
 #define MCI_STATUS_S	 (1ULL<<56)  /* Signaled machine check */
 #define MCI_STATUS_AR	 (1ULL<<55)  /* Action required */
+#define MCACOD		  0xffff     /* MCA Error Code */
+
+/* Architecturally defined codes from SDM Vol. 3B Chapter 15 */
+#define MCACOD_SCRUB	0x00C0	/* 0xC0-0xCF Memory Scrubbing */
+#define MCACOD_SCRUBMSK	0xfff0
+#define MCACOD_L3WB	0x017A	/* L3 Explicit Writeback */
+#define MCACOD_DATA	0x0134	/* Data Load */
+#define MCACOD_INSTR	0x0150	/* Instruction Fetch */
 
 /* MCi_MISC register defines */
 #define MCI_MISC_ADDR_LSB(m)	((m) & 0x3f)
arch/x86/kernel/alternative.c +1 -1
index 931280f..afb7ff7 100644
@@ -224,7 +224,7 @@ void __init arch_init_ideal_nops(void)
 			ideal_nops = intel_nops;
 #endif
 		}
-
+		break;
 	default:
 #ifdef CONFIG_X86_64
 		ideal_nops = k8_nops;
arch/x86/kernel/apic/io_apic.c +2 -2
index 406eee7..a6c64aa 100644
@@ -1204,7 +1204,7 @@ static void __clear_irq_vector(int irq, struct irq_cfg *cfg)
 	BUG_ON(!cfg->vector);
 
 	vector = cfg->vector;
-	for_each_cpu(cpu, cfg->domain)
+	for_each_cpu_and(cpu, cfg->domain, cpu_online_mask)
 		per_cpu(vector_irq, cpu)[vector] = -1;
 
 	cfg->vector = 0;
@@ -1212,7 +1212,7 @@ static void __clear_irq_vector(int irq, struct irq_cfg *cfg)
 
 	if (likely(!cfg->move_in_progress))
 		return;
-	for_each_cpu(cpu, cfg->old_domain) {
+	for_each_cpu_and(cpu, cfg->old_domain, cpu_online_mask) {
 		for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS;
 								vector++) {
 			if (per_cpu(vector_irq, cpu)[vector] != irq)
arch/x86/kernel/cpu/mcheck/mce-severity.c +0 -7
index 413c2ce..1301762 100644
@@ -55,13 +55,6 @@ static struct severity {
 #define MCI_UC_S (MCI_STATUS_UC|MCI_STATUS_S)
 #define MCI_UC_SAR (MCI_STATUS_UC|MCI_STATUS_S|MCI_STATUS_AR)
 #define	MCI_ADDR (MCI_STATUS_ADDRV|MCI_STATUS_MISCV)
-#define MCACOD 0xffff
-/* Architecturally defined codes from SDM Vol. 3B Chapter 15 */
-#define MCACOD_SCRUB	0x00C0	/* 0xC0-0xCF Memory Scrubbing */
-#define MCACOD_SCRUBMSK	0xfff0
-#define MCACOD_L3WB	0x017A	/* L3 Explicit Writeback */
-#define MCACOD_DATA	0x0134	/* Data Load */
-#define MCACOD_INSTR	0x0150	/* Instruction Fetch */
 
 	MCESEV(
 		NO, "Invalid",
arch/x86/kernel/cpu/mcheck/mce.c +40 -3

79 lines not on this page · raw message

arch/x86/kernel/irq.c +1 -0
index 1f5f1d5..7ad683d 100644
@@ -328,6 +328,7 @@ void fixup_irqs(void)
 				chip->irq_retrigger(data);
 			raw_spin_unlock(&desc->lock);
 		}
+		__this_cpu_write(vector_irq[vector], -1);
 	}
 }
 #endif
arch/x86/kernel/kdebugfs.c +4 -2
index 1d5d31e..dc1404b 100644
@@ -107,7 +107,7 @@ static int __init create_setup_data_nodes(struct dentry *parent)
 {
 	struct setup_data_node *node;
 	struct setup_data *data;
-	int error = -ENOMEM;
+	int error;
 	struct dentry *d;
 	struct page *pg;
 	u64 pa_data;
@@ -121,8 +121,10 @@ static int __init create_setup_data_nodes(struct dentry *parent)
 
 	while (pa_data) {
 		node = kmalloc(sizeof(*node), GFP_KERNEL);
-		if (!node)
+		if (!node) {
+			error = -ENOMEM;
 			goto err_dir;
+		}
 
 		pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT);
 		if (PageHighMem(pg)) {
arch/x86/syscalls/syscall_64.tbl +1 -1
index 51171ae..29aed7a 100644
@@ -318,7 +318,7 @@
 309	common	getcpu			sys_getcpu
 310	64	process_vm_readv	sys_process_vm_readv
 311	64	process_vm_writev	sys_process_vm_writev
-312	64	kcmp			sys_kcmp
+312	common	kcmp			sys_kcmp
 
 #
 # x32-specific system call numbers start at 512 to avoid cache impact