summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2005-02-21 23:38:41 +0000
committernjl <njl@FreeBSD.org>2005-02-21 23:38:41 +0000
commit55652bc3e268648e38d9b9216beab417355c8671 (patch)
tree3704b86910aa7afcc737f2ded8668406f7168519 /sys/dev/acpica
parent26df80bf2cb36ff3fb93ad6eef085062a90896c6 (diff)
downloadFreeBSD-src-55652bc3e268648e38d9b9216beab417355c8671.zip
FreeBSD-src-55652bc3e268648e38d9b9216beab417355c8671.tar.gz
Since the GPE handler is directly called by ACPI-CA and it may have unknown
locks held, specify the ACPI_ISR flag to keep it from acquiring any more mutexes (which could potentially sleep.) This should fix "could sleep" warning messages on the following path: msleep() AcpiOsWaitSemaphore() AcpiUtAcquireMutex() AcpiDisableGpe() EcGpeHandler() AcpiEvGpeDispatch() AcpiEvGpeDetect() AcpiEvGpeDetect() AcpiEvSciXruptHandler()
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_ec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index 50cb847..ae318c3 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -726,15 +726,20 @@ EcGpeHandler(void *Context)
KASSERT(Context != NULL, ("EcGpeHandler called with NULL"));
- /* Disable further GPEs while we handle this one. */
- AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR);
+ /*
+ * Disable further GPEs while we handle this one. Since we are directly
+ * called by ACPI-CA and it may have unknown locks held, we specify the
+ * ACPI_ISR flag to keep it from acquiring any more mutexes (which could
+ * potentially sleep.)
+ */
+ AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR);
/* Schedule the GPE query handler. */
Status = AcpiOsQueueForExecution(OSD_PRIORITY_GPE, EcGpeQueryHandler,
Context);
if (ACPI_FAILURE(Status)) {
printf("Queuing GPE query handler failed.\n");
- Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR);
+ Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR);
if (ACPI_FAILURE(Status))
printf("EcGpeHandler: AcpiEnableEvent failed\n");
}
OpenPOWER on IntegriCloud