summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-19 06:46:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-03-19 06:46:29 +0000
commitb38230acc5b53a3624572ec45d3098535084b236 (patch)
treea122214bb1ea65ab2a068672518414b384c7e4ed /sys/arch/amd64
parentbd3bb490d163301ada25a55e659b5b387f73c99e (diff)
in acpi_sleep_mp() properly flush fpu and halt the AP's
found when i told mlarkin to look at it for re-use in a different place ok mlarkin
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 3b50812f384..93147f53f41 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.52 2012/11/27 17:38:45 pirofti Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.53 2013/03/19 06:46:27 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -361,7 +361,9 @@ acpi_sleep_mp(void)
for (i = 0; i < ncpus; i++) {
struct cpu_info *ci = cpu_info[i];
- while (!CPU_IS_PRIMARY(curcpu()) && ci->ci_fpcurproc)
+ if (CPU_IS_PRIMARY(ci))
+ continue;
+ while (ci->ci_fpcurproc)
;
}
@@ -370,8 +372,9 @@ acpi_sleep_mp(void)
for (i = 0; i < ncpus; i++) {
struct cpu_info *ci = cpu_info[i];
- while (!CPU_IS_PRIMARY(curcpu()) &&
- (ci->ci_flags & CPUF_RUNNING))
+ if (CPU_IS_PRIMARY(ci))
+ continue;
+ while (ci->ci_flags & CPUF_RUNNING)
;
}
}