aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/mce.h1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c4
-rw-r--r--arch/x86/kernel/irq.c4
3 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 1156dae295ac..63abf3b19432 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -125,6 +125,7 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
125int mce_available(struct cpuinfo_x86 *c); 125int mce_available(struct cpuinfo_x86 *c);
126 126
127DECLARE_PER_CPU(unsigned, mce_exception_count); 127DECLARE_PER_CPU(unsigned, mce_exception_count);
128DECLARE_PER_CPU(unsigned, mce_poll_count);
128 129
129void mce_log_therm_throt_event(__u64 status); 130void mce_log_therm_throt_event(__u64 status);
130 131
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 287268d21836..784f6ae9d6f4 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);
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 05fc635c28c0..eff46b5de62f 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -100,6 +100,10 @@ static int show_other_interrupts(struct seq_file *p, int prec)
100 for_each_online_cpu(j) 100 for_each_online_cpu(j)
101 seq_printf(p, "%10u ", per_cpu(mce_exception_count, j)); 101 seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
102 seq_printf(p, " Machine check exceptions\n"); 102 seq_printf(p, " Machine check exceptions\n");
103 seq_printf(p, "%*s: ", prec, "MCP");
104 for_each_online_cpu(j)
105 seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
106 seq_printf(p, " Machine check polls\n");
103#endif 107#endif
104 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); 108 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
105#if defined(CONFIG_X86_IO_APIC) 109#if defined(CONFIG_X86_IO_APIC)