summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-05-21 18:53:13 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-05-21 18:53:13 +0000
commitbe91d9969ffe7042be370e525eeaa77c96468daf (patch)
tree9772cd79e72f0e576eef1a6c0e14d48c168c5b31 /sys
parent83b32a91c5bbc0f5765935f9dafe706e66051d95 (diff)
Avoid spinning on the kernel lock with interrupts disabled.
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm64/dev/agintc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c
index 9cbe942fff4..fde4167ce72 100644
--- a/sys/arch/arm64/dev/agintc.c
+++ b/sys/arch/arm64/dev/agintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agintc.c,v 1.32 2021/05/15 11:30:27 kettenis Exp $ */
+/* $OpenBSD: agintc.c,v 1.33 2021/05/21 18:53:12 kettenis Exp $ */
/*
* Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn <drahn@dalerahn.com>
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@@ -925,9 +925,7 @@ agintc_run_handler(struct intrhand *ih, void *frame, int s)
else
arg = frame;
- intr_enable();
handled = ih->ih_func(arg);
- intr_disable();
if (handled)
ih->ih_count.ec_count++;
@@ -976,7 +974,9 @@ agintc_irq_handler(void *frame)
return;
s = agintc_splraise(ih->ih_ipl);
+ intr_enable();
agintc_run_handler(ih, frame, s);
+ intr_disable();
agintc_eoi(irq);
agintc_splx(s);
@@ -985,9 +985,11 @@ agintc_irq_handler(void *frame)
pri = sc->sc_handler[irq].iq_irq_max;
s = agintc_splraise(pri);
+ intr_enable();
TAILQ_FOREACH(ih, &sc->sc_handler[irq].iq_list, ih_list) {
agintc_run_handler(ih, frame, s);
}
+ intr_disable();
agintc_eoi(irq);
agintc_splx(s);