summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-11-18 08:20:23 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-11-18 08:20:23 +0000
commita19f520db1fd453b247a9c81abe07775c4708c3e (patch)
tree7e29e7433f6683adc29e1f5c5faad911a39af0ef /sys/arch/macppc
parent8411687dde061510354205e36a23c694a3f025a7 (diff)
Normalize code sequence around dumpsys(), doshutdownhooks(), and
config_suspend() in ppc boot() functions. Always go through them regardless of (howto & RB_HALT). OK deraadt@ mpi@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/macppc/machdep.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 79c2b846c50..5cc113ddf78 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.141 2013/09/28 12:40:31 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.142 2013/11/18 08:20:22 uebayasi Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -824,10 +824,14 @@ boot(int howto)
uvm_shutdown();
splhigh();
+
+ if (!cold && (howto & RB_DUMP))
+ dumpsys();
+ doshutdownhooks();
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+
if (howto & RB_HALT) {
- doshutdownhooks();
- if (!TAILQ_EMPTY(&alldevs))
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
#if NADB > 0
delay(1000000);
@@ -840,11 +844,6 @@ boot(int howto)
printf("halted\n\n");
(fw->exit)();
}
- if (!cold && (howto & RB_DUMP))
- dumpsys();
- doshutdownhooks();
- if (!TAILQ_EMPTY(&alldevs))
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
printf("rebooting\n\n");
#if NADB > 0