Skip to content

Commit 960dd88

Browse files
svanheuleMarc Zyngier
authored andcommitted
irqchip/realtek-rtl: Service all pending interrupts
Instead of only servicing the lowest pending interrupt line, make sure all pending SoC interrupts are serviced before exiting the chained handler. This adds a small overhead if only one interrupt is pending, but should prevent rapid re-triggering of the handler. Signed-off-by: Sander Vanheule <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/5082ad3cb8b4eedf55075561b93eff6570299fe1.1641739718.git.sander@svanheule.net
1 parent 91351b5 commit 960dd88

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/irqchip/irq-realtek-rtl.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,20 @@ static void realtek_irq_dispatch(struct irq_desc *desc)
7676
{
7777
struct irq_chip *chip = irq_desc_get_chip(desc);
7878
struct irq_domain *domain;
79-
unsigned int pending;
79+
unsigned long pending;
80+
unsigned int soc_int;
8081

8182
chained_irq_enter(chip, desc);
8283
pending = readl(REG(RTL_ICTL_GIMR)) & readl(REG(RTL_ICTL_GISR));
84+
8385
if (unlikely(!pending)) {
8486
spurious_interrupt();
8587
goto out;
8688
}
89+
8790
domain = irq_desc_get_handler_data(desc);
88-
generic_handle_domain_irq(domain, __ffs(pending));
91+
for_each_set_bit(soc_int, &pending, 32)
92+
generic_handle_domain_irq(domain, soc_int);
8993

9094
out:
9195
chained_irq_exit(chip, desc);

0 commit comments

Comments
 (0)