git: 732778856725 - main - axp81x: Allow the interrupt handler to sleep
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 09:32:00 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=732778856725927a57c2054e9d513e7927b4544a
commit 732778856725927a57c2054e9d513e7927b4544a
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-12 09:00:35 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-12 09:31:32 +0000
axp81x: Allow the interrupt handler to sleep
The interrupt handler reads and writes the registers of the PMU, which
can sleep: the I2C controller the AXP805 is on in the H6 waits for the
end of the transfer, and taking the bus waits when it is busy. The
handler runs in an interrupt thread, which cannot sleep unless the
interrupt is marked as sleepable, so the first interrupt would panic a
kernel with INVARIANTS. Mark it, the interrupt is not shared.
Reported by: llm-postcr
Tested on: A64, H6
---
sys/arm/allwinner/axp81x.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c
index 1c8c0e66e066..a3d8fd3a4126 100644
--- a/sys/arm/allwinner/axp81x.c
+++ b/sys/arm/allwinner/axp81x.c
@@ -1748,7 +1748,8 @@ axp8xx_setup_intr(device_t dev)
}
/* Install interrupt handler */
- error = bus_setup_intr(dev, sc->res, INTR_TYPE_MISC | INTR_MPSAFE,
+ error = bus_setup_intr(dev, sc->res,
+ INTR_TYPE_MISC | INTR_MPSAFE | INTR_EXCL | INTR_SLEEPABLE,
NULL, handler, dev, &sc->ih);
if (error != 0) {
device_printf(dev, "cannot setup interrupt handler\n");