* [PATCH] powerpc/book3s: Increment the mce counter during machine_check_early call.
@ 2014-04-28 14:17 Mahesh J Salgaonkar
0 siblings, 0 replies; only message in thread
From: Mahesh J Salgaonkar @ 2014-04-28 14:17 UTC (permalink / raw)
To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: Michael Neuling
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
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>
---
arch/powerpc/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 1bd7ca2..239f1cd 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-28 14:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 14:17 [PATCH] powerpc/book3s: Increment the mce counter during machine_check_early call Mahesh J Salgaonkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).