diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 11c9166c333..19e8213569e 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -95,6 +95,9 @@ static DECLARE_WAIT_QUEUE_HEAD(mce_chrdev_wait); static DEFINE_PER_CPU(struct mce, mces_seen); static int cpu_missing; +void (*cpu_specific_poll)(struct mce *); +EXPORT_SYMBOL_GPL(cpu_specific_poll); + /* MCA banks polled by the period polling timer for corrected events */ DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = { [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL @@ -419,6 +422,11 @@ static void mce_wrmsrl(u32 msr, u64 v) wrmsrl(msr, v); } +static int under_injection(void) +{ + return __get_cpu_var(injectm).finished; +} + /* * Collect all global (w.r.t. this processor) status about this machine * check into our "mce" struct so that we can use it later to assess @@ -615,6 +623,10 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b) if (!(flags & MCP_TIMESTAMP)) m.tsc = 0; + + if (cpu_specific_poll && !under_injection() && !mce_dont_log_ce) + cpu_specific_poll(&m); + /* * Don't get the IP here because it's unlikely to * have anything to do with the actual error location. |