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

Andriy Gapon avg at FreeBSD.org
Sat Feb 2 12:04:33 UTC 2013


Author: avg
Date: Sat Feb  2 12:04:32 2013
New Revision: 246248
URL: http://svnweb.freebsd.org/changeset/base/246248

Log:
  cpususpend_handler: mark AP as resumed only after fully setting up lapic
  
  Reviewed by:	jhb
  Tested by:	Sergey V. Dyatko <sergey.dyatko at gmail.com>,
  		KAHO Toshikazu <kaho at elam.kais.kyoto-u.ac.jp>
  MFC after:	12 days

Modified:
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/i386/i386/mp_machdep.c

Modified: head/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- head/sys/amd64/amd64/mp_machdep.c	Sat Feb  2 12:02:42 2013	(r246247)
+++ head/sys/amd64/amd64/mp_machdep.c	Sat Feb  2 12:04:32 2013	(r246248)
@@ -1431,11 +1431,11 @@ cpususpend_handler(void)
 	while (!CPU_ISSET(cpu, &started_cpus))
 		ia32_pause();
 
-	CPU_CLR_ATOMIC(cpu, &started_cpus);
-
 	/* Resume MCA and local APIC */
 	mca_resume();
 	lapic_setup(0);
+
+	CPU_CLR_ATOMIC(cpu, &started_cpus);
 }
 
 /*

Modified: head/sys/i386/i386/mp_machdep.c
==============================================================================
--- head/sys/i386/i386/mp_machdep.c	Sat Feb  2 12:02:42 2013	(r246247)
+++ head/sys/i386/i386/mp_machdep.c	Sat Feb  2 12:04:32 2013	(r246248)
@@ -1528,11 +1528,11 @@ cpususpend_handler(void)
 	while (!CPU_ISSET(cpu, &started_cpus))
 		ia32_pause();
 
-	CPU_CLR_ATOMIC(cpu, &started_cpus);
-
 	/* Resume MCA and local APIC */
 	mca_resume();
 	lapic_setup(0);
+
+	CPU_CLR_ATOMIC(cpu, &started_cpus);
 }
 /*
  * This is called once the rest of the system is up and running and we're


More information about the svn-src-all mailing list