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.dya...@gmail.com>,
                KAHO Toshikazu <k...@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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to