Remove double-calls to tc_get_timecount() to warm timecounters.

It seems that second call does not add any useful state change for all
implemented timecounters.

Discussed with:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
This commit is contained in:
Konstantin Belousov 2020-06-10 22:30:32 +00:00
parent 2ef84b7da9
commit 4149c6a3ec
4 changed files with 0 additions and 6 deletions

View file

@ -3220,7 +3220,6 @@ acpi_resync_clock(struct acpi_softc *sc)
* Warm up timecounter again and reset system clock.
*/
(void)timecounter->tc_get_timecount(timecounter);
(void)timecounter->tc_get_timecount(timecounter);
inittodr(time_second + sc->acpi_sleep_delay);
}

View file

@ -274,7 +274,6 @@ acpi_timer_resume_handler(struct timecounter *newtc)
"restoring timecounter, %s -> %s\n",
tc->tc_name, newtc->tc_name);
(void)newtc->tc_get_timecount(newtc);
(void)newtc->tc_get_timecount(newtc);
timecounter = newtc;
}
}

View file

@ -303,7 +303,6 @@ xctrl_suspend()
* Warm up timecounter again and reset system clock.
*/
timecounter->tc_get_timecount(timecounter);
timecounter->tc_get_timecount(timecounter);
inittodr(time_second);
#ifdef EARLY_AP_STARTUP

View file

@ -1206,7 +1206,6 @@ tc_init(struct timecounter *tc)
tc->tc_frequency < timecounter->tc_frequency)
return;
(void)tc->tc_get_timecount(tc);
(void)tc->tc_get_timecount(tc);
timecounter = tc;
}
@ -1469,7 +1468,6 @@ sysctl_kern_timecounter_hardware(SYSCTL_HANDLER_ARGS)
/* Warm up new timecounter. */
(void)newtc->tc_get_timecount(newtc);
(void)newtc->tc_get_timecount(newtc);
timecounter = newtc;
@ -1963,7 +1961,6 @@ inittimecounter(void *dummy)
/* warm up new timecounter (again) and get rolling. */
(void)timecounter->tc_get_timecount(timecounter);
(void)timecounter->tc_get_timecount(timecounter);
mtx_lock_spin(&tc_setclock_mtx);
tc_windup(NULL);
mtx_unlock_spin(&tc_setclock_mtx);