summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-09-21 08:02:02 +0000
committermav <mav@FreeBSD.org>2010-09-21 08:02:02 +0000
commit16369ea8b2347019ccd6a1a9f6a307b0b82297ca (patch)
treec4a27433d04423c0bee92e5ff4fdfffe9572cd27 /sys/kern/kern_tc.c
parent80e73ffdf86817cef7c332ba91e25d1da39c6f19 (diff)
downloadFreeBSD-src-16369ea8b2347019ccd6a1a9f6a307b0b82297ca.zip
FreeBSD-src-16369ea8b2347019ccd6a1a9f6a307b0b82297ca.tar.gz
Until hardclock() and respectively tc_windup() called first time, system
is running on "dummy" time counter. But to function properly in one-shot mode, event timer management code requires working time counter. Slow moving "dummy" time counter delays first hardclock() call by few seconds on my systems, even though timer interrupts were correctly kicking kernel. That causes few seconds delay during boot with one-shot mode enabled. To break this loop, explicitly call tc_windup() first time during initialization process to let it switch to some real time counter.
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r--sys/kern/kern_tc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 7a34a52..cdca3a3 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -805,6 +805,7 @@ inittimecounter(void *dummy)
/* warm up new timecounter (again) and get rolling. */
(void)timecounter->tc_get_timecount(timecounter);
(void)timecounter->tc_get_timecount(timecounter);
+ tc_windup();
}
SYSINIT(timecounter, SI_SUB_CLOCKS, SI_ORDER_SECOND, inittimecounter, NULL);
OpenPOWER on IntegriCloud