Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2009 01:13:20 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191803 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <200905050113.n451DK6D062907@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905050113.n451DK6D062907>