git: b2dd4970c7b5 - main - dev/gpio: Mask all pl011 interrupts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 24 Oct 2024 10:36:35 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=b2dd4970c7b5c20bef35a8924cc2a5f54ea4cb30
commit b2dd4970c7b5c20bef35a8924cc2a5f54ea4cb30
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2024-10-23 16:57:31 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-10-24 10:20:48 +0000
dev/gpio: Mask all pl011 interrupts
The firmware may have unmasked pl011 interrupts. If we don't have a
device to handle one the kernel will print a spurious interrupt
warning. Rather than print the warning mask all interrupts until we
are ready to handle them.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D46863
---
sys/dev/gpio/pl061.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/dev/gpio/pl061.c b/sys/dev/gpio/pl061.c
index 76754fead635..cc39790322b6 100644
--- a/sys/dev/gpio/pl061.c
+++ b/sys/dev/gpio/pl061.c
@@ -460,6 +460,9 @@ pl061_attach(device_t dev)
goto free_mem;
}
+ /* Mask all interrupts. They will be unmasked as needed later */
+ bus_write_1(sc->sc_mem_res, PL061_INTMASK, 0);
+
ret = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
pl061_intr, NULL, sc, &sc->sc_irq_hdlr);
if (ret) {