From owner-freebsd-current@FreeBSD.ORG Mon May 4 22:28:52 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3128106567D; Mon, 4 May 2009 22:28:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id DF52A8FC1F; Mon, 4 May 2009 22:28:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [77.52.120.34] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 241908524; Tue, 05 May 2009 01:28:45 +0300 Message-ID: <49FF6C11.5030607@FreeBSD.org> Date: Tue, 05 May 2009 01:28:33 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: Lucius Windschuh References: <49FE1826.4060000@FreeBSD.org> <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com> In-Reply-To: <90a5caac0905041119h70101d12i56863e57b27d2e55@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------080307030500090208040209" Cc: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: Fighting for the power. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 22:28:53 -0000 This is a multi-part message in MIME format. --------------080307030500090208040209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------080307030500090208040209 Content-Type: text/plain; name="local_apic.nohz.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="local_apic.nohz.patch" --- 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); --------------080307030500090208040209--