From 107d21a0f4a0fa5f29290cca23e94c24fe945998 Mon Sep 17 00:00:00 2001 From: jkim Date: Tue, 20 Mar 2012 20:37:23 +0000 Subject: Fix another witness panic. We cannot enter critical section at all because AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215 (r231844). To evaluate the method, we need malloc(9), which may sleep. Reported by: bschmidt MFC after: 3 days --- sys/amd64/acpica/acpi_wakeup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/amd64/acpica') diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c index 44ed980..9af035c 100644 --- a/sys/amd64/acpica/acpi_wakeup.c +++ b/sys/amd64/acpica/acpi_wakeup.c @@ -223,6 +223,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) #ifdef SMP cpuset_t wakeup_cpus; #endif + register_t rf; ACPI_STATUS status; int ret; @@ -241,8 +242,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); + rf = intr_disable(); intr_suspend(); - spinlock_enter(); if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); @@ -299,8 +300,8 @@ out: #endif mca_resume(); - spinlock_exit(); intr_resume(); + intr_restore(rf); AcpiSetFirmwareWakingVector(0); -- cgit v1.1