[PATCH v2] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3649d

2 messages, 2 authors, 2016-08-10 · open the first message on its own page

[PATCH v2] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.

From: Mahesh J Salgaonkar <hidden>
Date: 2016-08-09 05:09:23

From: Mahesh Salgaonkar <redacted>

When machine check occurs with MSR(RI=0), it means MC interrupt is
unrecoverable and kernel goes down to panic path. But the console
message still shows it as recovered. This patch fixes the MCE console
messages.

Fixes: 36df96f8acaf ("powerpc/book3s: Decode and save machine check event.")
Cc: stable@vger.kernel.org
Signed-off-by: Mahesh Salgaonkar <redacted>
---
Changes in v2:
- Used pr_err() instead of printk().
---
 arch/powerpc/kernel/mce.c             |    3 ++-
 arch/powerpc/platforms/powernv/opal.c |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index ef267fd..5e7ece0 100644
--- a/arch/powerpc/kernel/mce.c
+++ b/arch/powerpc/kernel/mce.c
@@ -92,7 +92,8 @@ void save_mce_event(struct pt_regs *regs, long handled,
 	mce->in_use = 1;
 
 	mce->initiator = MCE_INITIATOR_CPU;
-	if (handled)
+	/* Mark it recovered if we have handled it and MSR(RI=1). */
+	if (handled && (regs->msr & MSR_RI))
 		mce->disposition = MCE_DISPOSITION_RECOVERED;
 	else
 		mce->disposition = MCE_DISPOSITION_NOT_RECOVERED;
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 738c9b1..48fa512 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -399,6 +399,7 @@ static int opal_recover_mce(struct pt_regs *regs,
 
 	if (!(regs->msr & MSR_RI)) {
 		/* If MSR_RI isn't set, we cannot recover */
+		pr_err("Machine check interrupt unrecoverable: MSR(RI=0)\n");
 		recovered = 0;
 	} else if (evt->disposition == MCE_DISPOSITION_RECOVERED) {
 		/* Platform corrected itself */

Re: [v2] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.

From: Michael Ellerman <hidden>
Date: 2016-08-10 12:46:36

On Tue, 2016-09-08 at 05:09:13 UTC, Mahesh Salgaonkar wrote:
From: Mahesh Salgaonkar <redacted>

When machine check occurs with MSR(RI=0), it means MC interrupt is
unrecoverable and kernel goes down to panic path. But the console
message still shows it as recovered. This patch fixes the MCE console
messages.

Fixes: 36df96f8acaf ("powerpc/book3s: Decode and save machine check event.")
Signed-off-by: Mahesh Salgaonkar <redacted>
Applied to powerpc fixes, thanks.

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

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