summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index d7caf9980c2..14e811e0ca3 100644
--- a/sys/arch/i386/i386/acpi_machdep.c
+++ b/sys/arch/i386/i386/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.30 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.31 2010/07/01 00:48:48 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -243,8 +243,12 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
if (sc->sc_facs->version == 1)
sc->sc_facs->x_wakeup_vector = 0;
- /* Copy the current cpu registers into a safe place for resume. */
+ /* Copy the current cpu registers into a safe place for resume.
+ * acpi_savecpu actually returns twice - once in the suspend
+ * path and once in the resume path (see setjmp(3)).
+ */
if (acpi_savecpu()) {
+ /* Suspend path */
npxsave_cpu(curcpu(), 1);
#ifdef MULTIPROCESSOR
i386_broadcast_ipi(I386_IPI_FLUSH_FPU);
@@ -255,15 +259,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
panic("%s: acpi_enter_sleep_state failed", DEVNAME(sc));
}
- /*
- * On resume, the execution path will actually occur here.
- * This is because we previously saved the stack location
- * in acpi_savecpu, and issued a far jmp to the restore
- * routine in the wakeup code. This means we are
- * returning to the location immediately following the
- * last call instruction - after the call to acpi_savecpu.
- */
-
+ /* Resume path continues here */
#if 0
/* Temporarily disabled for debugging purposes */
/* Reset the wakeup vector to avoid resuming on reboot */