[PATCH] x86_64: Use safe_smp_processor_id in MCE handler

hard_smp_processor_id would return the local APIC id instead
of the Linux processor id. On big systems they are often
not identical. safe_smp_processor_id is just a wrapper
around it that does the necessary conversions.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Andi Kleen and committed by Linus Torvalds 0a9c3ee7 11a8e778

+2 -1
+2 -1
arch/x86_64/kernel/mce.c
··· 24 #include <asm/mce.h> 25 #include <asm/kdebug.h> 26 #include <asm/uaccess.h> 27 28 #define MISC_MCELOG_MINOR 227 29 #define NR_BANKS 6 ··· 179 return; 180 181 memset(&m, 0, sizeof(struct mce)); 182 - m.cpu = hard_smp_processor_id(); 183 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus); 184 if (!(m.mcgstatus & MCG_STATUS_RIPV)) 185 kill_it = 1;
··· 24 #include <asm/mce.h> 25 #include <asm/kdebug.h> 26 #include <asm/uaccess.h> 27 + #include <asm/smp.h> 28 29 #define MISC_MCELOG_MINOR 227 30 #define NR_BANKS 6 ··· 178 return; 179 180 memset(&m, 0, sizeof(struct mce)); 181 + m.cpu = safe_smp_processor_id(); 182 rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus); 183 if (!(m.mcgstatus & MCG_STATUS_RIPV)) 184 kill_it = 1;