提交 0a9c3ee7 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

[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: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 11a8e778
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <asm/mce.h> #include <asm/mce.h>
#include <asm/kdebug.h> #include <asm/kdebug.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/smp.h>
#define MISC_MCELOG_MINOR 227 #define MISC_MCELOG_MINOR 227
#define NR_BANKS 6 #define NR_BANKS 6
...@@ -178,7 +179,7 @@ void do_machine_check(struct pt_regs * regs, long error_code) ...@@ -178,7 +179,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
return; return;
memset(&m, 0, sizeof(struct mce)); 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); rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
if (!(m.mcgstatus & MCG_STATUS_RIPV)) if (!(m.mcgstatus & MCG_STATUS_RIPV))
kill_it = 1; kill_it = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册