mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
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.
This commit is contained in:
parent
8859442e76
commit
614dd4f83c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191803
@ -319,7 +319,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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user