diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2019-05-13 20:55:23 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2019-05-13 20:55:23 +0000 |
commit | 55fabf1f16f5b6fbd63603d80bdb7fe0bb392e70 (patch) | |
tree | bb462eabefc54be9d8886e0c7270500792ad6871 /sys/arch | |
parent | 9f71ac3fed30935fcd0534a0e4aed995711e24bc (diff) |
Move idepth tracking out of interrupt controller into common layer.
'looks good' kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/arm64/intr.c | 7 | ||||
-rw-r--r-- | sys/arch/arm64/dev/agintc.c | 12 |
2 files changed, 7 insertions, 12 deletions
diff --git a/sys/arch/arm64/arm64/intr.c b/sys/arch/arm64/arm64/intr.c index 8daaaf1bfeb..8e58d14d4d9 100644 --- a/sys/arch/arm64/arm64/intr.c +++ b/sys/arch/arm64/arm64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.13 2018/08/08 11:06:33 patrick Exp $ */ +/* $OpenBSD: intr.c,v 1.14 2019/05/13 20:55:22 drahn Exp $ */ /* * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> * @@ -56,8 +56,11 @@ void (*arm_intr_dispatch)(void *) = arm_dflt_intr; void arm_cpu_intr(void *frame) { - /* XXX - change this to have irq_dispatch use function pointer */ + struct cpu_info *ci = curcpu(); + + ci->ci_idepth++; (*arm_intr_dispatch)(frame); + ci->ci_idepth--; } void arm_dflt_intr(void *frame) diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 2f2206c24fe..eab51cc8337 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.17 2019/05/12 16:36:30 kettenis Exp $ */ +/* $OpenBSD: agintc.c,v 1.18 2019/05/13 20:55:22 drahn Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn <drahn@dalerahn.com> * Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org> @@ -907,12 +907,10 @@ agintc_run_handler(struct intrhand *ih, void *frame, int s) void agintc_irq_handler(void *frame) { - struct cpu_info *ci = curcpu(); struct agintc_softc *sc = agintc_sc; struct intrhand *ih; int irq, pri, s; - ci->ci_idepth++; irq = agintc_iack(); #ifdef DEBUG_AGINTC @@ -931,29 +929,24 @@ agintc_irq_handler(void *frame) if (irq == 1023) { sc->sc_spur.ec_count++; - ci->ci_idepth--; return; } if ((irq >= sc->sc_nintr && irq < LPI_BASE) || irq >= LPI_BASE + sc->sc_nlpi) { - ci->ci_idepth--; return; } if (irq >= LPI_BASE) { ih = sc->sc_lpi_handler[irq - LPI_BASE]; - if (ih == NULL) { - ci->ci_idepth--; + if (ih == NULL) return; - } s = agintc_splraise(ih->ih_ipl); agintc_run_handler(ih, frame, s); agintc_eoi(irq); agintc_splx(s); - ci->ci_idepth--; return; } @@ -965,7 +958,6 @@ agintc_irq_handler(void *frame) agintc_eoi(irq); agintc_splx(s); - ci->ci_idepth--; } void * |