Skip to content

Commit 3eece72

Browse files
bibo-maoKAGA-KOKO
authored andcommitted
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
1 parent aafd753 commit 3eece72

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ static void eiointc_irq_dispatch(struct irq_desc *desc)
198198

199199
for (i = 0; i < eiointc_priv[0]->vec_count / VEC_COUNT_PER_REG; i++) {
200200
pending = iocsr_read64(EIOINTC_REG_ISR + (i << 3));
201+
202+
/* Skip handling if pending bitmap is zero */
203+
if (!pending)
204+
continue;
205+
206+
/* Clear the IRQs */
201207
iocsr_write64(pending, EIOINTC_REG_ISR + (i << 3));
202208
while (pending) {
203209
int bit = __ffs(pending);

0 commit comments

Comments
 (0)