diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-08 18:17:52 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-08 18:17:52 +0000 |
commit | e54773f206480c042ddd8be74b392d024f73257e (patch) | |
tree | bb4ccdaedacb7776f4d14c4737104873aaa77642 /sys | |
parent | aa5a96bd468550887c4ccfecf56be6742255297c (diff) |
tc_setclock: don't print a warning if tc_windup() rejects inittodr(9) time
During resume, it isn't necessarily a problem if the UTC time we get
from inittodr(9) lags behind the system UTC clock. In particular, if
the active timecounter's frequency is low enough, tc_delta() might not
overflow across a brief suspend.
Remove the misleading warning message. The code is behaving as
intended, just not in a way I anticipated when I added the warning
message a few years ago.
Discovered by kettenis@. Root cause isolated with kettenis@.
Link: https://marc.info/?l=openbsd-tech&m=166790845619897&w=2
ok mlarkin@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_tc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 3509b8f2bd9..297eccc95de 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tc.c,v 1.78 2022/09/18 20:47:09 cheloha Exp $ */ +/* $OpenBSD: kern_tc.c,v 1.79 2022/11/08 18:17:51 cheloha Exp $ */ /* * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org> @@ -552,7 +552,6 @@ void tc_setclock(const struct timespec *ts) { struct bintime new_naptime, old_naptime, uptime, utc; - struct timespec tmp; static int first = 1; #ifndef SMALL_KERNEL struct bintime elapsed; @@ -583,12 +582,6 @@ tc_setclock(const struct timespec *ts) mtx_leave(&windup_mtx); - if (bintimecmp(&old_naptime, &new_naptime, ==)) { - BINTIME_TO_TIMESPEC(&uptime, &tmp); - printf("%s: cannot rewind uptime to %lld.%09ld\n", - __func__, (long long)tmp.tv_sec, tmp.tv_nsec); - } - #ifndef SMALL_KERNEL /* convert the bintime to ticks */ bintimesub(&new_naptime, &old_naptime, &elapsed); |