* [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
@ 2016-08-04 4:46 Mahesh J Salgaonkar
2016-08-04 8:05 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Mahesh J Salgaonkar @ 2016-08-04 4:46 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman; +Cc: Paul Mackerras, stable
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
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.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/mce.c | 3 ++-
arch/powerpc/platforms/powernv/opal.c | 2 ++
2 files changed, 4 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 5385434..8154171 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -401,6 +401,8 @@ static int opal_recover_mce(struct pt_regs *regs,
if (!(regs->msr & MSR_RI)) {
/* If MSR_RI isn't set, we cannot recover */
+ printk(KERN_ERR "Machine check interrupt unrecoverable:"
+ " MSR(RI=0)\n");
recovered = 0;
} else if (evt->disposition == MCE_DISPOSITION_RECOVERED) {
/* Platform corrected itself */
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
2016-08-04 4:46 [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE Mahesh J Salgaonkar
@ 2016-08-04 8:05 ` Greg KH
2016-08-04 8:59 ` Mahesh Jagannath Salgaonkar
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2016-08-04 8:05 UTC (permalink / raw)
To: Mahesh J Salgaonkar
Cc: linuxppc-dev, Michael Ellerman, Paul Mackerras, stable
On Thu, Aug 04, 2016 at 10:16:48AM +0530, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>
> 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.
>
> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/mce.c | 3 ++-
> arch/powerpc/platforms/powernv/opal.c | 2 ++
> 2 files changed, 4 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
2016-08-04 8:05 ` Greg KH
@ 2016-08-04 8:59 ` Mahesh Jagannath Salgaonkar
2016-08-04 9:53 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2016-08-04 8:59 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, Michael Ellerman, Paul Mackerras, stable
On 08/04/2016 01:35 PM, Greg KH wrote:
> On Thu, Aug 04, 2016 at 10:16:48AM +0530, Mahesh J Salgaonkar wrote:
>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>
>> 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.
>>
>> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/kernel/mce.c | 3 ++-
>> arch/powerpc/platforms/powernv/opal.c | 2 ++
>> 2 files changed, 4 insertions(+), 1 deletion(-)
>
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> for how to do this properly.
>
> </formletter>
>
Ouch. My mistake. Will follow Documentation/stable_kernel_rules.txt
Thanks,
-Mahesh.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE.
2016-08-04 8:59 ` Mahesh Jagannath Salgaonkar
@ 2016-08-04 9:53 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2016-08-04 9:53 UTC (permalink / raw)
To: Mahesh Jagannath Salgaonkar, Greg KH; +Cc: linuxppc-dev, Paul Mackerras, stable
Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> writes:
> On 08/04/2016 01:35 PM, Greg KH wrote:
>> On Thu, Aug 04, 2016 at 10:16:48AM +0530, Mahesh J Salgaonkar wrote:
>>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>
>> <formletter>
>>
>> This is not the correct way to submit patches for inclusion in the
>> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
>> for how to do this properly.
>>
>> </formletter>
>
> Ouch. My mistake. Will follow Documentation/stable_kernel_rules.txt
Additionally I appreciate it if you can add a Fixes: line. Which
indicates the commit that introduced the bug you are fixing. It is
documented in Documentation/SubmittingPatches.
In this case it looks like it would be:
Fixes: 36df96f8acaf ("powerpc/book3s: Decode and save machine check event.")
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-04 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 4:46 [PATCH] powerpc/book3s: Fix MCE console messages for unrecoverable MCE Mahesh J Salgaonkar
2016-08-04 8:05 ` Greg KH
2016-08-04 8:59 ` Mahesh Jagannath Salgaonkar
2016-08-04 9:53 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox