From b1efa5c2364072fa6038c1c7224c788340621456 Mon Sep 17 00:00:00 2001 From: Steven Lee Date: Thu, 20 Mar 2025 17:25:43 +0800 Subject: [PATCH] hw/intc/aspeed: Fix IRQ handler mask check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Updated the IRQ handler mask check to AND with select variable. This ensures that the interrupt service routine is correctly triggered for the interrupts within the same irq group. For example, both `eth0` and the debug UART are handled in `GICINT132`. Without this fix, the debug console may hang if the `eth0` ISR is not handled. Signed-off-by: Steven Lee Change-Id: Ic3609eb72218dfd68be6057d78b8953b18828709 Reviewed-by: Cédric Le Goater Fixes: d831c5fd8682 ("aspeed/intc: Add AST2700 support") Link: https://lore.kernel.org/qemu-devel/20250320092543.4040672-2-steven_lee@aspeedtech.com Signed-off-by: Cédric Le Goater (cherry picked from commit 7b8cbe5162e69ad629c5326bf3c158b81857955d) (Mjt: update for before v9.2.0-2466-g5824e8bf6beb "hw/intc/aspeed: Introduce IRQ handler function to reduce code duplication") Signed-off-by: Michael Tokarev --- hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/aspeed_intc.c b/hw/intc/aspeed_intc.c index 126b711b943..495fd2bdfa1 100644 --- a/hw/intc/aspeed_intc.c +++ b/hw/intc/aspeed_intc.c @@ -92,7 +92,7 @@ static void aspeed_intc_set_irq(void *opaque, int irq, int level) trace_aspeed_intc_select(select); - if (s->mask[irq] || s->regs[status_addr]) { + if ((s->mask[irq] & select) || (s->regs[status_addr] & select)) { /* * a. mask is not 0 means in ISR mode * sources interrupt routine are executing. -- 2.39.5