summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2013-02-02 12:04:32 +0000
committeravg <avg@FreeBSD.org>2013-02-02 12:04:32 +0000
commit2e2156704e3464a21d9828a2a25672095f24255d (patch)
treed5f7d05c3e5cce0a2fb3b0f443c815f73d9636f4 /sys
parent09a43450b8e300637ed1d8238be2e28d3a727adb (diff)
downloadFreeBSD-src-2e2156704e3464a21d9828a2a25672095f24255d.zip
FreeBSD-src-2e2156704e3464a21d9828a2a25672095f24255d.tar.gz
cpususpend_handler: mark AP as resumed only after fully setting up lapic
Reviewed by: jhb Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>, KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> MFC after: 12 days
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/mp_machdep.c4
-rw-r--r--sys/i386/i386/mp_machdep.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index d2e4aad..31dbb3f 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -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);
}
/*
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 89c0430..a7046d8 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -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
OpenPOWER on IntegriCloud