Skip to content

Commit

Permalink
powerpc/book3s: Increment the mce counter during machine_check_early …
Browse files Browse the repository at this point in the history
…call.

We don't see MCE counter getting increased in /proc/interrupts which gives
false impression of no MCE occurred even when there were MCE events.
The machine check early handling was added for PowerKVM and we missed to
increment the MCE count in the early handler.

We also increment mce counters in the machine_check_exception call, but
in most cases where we handle the error hypervisor never reaches there
unless its fatal and we want to crash. Only during fatal situation we may
see double increment of mce count. We need to fix that. But for
now it always good to have some count increased instead of zero.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Mahesh Salgaonkar authored and Benjamin Herrenschmidt committed Jun 11, 2014
1 parent e75ad93 commit e6654d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ long machine_check_early(struct pt_regs *regs)
{
long handled = 0;

__get_cpu_var(irq_stat).mce_exceptions++;

if (cur_cpu_spec && cur_cpu_spec->machine_check_early)
handled = cur_cpu_spec->machine_check_early(regs);
return handled;
Expand Down

0 comments on commit e6654d5

Please sign in to comment.