do not call resettodr() if RB_TIMEBAD is set due to being in ddb with clock updates...
authorkstailey <kstailey@openbsd.org>
Thu, 16 Jan 1997 20:43:29 +0000 (20:43 +0000)
committerkstailey <kstailey@openbsd.org>
Thu, 16 Jan 1997 20:43:29 +0000 (20:43 +0000)
sys/arch/atari/atari/machdep.c
sys/arch/hp300/hp300/machdep.c
sys/arch/mac68k/mac68k/machdep.c
sys/arch/mvme68k/mvme68k/machdep.c
sys/arch/mvme88k/mvme88k/machdep.c
sys/arch/pmax/pmax/machdep.c
sys/arch/powerpc/powerpc/machdep.c
sys/arch/vax/vax/machdep.c

index dc92e53..c6ce1d2 100644 (file)
@@ -780,9 +780,14 @@ bootsync(void)
 
                /*
                 * 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");
+               }
        }
 }
 
index ad7f0c4..a708637 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.10 1997/01/15 04:54:45 downsj Exp $     */
+/*     $OpenBSD: machdep.c,v 1.11 1997/01/16 20:43:33 kstailey Exp $   */
 /*     $NetBSD: machdep.c,v 1.77 1996/12/11 16:49:23 thorpej Exp $     */
 
 /*
@@ -1122,9 +1122,14 @@ boot(howto)
                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. */
index a44093b..d42d0f0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.24 1996/11/05 01:40:29 briggs Exp $     */
+/*     $OpenBSD: machdep.c,v 1.25 1997/01/16 20:43:36 kstailey Exp $   */
 /*     $NetBSD: machdep.c,v 1.122 1996/10/15 06:40:39 scottr Exp $     */
 
 /*
@@ -829,9 +829,14 @@ boot(howto)
 #ifdef notyet
                /*
                 * 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");
+               }
 #else
 # ifdef DIAGNOSTIC
                printf("NetBSD/mac68k does not trust itself to update the "
index 80bf5a7..57fec53 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.12 1996/07/27 11:40:42 deraadt Exp $ */
+/*     $OpenBSD: machdep.c,v 1.13 1997/01/16 20:43:38 kstailey Exp $ */
 
 /*
  * Copyright (c) 1995 Theo de Raadt
@@ -1104,9 +1104,14 @@ boot(howto)
                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");
+               }
        }
        splhigh();                      /* extreme priority */
        if (howto&RB_HALT) {
index 1410362..74a646b 100644 (file)
@@ -780,9 +780,14 @@ bootsync(void)
                        printf("done\n");
                /*
                 * 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");
+               }
        }
 }
 
index 31bda4d..52873ff 100644 (file)
@@ -1262,9 +1262,14 @@ boot(howto)
 
                /*
                 * 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. */
index dddd2a3..d0024a5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: machdep.c,v 1.2 1996/12/28 06:22:05 rahnds Exp $      */
+/*     $OpenBSD: machdep.c,v 1.3 1997/01/16 20:43:44 kstailey Exp $    */
 /*     $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $   */
 
 /*
@@ -865,7 +865,16 @@ boot(howto)
        if (!cold && !(howto & RB_NOSYNC) && !syncing) {
                syncing = 1;
                vfs_shutdown();         /* sync */
-               resettodr();            /* set wall clock */
+               /*
+                * 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");
+               }
        }
        splhigh();
        if (howto & RB_HALT) {
index 1935d85..dc5999e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.10 1997/01/15 23:25:17 maja Exp $ */
+/* $OpenBSD: machdep.c,v 1.11 1997/01/16 20:43:45 kstailey Exp $ */
 /* $NetBSD: machdep.c,v 1.35 1997/01/11 11:31:26 ragge Exp $  */
 
 /*
@@ -549,7 +549,16 @@ boot(howto, bootstr)
                 * If we've been adjusting the clock, the todr will be out of
                 * synch; adjust it now.
                 */
-               resettodr();
+               /*
+                * 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");
+               }
        }
        splhigh();              /* extreme priority */
        if (howto & RB_HALT) {