mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
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.
This commit is contained in:
parent
7d34f41a7a
commit
272489fe59
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193847
@ -120,7 +120,8 @@ arm_handler_execute(struct trapframe *frame, int irqnb)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
PCPU_INC(cnt.v_intr);
|
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]]++;
|
intrcnt[intrcnt_tab[i]]++;
|
||||||
event = intr_events[i];
|
event = intr_events[i];
|
||||||
if (intr_event_handle(event, frame) != 0) {
|
if (intr_event_handle(event, frame) != 0) {
|
||||||
|
@ -702,9 +702,8 @@ arm_mask_irq(uintptr_t nb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq()
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
|
|
||||||
int status;
|
int status;
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
#include <machine/psl.h>
|
#include <machine/psl.h>
|
||||||
|
|
||||||
int arm_get_next_irq(void);
|
int arm_get_next_irq(int);
|
||||||
void arm_mask_irq(uintptr_t);
|
void arm_mask_irq(uintptr_t);
|
||||||
void arm_unmask_irq(uintptr_t);
|
void arm_unmask_irq(uintptr_t);
|
||||||
void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*),
|
void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*),
|
||||||
|
@ -137,7 +137,7 @@ static devclass_t mv_ic_devclass;
|
|||||||
DRIVER_MODULE(ic, mbus, mv_ic_driver, mv_ic_devclass, 0, 0);
|
DRIVER_MODULE(ic, mbus, mv_ic_driver, mv_ic_devclass, 0, 0);
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq(void)
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ static uint32_t sa11x0_irq_mask = 0xfffffff;
|
|||||||
extern vm_offset_t saipic_base;
|
extern vm_offset_t saipic_base;
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq()
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ i80321_iintsrc_read(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq()
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ arm_unmask_irq(uintptr_t nb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq(void)
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
val = intpnd0_read() & intr_enabled0;
|
val = intpnd0_read() & intr_enabled0;
|
||||||
|
@ -202,7 +202,7 @@ ixp435_irq_read(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq(void)
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
uint32_t irq;
|
uint32_t irq;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ static devclass_t pxa_icu_devclass;
|
|||||||
DRIVER_MODULE(pxaicu, pxa, pxa_icu_driver, pxa_icu_devclass, 0, 0);
|
DRIVER_MODULE(pxaicu, pxa, pxa_icu_driver, pxa_icu_devclass, 0, 0);
|
||||||
|
|
||||||
int
|
int
|
||||||
arm_get_next_irq()
|
arm_get_next_irq(int last __unused)
|
||||||
{
|
{
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user