|
@@ -279,6 +279,14 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
|
|
|
|
|
|
void system_reset_exception(struct pt_regs *regs)
|
|
|
{
|
|
|
+ /*
|
|
|
+ * Avoid crashes in case of nested NMI exceptions. Recoverability
|
|
|
+ * is determined by RI and in_nmi
|
|
|
+ */
|
|
|
+ bool nested = in_nmi();
|
|
|
+ if (!nested)
|
|
|
+ nmi_enter();
|
|
|
+
|
|
|
/* See if any machine dependent calls */
|
|
|
if (ppc_md.system_reset_exception) {
|
|
|
if (ppc_md.system_reset_exception(regs))
|
|
@@ -297,6 +305,9 @@ out:
|
|
|
if (!(regs->msr & MSR_RI))
|
|
|
panic("Unrecoverable System Reset");
|
|
|
|
|
|
+ if (!nested)
|
|
|
+ nmi_exit();
|
|
|
+
|
|
|
/* What should we do here? We could issue a shutdown or hard reset. */
|
|
|
}
|
|
|
|