]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: Defer LAPIC calibration until after timecounters are available
authorMark Johnston <markj@FreeBSD.org>
Mon, 6 Dec 2021 15:42:10 +0000 (10:42 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 6 Dec 2021 15:42:10 +0000 (10:42 -0500)
commit62d09b46ad7508ae74d462e49234f0a80f91ff69
tree5456245bb237aaa032c7ce1b87c99226eb649baf
parentf06f1d1fdb969fa7a0a6eefa030d8536f365eb6e
x86: Defer LAPIC calibration until after timecounters are available

This ensures that we have a good reference timecounter for performing
calibration.

Change lapic_setup to avoid configuring the timer when booting, and move
calibration and initial configuration to a new lapic routine,
lapic_calibrate_timer.  This calibration will be initiated from
cpu_initclocks(), before an eventtimer is selected.

Reviewed by: kib, jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33206
sys/x86/include/apicvar.h
sys/x86/include/clock.h
sys/x86/isa/clock.c
sys/x86/x86/local_apic.c
sys/x86/xen/xen_apic.c