Thread (7 messages) flat view 7 messages, 2 authors, 2017-08-11

Re: [v2,1/4] powerpc/64s: fix mce accounting for powernv

From: Michael Ellerman <hidden>
Date: 2017-08-11 12:19:53

On Tue, 2017-08-01 at 12:00:51 UTC, Nicholas Piggin wrote:
quoted hunk ↗ jump to hunk
---
 arch/powerpc/kernel/traps.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index bfcfd9ef09f2..5adfea2dc822 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -755,7 +755,14 @@ void machine_check_exception(struct pt_regs *regs)
 	enum ctx_state prev_state = exception_enter();
 	int recover = 0;
 
+#ifdef CONFIG_PPC_BOOK3S_64
+	/* 64s accounts the mce in machine_check_early when in HVMODE */
+	if (!cpu_has_feature(CPU_FTR_HVMODE))
+		__this_cpu_inc(irq_stat.mce_exceptions);
+#else
 	__this_cpu_inc(irq_stat.mce_exceptions);
+#endif
+
 
 	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
 
Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f886f0f6e0e20d53dc36421c2ee83f

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help