aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-05-27 15:56:57 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-06-03 17:40:38 -0400
commitca84f69697da0f004135e45b63ca560b6bd3554e (patch)
tree0106ff5c8a2def169e7d2900071b6543d6c4dc6a /arch/x86/kernel/cpu/mcheck/mce.c
parent01ca79f1411eae2a45352709c838b946b1af9fbd (diff)
x86, mce: add MCE poll count to /proc/interrupts
Keep a count of the machine check polls (or CMCI events) in /proc/interrupts. Andi needs this for debugging, but it's also useful in general to see what's going in by the kernel. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 287268d2183..784f6ae9d6f 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -264,6 +264,8 @@ static inline void mce_get_rip(struct mce *m, struct pt_regs *regs)
264 } 264 }
265} 265}
266 266
267DEFINE_PER_CPU(unsigned, mce_poll_count);
268
267/* 269/*
268 * Poll for corrected events or events that happened before reset. 270 * Poll for corrected events or events that happened before reset.
269 * Those are just logged through /dev/mcelog. 271 * Those are just logged through /dev/mcelog.
@@ -275,6 +277,8 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
275 struct mce m; 277 struct mce m;
276 int i; 278 int i;
277 279
280 __get_cpu_var(mce_poll_count)++;
281
278 mce_setup(&m); 282 mce_setup(&m);
279 283
280 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS); 284 m.mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);