diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2013-11-18 08:20:23 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2013-11-18 08:20:23 +0000 |
commit | a19f520db1fd453b247a9c81abe07775c4708c3e (patch) | |
tree | 7e29e7433f6683adc29e1f5c5faad911a39af0ef | |
parent | 8411687dde061510354205e36a23c694a3f025a7 (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@
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 17 | ||||
-rw-r--r-- | sys/arch/socppc/socppc/machdep.c | 17 |
2 files changed, 16 insertions, 18 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 diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index e425f7ae0a7..e82bf998b0c 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.37 2013/09/28 12:40:32 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.38 2013/11/18 08:20:22 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1058,10 +1058,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) { ; } @@ -1069,11 +1073,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"); { |