summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/hibernate_machdep.c19
-rw-r--r--sys/arch/i386/i386/hibernate_machdep.c4
2 files changed, 6 insertions, 17 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c
index ec9f0b04dc9..f81320e2880 100644
--- a/sys/arch/amd64/amd64/hibernate_machdep.c
+++ b/sys/arch/amd64/amd64/hibernate_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hibernate_machdep.c,v 1.16 2013/10/20 11:16:56 deraadt Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.17 2013/10/20 20:03:03 mlarkin Exp $ */
/*
* Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org>
@@ -395,25 +395,12 @@ hibernate_disable_intr_machdep(void)
void
hibernate_quiesce_cpus(void)
{
- int i;
-
KASSERT(CPU_IS_PRIMARY(curcpu()));
/* Start the hatched (but idling) APs */
cpu_boot_secondary_processors();
- /*
- * Wait for cpus to halt so we know their FPU state has been
- * saved and their caches have been written back.
- */
- x86_broadcast_ipi(X86_IPI_HALT_REALMODE);
- for (i = 0; i < ncpus; i++) {
- struct cpu_info *ci = cpu_info[i];
-
- if (CPU_IS_PRIMARY(ci))
- continue;
- while (ci->ci_flags & CPUF_RUNNING)
- ;
- }
+ /* Now shut them down */
+ acpi_sleep_mp();
}
#endif /* MULTIPROCESSOR */
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c
index cd600eaf517..34a6c0fca15 100644
--- a/sys/arch/i386/i386/hibernate_machdep.c
+++ b/sys/arch/i386/i386/hibernate_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hibernate_machdep.c,v 1.28 2013/10/20 11:16:56 deraadt Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.29 2013/10/20 20:03:03 mlarkin Exp $ */
/*
* Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org>
@@ -339,6 +339,8 @@ hibernate_disable_intr_machdep(void)
void
hibernate_quiesce_cpus(void)
{
+ KASSERT(CPU_IS_PRIMARY(curcpu()));
+
/* Start the hatched (but idling) APs */
cpu_boot_secondary_processors();