diff options
author | marcel <marcel@FreeBSD.org> | 2009-06-09 18:18:41 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-06-09 18:18:41 +0000 |
commit | 898dda825cfcffcc2b924756406dffce9cf7e252 (patch) | |
tree | e846e3361c689dff739f93bdcff26f51b315917d /sys/arm | |
parent | 6550c66aa23e544ae0721ff433e77661cc5c4098 (diff) | |
download | FreeBSD-src-898dda825cfcffcc2b924756406dffce9cf7e252.zip FreeBSD-src-898dda825cfcffcc2b924756406dffce9cf7e252.tar.gz |
Pass the previously returned IRQ back to arm_get_next_irq() so that
the implementation can guarantee forward progress in the event of
a stuck interrupt or interrupt storm. This is especially critical
for fast interrupt handlers, as they can cause a hard hang in that
case. When first called, arm_get_next_irq() is passed -1.
Obtained from: Juniper Networks, Inc.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/intr.c | 3 | ||||
-rw-r--r-- | sys/arm/at91/at91.c | 3 | ||||
-rw-r--r-- | sys/arm/include/intr.h | 2 | ||||
-rw-r--r-- | sys/arm/mv/ic.c | 2 | ||||
-rw-r--r-- | sys/arm/sa11x0/sa11x0_irqhandler.c | 2 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/i80321.c | 2 | ||||
-rw-r--r-- | sys/arm/xscale/i8134x/i81342.c | 2 | ||||
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425.c | 2 | ||||
-rw-r--r-- | sys/arm/xscale/pxa/pxa_icu.c | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/sys/arm/arm/intr.c b/sys/arm/arm/intr.c index 85c2fd8..1816064 100644 --- a/sys/arm/arm/intr.c +++ b/sys/arm/arm/intr.c @@ -120,7 +120,8 @@ arm_handler_execute(struct trapframe *frame, int irqnb) int i; PCPU_INC(cnt.v_intr); - while ((i = arm_get_next_irq()) != -1) { + i = -1; + while ((i = arm_get_next_irq(i)) != -1) { intrcnt[intrcnt_tab[i]]++; event = intr_events[i]; if (intr_event_handle(event, frame) != 0) { diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c index 222fce0..efc731b 100644 --- a/sys/arm/at91/at91.c +++ b/sys/arm/at91/at91.c @@ -702,9 +702,8 @@ arm_mask_irq(uintptr_t nb) } int -arm_get_next_irq() +arm_get_next_irq(int last __unused) { - int status; int irq; diff --git a/sys/arm/include/intr.h b/sys/arm/include/intr.h index 619c5e1..6dc0247 100644 --- a/sys/arm/include/intr.h +++ b/sys/arm/include/intr.h @@ -56,7 +56,7 @@ #include <machine/psl.h> -int arm_get_next_irq(void); +int arm_get_next_irq(int); void arm_mask_irq(uintptr_t); void arm_unmask_irq(uintptr_t); void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*), diff --git a/sys/arm/mv/ic.c b/sys/arm/mv/ic.c index d449e16..8861dc1 100644 --- a/sys/arm/mv/ic.c +++ b/sys/arm/mv/ic.c @@ -137,7 +137,7 @@ static devclass_t mv_ic_devclass; DRIVER_MODULE(ic, mbus, mv_ic_driver, mv_ic_devclass, 0, 0); int -arm_get_next_irq(void) +arm_get_next_irq(int last __unused) { int irq; diff --git a/sys/arm/sa11x0/sa11x0_irqhandler.c b/sys/arm/sa11x0/sa11x0_irqhandler.c index 1935418..e423055 100644 --- a/sys/arm/sa11x0/sa11x0_irqhandler.c +++ b/sys/arm/sa11x0/sa11x0_irqhandler.c @@ -108,7 +108,7 @@ static uint32_t sa11x0_irq_mask = 0xfffffff; extern vm_offset_t saipic_base; int -arm_get_next_irq() +arm_get_next_irq(int last __unused) { int irq; diff --git a/sys/arm/xscale/i80321/i80321.c b/sys/arm/xscale/i80321/i80321.c index c7b6ee6..053fe78 100644 --- a/sys/arm/xscale/i80321/i80321.c +++ b/sys/arm/xscale/i80321/i80321.c @@ -240,7 +240,7 @@ i80321_iintsrc_read(void) } int -arm_get_next_irq() +arm_get_next_irq(int last __unused) { int irq; diff --git a/sys/arm/xscale/i8134x/i81342.c b/sys/arm/xscale/i8134x/i81342.c index 072685b..2d8783e 100644 --- a/sys/arm/xscale/i8134x/i81342.c +++ b/sys/arm/xscale/i8134x/i81342.c @@ -295,7 +295,7 @@ arm_unmask_irq(uintptr_t nb) } int -arm_get_next_irq(void) +arm_get_next_irq(int last __unused) { uint32_t val; val = intpnd0_read() & intr_enabled0; diff --git a/sys/arm/xscale/ixp425/ixp425.c b/sys/arm/xscale/ixp425/ixp425.c index 9ae3b75..0267d9f 100644 --- a/sys/arm/xscale/ixp425/ixp425.c +++ b/sys/arm/xscale/ixp425/ixp425.c @@ -202,7 +202,7 @@ ixp435_irq_read(void) } int -arm_get_next_irq(void) +arm_get_next_irq(int last __unused) { uint32_t irq; diff --git a/sys/arm/xscale/pxa/pxa_icu.c b/sys/arm/xscale/pxa/pxa_icu.c index 2cb2cbb..0d7a519 100644 --- a/sys/arm/xscale/pxa/pxa_icu.c +++ b/sys/arm/xscale/pxa/pxa_icu.c @@ -128,7 +128,7 @@ static devclass_t pxa_icu_devclass; DRIVER_MODULE(pxaicu, pxa, pxa_icu_driver, pxa_icu_devclass, 0, 0); int -arm_get_next_irq() +arm_get_next_irq(int last __unused) { int irq; |