]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Tue, 9 Aug 2016 05:09:13 +0000 (10:39 +0530)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:17:07 +0000 (01:17 +0000)
commit c74dd88e77d3ecbc9e55c78796d82c9aa21cabad upstream.

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 <mahesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/powerpc/kernel/mce.c
arch/powerpc/platforms/powernv/opal.c

index a7fd4cb78b788e01a6545964572a4af44b28bc28..1c75f9777ce3ce8da8a35ee7ad7bc2f128f0fecf 100644 (file)
@@ -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;
index 0fa7178d36dc46238dc5682c8b4411e41b2703b9..12833e486d9b3ab21a3f97dc9e931ddd332a7ab0 100644 (file)
@@ -459,6 +459,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 */