git: 21a2bfcafbff - releng/13.1 - i386: Fix the nodevice apic build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Apr 2022 14:10:48 UTC
The branch releng/13.1 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=21a2bfcafbff2a6bd3b29c5e6e75d35bdb1fb959
commit 21a2bfcafbff2a6bd3b29c5e6e75d35bdb1fb959
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-04-08 15:47:52 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-04-11 13:59:15 +0000
i386: Fix the nodevice apic build
Approved by: re (gjb)
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)
(cherry picked from commit 4f659ce4daf82ac3335abf3aab7181f2ac90a4cd)
---
sys/x86/isa/clock.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c
index 1178d35979c1..62a026b92d99 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
}