diff options
author | Bibo Mao <maobibo@loongson.cn> | 2024-01-30 16:27:21 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-02-13 10:53:14 +0100 |
commit | 3eece72ded7f67776731709702f3d1b9893b6a4f (patch) | |
tree | 7c2bf1345a59971b9dc50242dddfc6fb1d84a2dc /drivers/irqchip | |
parent | aafd753555c0ecb9c7ce11ff14429a34c8c0a14b (diff) |
irqchip/loongson-eiointc: Skip handling if there is no pending interrupt
eiointc_irq_dispatch() iterates over the pending bit registers of the
interrupt controller and evaluates the result even if there is no interrupt
pending in a particular 64bit chunk.
Skip handling and especially the pointless write back for clearing the
non-pending bits if a chunk is empty.
[ tglx: Massaged changelog ]
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://lore.kernel.org/r/20240130082722.2912576-3-maobibo@loongson.cn
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-loongson-eiointc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 1623cd779175..fad22e21e1c8 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -198,6 +198,12 @@ static void eiointc_irq_dispatch(struct irq_desc *desc) for (i = 0; i < eiointc_priv[0]->vec_count / VEC_COUNT_PER_REG; i++) { pending = iocsr_read64(EIOINTC_REG_ISR + (i << 3)); + + /* Skip handling if pending bitmap is zero */ + if (!pending) + continue; + + /* Clear the IRQs */ iocsr_write64(pending, EIOINTC_REG_ISR + (i << 3)); while (pending) { int bit = __ffs(pending); |