diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -42,6 +42,11 @@ * Routines to handle clock hardware. */ +#ifdef __amd64__ +#define DEV_APIC +#else +#include "opt_apic.h" +#endif #include "opt_clock.h" #include "opt_isa.h" @@ -415,7 +420,9 @@ td = curthread; tsc_calibrate(); +#ifdef DEV_APIC lapic_calibrate_timer(); +#endif cpu_initclocks_bsp(); CPU_FOREACH(i) { if (i == 0) @@ -431,7 +438,9 @@ thread_unlock(td); #else tsc_calibrate(); +#ifdef DEV_APIC lapic_calibrate_timer(); +#endif cpu_initclocks_bsp(); #endif }