aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2014-04-24 10:34:45 +0530
committerEli Qiao <taget@linux.vnet.ibm.com>2014-04-24 16:59:56 +0800
commitfa68aaa0c8a081651cedd777fd1c3199cc82ff18 (patch)
treeb77a7b6b34a67b52044f2567b81adb629c54730c
parent2afe28a6c440e5aff6b2946dece71621c0c8a0f7 (diff)
downloadpowerkvm-fa68aaa0c8a081651cedd777fd1c3199cc82ff18.tar.gz
powerpc/book3s: Increment the mce counter during machine_check_early 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. This fixes the MCE count issue mentioned in bz108413 Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
-rw-r--r--arch/powerpc/kernel/traps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 172f9313bbece..7af983ab2c9f2 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -294,6 +294,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;