From owner-svn-src-all@FreeBSD.ORG Tue May 5 01:13:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FADC1065673; Tue, 5 May 2009 01:13:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F24F78FC13; Tue, 5 May 2009 01:13:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n451DK5p062909; Tue, 5 May 2009 01:13:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n451DK6D062907; Tue, 5 May 2009 01:13:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905050113.n451DK6D062907@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 May 2009 01:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191803 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 01:13:21 -0000 Author: mav Date: Tue May 5 01:13:20 2009 New Revision: 191803 URL: http://svn.freebsd.org/changeset/base/191803 Log: Do not try to initialize LAPIC timer if we are not going to use it. It solves assertion, when kernel built with INVARIANTS configured to use i8254 timer. Modified: head/sys/amd64/amd64/local_apic.c head/sys/i386/i386/local_apic.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Mon May 4 23:36:20 2009 (r191802) +++ head/sys/amd64/amd64/local_apic.c Tue May 5 01:13:20 2009 (r191803) @@ -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); Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Mon May 4 23:36:20 2009 (r191802) +++ head/sys/i386/i386/local_apic.c Tue May 5 01:13:20 2009 (r191803) @@ -321,7 +321,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);