summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-07-12 22:37:04 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-07-12 22:37:04 +0000
commitf3f99ad791727b41582218b884529e43aa7b026f (patch)
treefc5f070a051451ff78e38cf5117ea14da0c8c958 /sys/arch/sparc64
parentadaab4ef7a74e2b50b495d1427460fa446fece27 (diff)
reboot(9), panic(9): Call panic(9) for unrecoverable MD H/W errors (NMIs)
Some architectures have ability to detect hardware sanity and notify system (NMI, firmware callback, etc.). Handle these hardware severe errors, same as software errors, with panic(9). According to miod@, SGI IP27 NMI is triggered by pushing some "hidden" button, which "usual" users/admins don't know. Pushing such a button is "RB_USERREQ" (human-triggered) in that the button is pushed by a human, but not "RB_USERREQ" in that no user intervention in system (== no command input) is done. miod@ agreed that changing these from RB_USERREQ to !RB_USERREQ (== panic(9)) is not a big problem. OK miod@ kettenis@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/psycho.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c
index f83d2a8ab49..5dde1429d63 100644
--- a/sys/arch/sparc64/dev/psycho.c
+++ b/sys/arch/sparc64/dev/psycho.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psycho.c,v 1.72 2014/07/12 18:44:43 tedu Exp $ */
+/* $OpenBSD: psycho.c,v 1.73 2014/07/12 22:37:03 uebayasi Exp $ */
/* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */
/*
@@ -43,7 +43,6 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/timetc.h>
-#include <sys/reboot.h>
#include <uvm/uvm_extern.h>
@@ -838,8 +837,8 @@ psycho_powerfail(void *arg)
/*
* We lost power. Try to shut down NOW.
*/
- printf("Power Failure Detected: Shutting down NOW.\n");
- reboot(RB_POWERDOWN | RB_HALT);
+ panic("Power Failure Detected");
+ /* NOTREACHED */
return (1);
}