diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2014-01-06 16:17:34 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2014-01-06 16:17:34 +0000 |
commit | 1e88169a4c6473b1224f97022cac2dc5d5ba55a7 (patch) | |
tree | 970ef180024cd5523e96b37be58c69cf649d5549 /sys/arch/socppc | |
parent | 226030c3f4ec0e0798c9171387c0f8a9b42daa75 (diff) |
Make macppc/socppc boot() code path more similar to others.
This changes calling boot() during (cold != 0) to not call if_downall() and
uvm_shutdown(). Both of which must not be specific to PowerPC.
OK mpi@
Diffstat (limited to 'sys/arch/socppc')
-rw-r--r-- | sys/arch/socppc/socppc/machdep.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index e82bf998b0c..f492f01f7db 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.38 2013/11/18 08:20:22 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.39 2014/01/06 16:17:33 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1038,8 +1038,18 @@ boot(int howto) { static int syncing; + if (cold) { + /* + * If the system is cold, just halt, unless the user + * explicitly asked for reboot. + */ + if ((howto & RB_USERREQ) == 0) + howto |= RB_HALT; + goto haltsys; + } + boothowto = howto; - if (!cold && !(howto & RB_NOSYNC) && !syncing) { + if (!(howto & RB_NOSYNC) && !syncing) { syncing = 1; vfs_shutdown(); /* sync */ @@ -1059,8 +1069,10 @@ boot(int howto) uvm_shutdown(); splhigh(); - if (!cold && (howto & RB_DUMP)) + if ((howto & RB_DUMP)) dumpsys(); + +haltsys: doshutdownhooks(); if (!TAILQ_EMPTY(&alldevs)) config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN); |