diff options
author | Andi Kleen <andi@firstfloor.org> | 2009-05-27 15:56:52 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-03 17:40:38 -0400 |
commit | 01ca79f1411eae2a45352709c838b946b1af9fbd (patch) | |
tree | 6ee0f5306363f112c6c417c0db85b6d81753f5f8 /arch/x86/kernel/cpu/mcheck/mce.c | |
parent | 48b1fddbb100a64f3983ca9768b8ea629a09aa20 (diff) |
x86, mce: add machine check exception count in /proc/interrupts
Useful for debugging, but it's also good general policy
to have a counter for all special interrupts there. This makes it easier
to diagnose where a CPU is spending its time.
[ Impact: feature, debugging tool ]
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.c | 4 |
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 1d0aa9c4e15b..287268d21836 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -57,6 +57,8 @@ int mce_disabled; | |||
57 | 57 | ||
58 | atomic_t mce_entry; | 58 | atomic_t mce_entry; |
59 | 59 | ||
60 | DEFINE_PER_CPU(unsigned, mce_exception_count); | ||
61 | |||
60 | /* | 62 | /* |
61 | * Tolerant levels: | 63 | * Tolerant levels: |
62 | * 0: always panic on uncorrected errors, log corrected errors | 64 | * 0: always panic on uncorrected errors, log corrected errors |
@@ -359,6 +361,8 @@ void do_machine_check(struct pt_regs *regs, long error_code) | |||
359 | 361 | ||
360 | atomic_inc(&mce_entry); | 362 | atomic_inc(&mce_entry); |
361 | 363 | ||
364 | __get_cpu_var(mce_exception_count)++; | ||
365 | |||
362 | if (notify_die(DIE_NMI, "machine check", regs, error_code, | 366 | if (notify_die(DIE_NMI, "machine check", regs, error_code, |
363 | 18, SIGKILL) == NOTIFY_STOP) | 367 | 18, SIGKILL) == NOTIFY_STOP) |
364 | goto out; | 368 | goto out; |