summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-11 22:46:54 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 19:05:03 -0800
commit0a9c3ee7692fa20670986bcf550950e88ab9b4cc (patch)
tree62721a6246e5b60a4a7ee779d82bf3b88a0896e6 /arch/x86_64/kernel
parent11a8e778c46ee76fc46b0a7fa9d455b5a8e3e19f (diff)
downloadblackbird-op-linux-0a9c3ee7692fa20670986bcf550950e88ab9b4cc.tar.gz
blackbird-op-linux-0a9c3ee7692fa20670986bcf550950e88ab9b4cc.zip
[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>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r--arch/x86_64/kernel/mce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index b8f28ebdce26..13a2eada6c95 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -24,6 +24,7 @@
#include <asm/mce.h>
#include <asm/kdebug.h>
#include <asm/uaccess.h>
+#include <asm/smp.h>
#define MISC_MCELOG_MINOR 227
#define NR_BANKS 6
@@ -178,7 +179,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
return;
memset(&m, 0, sizeof(struct mce));
- m.cpu = hard_smp_processor_id();
+ m.cpu = safe_smp_processor_id();
rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
if (!(m.mcgstatus & MCG_STATUS_RIPV))
kill_it = 1;
OpenPOWER on IntegriCloud