diff options
author | Mark Johnston <markj@FreeBSD.org> | 2022-04-08 15:47:52 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2022-04-11 13:43:27 +0000 |
commit | 85e36b3c9c003ba37156720091b3b385f07fb9d9 (patch) | |
tree | 0f9b74ea9fde918c0091aecc368e4068644ad8ab | |
parent | ef024be3755c6e09e0caf5f1df989e9a09f54063 (diff) | |
download | src-85e36b3c9c003ba37156720091b3b385f07fb9d9.tar.gz src-85e36b3c9c003ba37156720091b3b385f07fb9d9.zip |
i386: Fix the nodevice apic build
PR: 263124
Fixes: 62d09b46ad75 ("x86: Defer LAPIC calibration until after timecounters are available")
Reviewed by: kib, jhb, emaste
Sponsored by: The FreeBSD Foundation
(cherry picked from commit aa597d4049ffee69d413ea2154f4b312ffbaf646)
-rw-r--r-- | sys/x86/isa/clock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index f21f847709cd..ed92f50d7c14 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -42,6 +42,11 @@ __FBSDID("$FreeBSD$"); * Routines to handle clock hardware. */ +#ifdef __amd64__ +#define DEV_APIC +#else +#include "opt_apic.h" +#endif #include "opt_clock.h" #include "opt_isa.h" @@ -414,7 +419,9 @@ cpu_initclocks(void) td = curthread; tsc_calibrate(); +#ifdef DEV_APIC lapic_calibrate_timer(); +#endif cpu_initclocks_bsp(); CPU_FOREACH(i) { if (i == 0) @@ -430,7 +437,9 @@ cpu_initclocks(void) thread_unlock(td); #else tsc_calibrate(); +#ifdef DEV_APIC lapic_calibrate_timer(); +#endif cpu_initclocks_bsp(); #endif } |