Skip to contentSkip to conversation

powerpc/powernv/mce: Don't silently restart the machine

PATCH Applied Balbir Singh 3 participants 4 messages Mar 8, 2018 – Mar 14, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/powernv/mce: Don't silently restart the machine

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.

---

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(-)
arch/powerpc/platforms/powernv/opal.c +4 -1
index c15182765ff5..516e23de5a3d 100644
@@ -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)
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

Quoted 7 lines

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.

Signature · 2 lines
Stewart Smith
OPAL Architect, IBM.
#2 lore raw
Quoted 19 lines · Stewart Smith
Quoted 5 lines · 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.

Quoted 7 lines

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 :)

Quoted 4 lines

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

Thanks!

Balbir Singh.

#3 lore raw
In reply to Balbir Singh
Quoted 13 lines · 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.

Quoted 3 lines

Applied to powerpc next, thanks.

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

cheers