diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 836858ee8b9..8afdc34178d 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.41 2005/12/13 00:18:19 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.42 2005/12/16 23:00:03 marco Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -134,15 +134,16 @@ #include <ddb/db_extern.h> #endif -#include "acpi.h" #include "isa.h" #include "isadma.h" #include "ksyms.h" -#if NACPI > 0 -extern struct acpi_softc *acpi_softc; +#include "acpi.h" +#if NACPI > 1 +#include <dev/acpi/acpivar.h> #endif + /* the following is used externally (sysctl_hw) */ char machine[] = MACHINE; @@ -902,16 +903,13 @@ haltsys: #endif if (howto & RB_HALT) { - if (howto & RB_POWERDOWN) { #if NACPI > 0 - if (acpi_softc) { - delay(500000); - acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5); - printf("WARNING: powerdown failed!\n"); - } -#endif - } + extern int acpi_s5; + delay(500000); + if (howto & RB_POWERDOWN || acpi_s5) + acpi_powerdown(); +#endif printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); |