Date: Tue, 27 Mar 2012 23:26:59 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r233579 - head/sys/dev/acpica Message-ID: <201203272326.q2RNQxJC008081@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Tue Mar 27 23:26:58 2012 New Revision: 233579 URL: http://svn.freebsd.org/changeset/base/233579 Log: Restore interrupt state after executing AcpiEnterSleepState(). Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Mar 27 21:23:56 2012 (r233578) +++ head/sys/dev/acpica/acpi.c Tue Mar 27 23:26:58 2012 (r233579) @@ -1968,6 +1968,7 @@ static void acpi_shutdown_final(void *arg, int howto) { struct acpi_softc *sc = (struct acpi_softc *)arg; + register_t intr; ACPI_STATUS status; /* @@ -1983,13 +1984,15 @@ acpi_shutdown_final(void *arg, int howto return; } device_printf(sc->acpi_dev, "Powering system off\n"); - ACPI_DISABLE_IRQS(); + intr = intr_disable(); status = AcpiEnterSleepState(ACPI_STATE_S5, acpi_sleep_flags); - if (ACPI_FAILURE(status)) + if (ACPI_FAILURE(status)) { + intr_restore(intr); device_printf(sc->acpi_dev, "power-off failed - %s\n", AcpiFormatException(status)); - else { + } else { DELAY(1000000); + intr_restore(intr); device_printf(sc->acpi_dev, "power-off failed - timeout\n"); } } else if ((howto & RB_HALT) == 0 && sc->acpi_handle_reboot) { @@ -2641,7 +2644,8 @@ enum acpi_sleep_state { static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, int state) { - ACPI_STATUS status; + register_t intr; + ACPI_STATUS status; enum acpi_sleep_state slp_state; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); @@ -2730,8 +2734,9 @@ acpi_EnterSleepState(struct acpi_softc * if (state == ACPI_STATE_S4) AcpiEnable(); } else { - ACPI_DISABLE_IRQS(); + intr = intr_disable(); status = AcpiEnterSleepState(state, acpi_sleep_flags); + intr_restore(intr); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203272326.q2RNQxJC008081>