All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/powernv/mce: Don't silently restart the machine
@ 2018-03-08  0:36 Balbir Singh
  2018-03-08  1:20 ` Stewart Smith
  2018-03-14  9:28 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Balbir Singh @ 2018-03-08  0:36 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: npiggin, mpe, Balbir Singh

On MCE the current code will restart the machine with
ppc_md.restart(). This case was extremely unlikely since
prior to that a skiboot call is made and that resulted in
a checkstop for analysis.

With newer skiboots, on P9 we don't checkstop the box by
default, instead we return back to the kernel to extract
useful information at the time of the MCE. While we still
get this information, this patch converts the restart to
a panic(), so that if configured a dump can be taken and
we can track and probably debug the potential issue causing
the MCE.

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
---

Changelog
	- Change panic to use the passed msg, instead of a hard
	coded MCE one, since this code path is common to both
	HMI's and MCE's

 arch/powerpc/platforms/powernv/opal.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index c15182765ff5..516e23de5a3d 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -490,9 +490,12 @@ void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg)
 	 *    opal to trigger checkstop explicitly for error analysis.
 	 *    The FSP PRD component would have already got notified
 	 *    about this error through other channels.
+	 * 4. We are running on a newer skiboot that by default does
+	 *    not cause a checkstop, drops us back to the kernel to
+	 *    extract context and state at the time of the error.
 	 */
 
-	ppc_md.restart(NULL);
+	panic(msg);
 }
 
 int opal_machine_check(struct pt_regs *regs)
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/powernv/mce: Don't silently restart the machine
  2018-03-08  0:36 [PATCH] powerpc/powernv/mce: Don't silently restart the machine Balbir Singh
@ 2018-03-08  1:20 ` Stewart Smith
  2018-03-08  9:33   ` Balbir Singh
  2018-03-14  9:28 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Stewart Smith @ 2018-03-08  1:20 UTC (permalink / raw)
  To: Balbir Singh, linuxppc-dev; +Cc: npiggin

Balbir Singh <bsingharora@gmail.com> writes:
> On MCE the current code will restart the machine with
> ppc_md.restart(). This case was extremely unlikely since
> prior to that a skiboot call is made and that resulted in
> a checkstop for analysis.
>
> With newer skiboots, on P9 we don't checkstop the box by
> default, instead we return back to the kernel to extract
> useful information at the time of the MCE. While we still
> get this information, this patch converts the restart to
> a panic(), so that if configured a dump can be taken and
> we can track and probably debug the potential issue causing
> the MCE.

This will likely change again, but I can send a patch that changes the
comment (along with the logic of decoding it all and having enough
information to make sensible decisions). But... I kind of don't want to
bikeshed a comment to death :)

I reckon the panic() here is the right thing to do no matter
what.

Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>

-- 
Stewart Smith
OPAL Architect, IBM.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/powernv/mce: Don't silently restart the machine
  2018-03-08  1:20 ` Stewart Smith
@ 2018-03-08  9:33   ` Balbir Singh
  0 siblings, 0 replies; 4+ messages in thread
From: Balbir Singh @ 2018-03-08  9:33 UTC (permalink / raw)
  To: Stewart Smith
  Cc: open list:LINUX FOR POWERPC (32-BIT AND 64-BIT), Nicholas Piggin

On Thu, Mar 8, 2018 at 12:20 PM, Stewart Smith
<stewart@linux.vnet.ibm.com> wrote:
> Balbir Singh <bsingharora@gmail.com> writes:
>> On MCE the current code will restart the machine with
>> ppc_md.restart(). This case was extremely unlikely since
>> prior to that a skiboot call is made and that resulted in
>> a checkstop for analysis.
>>
>> With newer skiboots, on P9 we don't checkstop the box by
>> default, instead we return back to the kernel to extract
>> useful information at the time of the MCE. While we still
>> get this information, this patch converts the restart to
>> a panic(), so that if configured a dump can be taken and
>> we can track and probably debug the potential issue causing
>> the MCE.
>
> This will likely change again, but I can send a patch that changes the
> comment (along with the logic of decoding it all and having enough
> information to make sensible decisions). But... I kind of don't want to
> bikeshed a comment to death :)
>
> I reckon the panic() here is the right thing to do no matter
> what.
>
> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Thanks!

Balbir Singh.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc/powernv/mce: Don't silently restart the machine
  2018-03-08  0:36 [PATCH] powerpc/powernv/mce: Don't silently restart the machine Balbir Singh
  2018-03-08  1:20 ` Stewart Smith
@ 2018-03-14  9:28 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-03-14  9:28 UTC (permalink / raw)
  To: Balbir Singh, linuxppc-dev; +Cc: npiggin

On Thu, 2018-03-08 at 00:36:06 UTC, Balbir Singh wrote:
> On MCE the current code will restart the machine with
> ppc_md.restart(). This case was extremely unlikely since
> prior to that a skiboot call is made and that resulted in
> a checkstop for analysis.
> 
> With newer skiboots, on P9 we don't checkstop the box by
> default, instead we return back to the kernel to extract
> useful information at the time of the MCE. While we still
> get this information, this patch converts the restart to
> a panic(), so that if configured a dump can be taken and
> we can track and probably debug the potential issue causing
> the MCE.
> 
> Signed-off-by: Balbir Singh <bsingharora@gmail.com>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/5ee573e8ef034e687c420cb1091137

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-14  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08  0:36 [PATCH] powerpc/powernv/mce: Don't silently restart the machine Balbir Singh
2018-03-08  1:20 ` Stewart Smith
2018-03-08  9:33   ` Balbir Singh
2018-03-14  9:28 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.