Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2025 15:08:26 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: dbedcc169f70 - main - acpi: Mark the GED ithread as sleepable
Message-ID:  <202501241508.50OF8QL6064603@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=dbedcc169f70c924a680e02bc86d7419682a70ac

commit dbedcc169f70c924a680e02bc86d7419682a70ac
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-01-13 05:37:52 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-01-24 15:08:09 +0000

    acpi: Mark the GED ithread as sleepable
    
    We need to complete calling the ACPI method before marking the interrupt
    as complete. If two threads are inspecting the ACPI tables at the same
    time they may both try to lock the ACPI mutex causing one to sleep. If
    this is the ithread it will panic the kernel as this is not allowed.
    
    Update the ged ithread to allow sleeping as it is expected this lock
    will be uncommon enough any sleep will be short.
    
    PR:             283103
    Reviewed by:    markj (earlier version)
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D48284
---
 sys/dev/acpica/acpi_ged.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/dev/acpica/acpi_ged.c b/sys/dev/acpica/acpi_ged.c
index 23e125f277c5..caf911758ed2 100644
--- a/sys/dev/acpica/acpi_ged.c
+++ b/sys/dev/acpica/acpi_ged.c
@@ -244,8 +244,9 @@ acpi_ged_attach(device_t dev)
 		}
 
 		if (bus_setup_intr(dev, sc->evts[i].r,
-			INTR_TYPE_MISC | INTR_MPSAFE, NULL, acpi_ged_intr,
-			&sc->evts[i], &sc->evts[i].cookie) != 0) {
+			INTR_TYPE_MISC | INTR_MPSAFE | INTR_SLEEPABLE |
+			INTR_EXCL, NULL,  acpi_ged_intr, &sc->evts[i],
+			&sc->evts[i].cookie) != 0) {
 			device_printf(dev, "Failed to setup intr %d\n", i);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501241508.50OF8QL6064603>