Date: Tue, 05 May 2009 01:28:33 +0300 From: Alexander Motin <mav@FreeBSD.org> To: Lucius Windschuh <lwindschuh@googlemail.com> Cc: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Fighting for the power. Message-ID: <49FF6C11.5030607@FreeBSD.org> In-Reply-To: <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com> References: <49FE1826.4060000@FreeBSD.org> <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Lucius Windschuh wrote:
> I tried this on CURRENT@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
[-- Attachment #2 --]
--- 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49FF6C11.5030607>
