[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <170781822030.398.1776508583120983829.tip-bot2@tip-bot2>
Date: Tue, 13 Feb 2024 09:57:00 -0000
From: "tip-bot2 for Bibo Mao" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Bibo Mao <maobibo@...ngson.cn>, Thomas Gleixner <tglx@...utronix.de>,
Huacai Chen <chenhuacai@...ngson.cn>, x86@...nel.org,
linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/core] irqchip/loongson-eiointc: Skip handling if there is
no pending interrupt
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 3eece72ded7f67776731709702f3d1b9893b6a4f
Gitweb: https://git.kernel.org/tip/3eece72ded7f67776731709702f3d1b9893b6a4f
Author: Bibo Mao <maobibo@...ngson.cn>
AuthorDate: Tue, 30 Jan 2024 16:27:21 +08:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 13 Feb 2024 10:53:14 +01:00
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@...ngson.cn>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Huacai Chen <chenhuacai@...ngson.cn>
Link: https://lore.kernel.org/r/20240130082722.2912576-3-maobibo@loongson.cn
---
drivers/irqchip/irq-loongson-eiointc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 1623cd7..fad22e2 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);
Powered by blists - more mailing lists