summaryrefslogtreecommitdiff
path: root/sys/arch/hppa64
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-11-23 07:20:53 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2013-11-23 07:20:53 +0000
commit7c4548a0cd84a9d1aa4ee43de9ae9f07dd1f5af3 (patch)
treec7a237b7b57207b27738274263d96d1c82227e6b /sys/arch/hppa64
parent538128ae6098beafe1413d8d7dead5429abd5efb (diff)
Run doshutdownhooks() and config_suspend() even when boot() is called while
cold != 0. Indent and make hppa/hppa64 boot() closer to others. OK kettenis@
Diffstat (limited to 'sys/arch/hppa64')
-rw-r--r--sys/arch/hppa64/hppa64/machdep.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c
index 24f3e9edf7e..5fe3d4208e8 100644
--- a/sys/arch/hppa64/hppa64/machdep.c
+++ b/sys/arch/hppa64/hppa64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.52 2013/09/28 12:40:29 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.53 2013/11/23 07:20:52 uebayasi Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -542,37 +542,38 @@ boot(int howto)
/* (Unless the user explicitly asked for reboot.) */
if ((howto & RB_USERREQ) == 0)
howto |= RB_HALT;
- } else {
+ goto haltsys;
+ }
- boothowto = howto | (boothowto & RB_HALT);
-
- if (!(howto & RB_NOSYNC)) {
- waittime = 0;
- vfs_shutdown();
- /*
- * If we've been adjusting the clock, the todr
- * will be out of synch; adjust it now unless
- * the system was sitting in ddb.
- */
- if ((howto & RB_TIMEBAD) == 0)
- resettodr();
- else
- printf("WARNING: not updating battery clock\n");
- }
- if_downall();
+ boothowto = howto | (boothowto & RB_HALT);
+
+ if (!(howto & RB_NOSYNC)) {
+ waittime = 0;
+ vfs_shutdown();
+ /*
+ * If we've been adjusting the clock, the todr
+ * will be out of synch; adjust it now unless
+ * the system was sitting in ddb.
+ */
+ if ((howto & RB_TIMEBAD) == 0)
+ resettodr();
+ else
+ printf("WARNING: not updating battery clock\n");
+ }
+ if_downall();
- /* XXX probably save howto into stable storage */
+ /* XXX probably save howto into stable storage */
- uvm_shutdown();
- splhigh();
+ uvm_shutdown();
+ splhigh();
- if (howto & RB_DUMP)
- dumpsys();
+ if (howto & RB_DUMP)
+ dumpsys();
- doshutdownhooks();
- if (!TAILQ_EMPTY(&alldevs))
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
- }
+haltsys:
+ doshutdownhooks();
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
/* in case we came on powerfail interrupt */
if (cold_hook)