summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-05-05 01:13:20 +0000
committermav <mav@FreeBSD.org>2009-05-05 01:13:20 +0000
commit4ba113b1780a1a5a8e5b588fbd6c627e15adeb0d (patch)
treed316d9336f1c6f9f105346cd5cfecdfcbddd9427 /sys/i386
parent7c0aa0054b8976fc87d345f93733c546e12b7fd2 (diff)
downloadFreeBSD-src-4ba113b1780a1a5a8e5b588fbd6c627e15adeb0d.zip
FreeBSD-src-4ba113b1780a1a5a8e5b588fbd6c627e15adeb0d.tar.gz
Do not try to initialize LAPIC timer if we are not going to use it.
It solves assertion, when kernel built with INVARIANTS configured to use i8254 timer.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/local_apic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/local_apic.c b/sys/i386/i386/local_apic.c
index 82e2c30..7969a40 100644
--- a/sys/i386/i386/local_apic.c
+++ b/sys/i386/i386/local_apic.c
@@ -321,7 +321,7 @@ lapic_setup(int boot)
}
/* We don't setup the timer during boot on the BSP until later. */
- if (!(boot && PCPU_GET(cpuid) == 0)) {
+ if (!(boot && PCPU_GET(cpuid) == 0) && lapic_timer_hz != 0) {
KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",
lapic_id()));
lapic_timer_set_divisor(lapic_timer_divisor);
OpenPOWER on IntegriCloud