diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-01-16 20:43:46 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-01-16 20:43:46 +0000 |
commit | bd7fbb457605e2f68a21bceee7c234a1b1b96ef5 (patch) | |
tree | 2e205eb0c61f51cb39ab9d8c509bd7d2d7620db5 | |
parent | a92f56b13fd3ba3ef0a28d0db5a07a6919db4040 (diff) |
do not call resettodr() if RB_TIMEBAD is set due to being in ddb with clock updates suspended
-rw-r--r-- | sys/arch/atari/atari/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/pmax/pmax/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 13 | ||||
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 13 |
8 files changed, 67 insertions, 19 deletions
diff --git a/sys/arch/atari/atari/machdep.c b/sys/arch/atari/atari/machdep.c index dc92e536670..c6ce1d2e091 100644 --- a/sys/arch/atari/atari/machdep.c +++ b/sys/arch/atari/atari/machdep.c @@ -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"); + } } } diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index ad7f0c41c57..a708637f4ac 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -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. */ diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index a44093bfa42..d42d0f03da8 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -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 " diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index 80bf5a7cd33..57fec537bcf 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -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) { diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 1410362e2da..74a646b8719 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -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"); + } } } diff --git a/sys/arch/pmax/pmax/machdep.c b/sys/arch/pmax/pmax/machdep.c index 31bda4db0f8..52873ff3cfb 100644 --- a/sys/arch/pmax/pmax/machdep.c +++ b/sys/arch/pmax/pmax/machdep.c @@ -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. */ diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c index dddd2a3c27e..d0024a52236 100644 --- a/sys/arch/powerpc/powerpc/machdep.c +++ b/sys/arch/powerpc/powerpc/machdep.c @@ -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) { diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 1935d85b66b..dc5999edc94 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -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) { |