diff options
author | jkim <jkim@FreeBSD.org> | 2012-03-20 20:37:23 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-03-20 20:37:23 +0000 |
commit | 107d21a0f4a0fa5f29290cca23e94c24fe945998 (patch) | |
tree | 7f1c4a7d43de6aad4175caaa71a4afda27e1aaaa /sys/amd64/acpica | |
parent | 8779621b7548b31a22a5c2b381c2561f8ff97a88 (diff) | |
download | FreeBSD-src-107d21a0f4a0fa5f29290cca23e94c24fe945998.zip FreeBSD-src-107d21a0f4a0fa5f29290cca23e94c24fe945998.tar.gz |
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
Diffstat (limited to 'sys/amd64/acpica')
-rw-r--r-- | sys/amd64/acpica/acpi_wakeup.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |