Fighting for the power.
Alexander Motin
mav at FreeBSD.org
Mon May 4 22:28:53 UTC 2009
Lucius Windschuh wrote:
> I tried this on CURRENT at r191784 (i386) on a Thinkpad T400 (Intel(R)
> Core(TM)2 Duo CPU T9400) with INVARIANTS, etc. enabled.
> The result was a panic shortly before /sbin/init is called:
>
> panic: lapic1: zero divisor
>
> So, the KASSERT in sys/i386/local_apic.c:325 fired:
> KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",
> lapic_id()));
>
> Did I forget something?
>
> My /boot/loader.conf:
> hint.p4tcc.0.disabled=1
> hint.acpi_throttle.0.disabled=1
> kern.hz=100
> hint.atrtc.0.clock=0
> hint.apic.0.clock=0
> hint.ata.2.pm_level=2
> hint.ata.3.pm_level=3
> vm.pmap.pg_ps_enabled=1
>
> dmesg: http://sites.google.com/site/lwfreebsd/Home/files/dmesg-T400-FreeBSD-CURRENT.txt
> kernel config: http://sites.google.com/site/lwfreebsd/Home/files/kernel-CURRENT.txt
Sorry, my fault. Try attached patch.
--
Alexander Motin
-------------- next part --------------
--- local_apic.c.prev 2009-05-01 23:53:37.000000000 +0300
+++ local_apic.c 2009-05-05 01:10:04.000000000 +0300
@@ -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);
More information about the freebsd-mobile
mailing list