svn commit: r191803 - in head/sys: amd64/amd64 i386/i386

Alexander Motin mav at FreeBSD.org
Tue May 5 01:13:21 UTC 2009


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);


More information about the svn-src-all mailing list