summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-10-28 00:59:03 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-10-28 00:59:03 +0000
commit7566d5eeca8bd6e5ca49c6841364e1d60878600d (patch)
treec20c19b55e1fd50feaf86a865d332bac30f188d6 /sys
parent5ee6c68ff158d9a02a87401bd468e0269476b731 (diff)
Handle RB_TIMEBAD in boot().
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 8f86c33e7e2..8de0fc9f774 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.61 2001/09/28 20:50:07 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.62 2001/10/28 00:59:02 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -115,7 +115,6 @@
#else
#define DEBUG_MSG printf
#endif /* DDB */
-static int waittime = -1;
struct intrhand *intr_handlers[256];
vm_offset_t interrupt_stack[MAX_CPUS] = {0};
@@ -1079,32 +1078,28 @@ __dead void
boot(howto)
register int howto;
{
+ /* take a snap shot before clobbering any registers */
+ if (curproc && curproc->p_addr)
+ savectx(curpcb);
+
/* If system is cold, just halt. */
if (cold) {
howto |= RB_HALT;
goto haltsys;
}
- /* take a snap shot before clobbering any registers */
- if (curproc && curproc->p_addr)
- savectx(curpcb);
-
boothowto = howto;
- if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
- extern struct proc proc0;
-
- /* protect against curproc->p_stats.foo refs in sync() XXX */
- if (curproc == NULL)
- curproc = &proc0;
-
- waittime = 0;
+ if ((howto & RB_NOSYNC) == 0) {
vfs_shutdown();
-
/*
* If we've been adjusting the clock, the todr
- * will be out of synch; adjust it now.
+ * will be out of synch; adjust it now unless
+ * the system was sitting in ddb.
*/
- resettodr();
+ if ((howto & RB_TIMEBAD) == 0)
+ resettodr();
+ else
+ printf("WARNING: not updating battery clock\n");
}
/* Disable interrupts. */