svn commit: r297218 - in head/sys: amd64/amd64 i386/i386 x86/x86

John Baldwin jhb at FreeBSD.org
Thu Mar 24 00:24:09 UTC 2016


Author: jhb
Date: Thu Mar 24 00:24:07 2016
New Revision: 297218
URL: https://svnweb.freebsd.org/changeset/base/297218

Log:
  Enable interrupts on the BSP once all PICs are initialized.
  
  This moves the enabling of interrupts slightly earlier (the old location
  was still before devices were enumerated and probed) and does it in the
  interrupt code (rather than in the device configuration code).  This
  also avoids tripping over an assertion on the first TLB shootdown with
  earlier AP startup.
  
  Reviewed by:	kib
  Sponsored by:	Netflix
  Differential Revision:	https://reviews.freebsd.org/D5710

Modified:
  head/sys/amd64/amd64/autoconf.c
  head/sys/i386/i386/autoconf.c
  head/sys/x86/x86/intr_machdep.c

Modified: head/sys/amd64/amd64/autoconf.c
==============================================================================
--- head/sys/amd64/amd64/autoconf.c	Wed Mar 23 22:07:13 2016	(r297217)
+++ head/sys/amd64/amd64/autoconf.c	Thu Mar 24 00:24:07 2016	(r297218)
@@ -100,13 +100,6 @@ configure(dummy)
 	void *dummy;
 {
 
-	/*
-	 * Enable interrupts on the processor.  The interrupts are still
-	 * disabled in the interrupt controllers until interrupt handlers
-	 * are registered.
-	 */
-	enable_intr();
-
 	/* initialize new bus architecture */
 	root_bus_configure();
 

Modified: head/sys/i386/i386/autoconf.c
==============================================================================
--- head/sys/i386/i386/autoconf.c	Wed Mar 23 22:07:13 2016	(r297217)
+++ head/sys/i386/i386/autoconf.c	Thu Mar 24 00:24:07 2016	(r297218)
@@ -101,13 +101,6 @@ configure(dummy)
 	void *dummy;
 {
 
-	/*
-	 * Enable interrupts on the processor.  The interrupts are still
-	 * disabled in the interrupt controllers until interrupt handlers
-	 * are registered.
-	 */
-	enable_intr();
-
 	/* initialize new bus architecture */
 	root_bus_configure();
 

Modified: head/sys/x86/x86/intr_machdep.c
==============================================================================
--- head/sys/x86/x86/intr_machdep.c	Wed Mar 23 22:07:13 2016	(r297217)
+++ head/sys/x86/x86/intr_machdep.c	Thu Mar 24 00:24:07 2016	(r297218)
@@ -393,6 +393,21 @@ intr_init(void *dummy __unused)
 }
 SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL);
 
+static void
+intr_init_final(void *dummy __unused)
+{
+
+	/*
+	 * Enable interrupts on the BSP after all of the interrupt
+	 * controllers are initialized.  Device interrupts are still
+	 * disabled in the interrupt controllers until interrupt
+	 * handlers are registered.  Interrupts are enabled on each AP
+	 * after their first context switch.
+	 */
+	enable_intr();
+}
+SYSINIT(intr_init_final, SI_SUB_INTR, SI_ORDER_ANY, intr_init_final, NULL);
+
 #ifndef DEV_ATPIC
 /* Initialize the two 8259A's to a known-good shutdown state. */
 void


More information about the svn-src-head mailing list