Re: Fighting for the power.

Alexander Motin <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile,gmane.os.freebsd.current
Message-ID <[email protected]>
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

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
local_apic.nohz.patch (text/plain, 465 B)
--- 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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.