Skip to content

Commit cd1752d

Browse files
author
Marc Zyngier
committed
genirq: Walk the irq_data hierarchy when resending an interrupt
On resending an interrupt, we only check the outermost irqchip for a irq_retrigger callback. However, this callback could be implemented at an inner level. Use irq_chip_retrigger_hierarchy() in this case. Reviewed-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 9123e3a commit cd1752d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎kernel/irq/resend.c‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ static int irq_sw_resend(struct irq_desc *desc)
8686
}
8787
#endif
8888

89+
static int try_retrigger(struct irq_desc *desc)
90+
{
91+
if (desc->irq_data.chip->irq_retrigger)
92+
return desc->irq_data.chip->irq_retrigger(&desc->irq_data);
93+
94+
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
95+
return irq_chip_retrigger_hierarchy(&desc->irq_data);
96+
#else
97+
return 0;
98+
#endif
99+
}
100+
89101
/*
90102
* IRQ resend
91103
*
@@ -113,8 +125,7 @@ int check_irq_resend(struct irq_desc *desc, bool inject)
113125

114126
desc->istate &= ~IRQS_PENDING;
115127

116-
if (!desc->irq_data.chip->irq_retrigger ||
117-
!desc->irq_data.chip->irq_retrigger(&desc->irq_data))
128+
if (!try_retrigger(desc))
118129
err = irq_sw_resend(desc);
119130

120131
/* If the retrigger was successfull, mark it with the REPLAY bit */

0 commit comments

Comments
 (0)