Skip to content

Commit

Permalink
[PATCH] x86_64: Use safe_smp_processor_id in MCE handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 12, 2006
1 parent 11a8e77 commit 0a9c3ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0a9c3ee

Please sign in to comment.