[Midnightbsd-cvs] src [8905] trunk/sys: cpususpend_handler: mark AP as resumed only after fully setting up lapic.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Mon Sep 26 18:40:10 EDT 2016


Revision: 8905
          http://svnweb.midnightbsd.org/src/?rev=8905
Author:   laffer1
Date:     2016-09-26 18:40:10 -0400 (Mon, 26 Sep 2016)
Log Message:
-----------
cpususpend_handler: mark AP as resumed only after fully setting up lapic.

Modified Paths:
--------------
    trunk/sys/amd64/amd64/mp_machdep.c
    trunk/sys/i386/i386/mp_machdep.c

Modified: trunk/sys/amd64/amd64/mp_machdep.c
===================================================================
--- trunk/sys/amd64/amd64/mp_machdep.c	2016-09-26 22:39:44 UTC (rev 8904)
+++ trunk/sys/amd64/amd64/mp_machdep.c	2016-09-26 22:40:10 UTC (rev 8905)
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.7 2012/11/23 06:02:40 laffer1 Exp $");
+__MBSDID("$MidnightBSD$");
 
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
@@ -1430,12 +1430,12 @@
 	while (!CPU_ISSET(cpu, &started_cpus))
 		ia32_pause();
 
-	CPU_CLR_ATOMIC(cpu, &started_cpus);
-	CPU_CLR_ATOMIC(cpu, &stopped_cpus);
-
 	/* Resume MCA and local APIC */
 	mca_resume();
 	lapic_setup(0);
+
+	CPU_CLR_ATOMIC(cpu, &started_cpus);
+	CPU_CLR_ATOMIC(cpu, &stopped_cpus);
 }
 
 /*

Modified: trunk/sys/i386/i386/mp_machdep.c
===================================================================
--- trunk/sys/i386/i386/mp_machdep.c	2016-09-26 22:39:44 UTC (rev 8904)
+++ trunk/sys/i386/i386/mp_machdep.c	2016-09-26 22:40:10 UTC (rev 8905)
@@ -1533,12 +1533,12 @@
 	while (!CPU_ISSET(cpu, &started_cpus))
 		ia32_pause();
 
-	CPU_CLR_ATOMIC(cpu, &started_cpus);
-	CPU_CLR_ATOMIC(cpu, &stopped_cpus);
-
 	/* Resume MCA and local APIC */
 	mca_resume();
 	lapic_setup(0);
+
+	CPU_CLR_ATOMIC(cpu, &started_cpus);
+	CPU_CLR_ATOMIC(cpu, &stopped_cpus);
 }
 /*
  * This is called once the rest of the system is up and running and we're



More information about the Midnightbsd-cvs mailing list