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.
This commit is contained in:
Alexander Motin 2010-09-21 08:02:02 +00:00
parent f294c94440
commit 95d23438dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212958

View File

@ -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);