Re: Fighting for the power.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Tue, 05 May 2009 01:28:33 +0300
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

--- local_apic.c.prev	2009-05-01 23:53:37.000000000 +0300
+++ local_apic.c	2009-05-05 01:10:04.000000000 +0300
_at__at_ -319,7 +319,7 _at__at_ 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);
Received on Mon May 04 2009 - 20:28:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC