hw/intc/aspeed: Fix IRQ handler mask check
cover hw/intc/aspeed: Fix IRQ handler mask check
Dear maintainers,
This patch addresses an issue in the ast27x0 interrupt controller where the IRQ handler mask check does not correctly apply the select variable. The fix ensures that the interrupt service routine (ISR) is triggered appropriately for interrupts within the same IRQ group.
Please help to review this patch at your convenience.
Best regards,
Steven Lee
Steven Lee (1):
hw/intc/aspeed: Fix IRQ handler mask check
hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/1 hw/intc/aspeed: Fix IRQ handler mask check
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.
--- hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/aspeed_intc.c +1 -1
@@ -111,7 +111,7 @@ static void aspeed_intc_set_irq_handler(AspeedINTCState *s, outpin_idx = intc_irq->outpin_idx; inpin_idx = intc_irq->inpin_idx; -if (s->mask[inpin_idx] || s->regs[status_reg]) { +if ((s->mask[inpin_idx] & select) || (s->regs[status_reg] & select)) {/* * a. mask is not 0 means in ISR mode * sources interrupt routine are executing.
Signature · 1 line
2.43.0
Hello Steven,
Quoted 11 lines · Steven Lee
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
eth0and the debug UART are handled inGICINT132. Without this fix, the debug console may hang if theeth0ISR is not handled.Signed-off-by Steven Lee <[email protected]>Change-Id Ic3609eb72218dfd68be6057d78b8953b18828709---
I think the issue was introduced by the initial commit :
d831c5fd8682 ("aspeed/intc: Add AST2700 support")
Is that correct ?
Thanks,
C.
Quoted 16 lines
hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/intc/aspeed_intc.c +1
-1@@ -111,7 +111,7 @@ static void aspeed_intc_set_irq_handler(AspeedINTCState *s, outpin_idx = intc_irq->outpin_idx; inpin_idx = intc_irq->inpin_idx; -if (s->mask[inpin_idx] || s->regs[status_reg]) { +if ((s->mask[inpin_idx] & select) || (s->regs[status_reg] & select)) {/* * a. mask is not 0 means in ISR mode * sources interrupt routine are executing.
Hi Cédric,
Quoted 28 lines
-----Original Message-----
From: Cédric Le Goater <[email protected]>
Sent: Thursday, March 20, 2025 11:29 PM
To: Steven Lee <[email protected]>; Peter Maydell <[email protected]>; Troy Lee <[email protected]>; Jamin Lin <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>; [email protected]; Yunlin Tang <[email protected]>
Subject: Re: [PATCH 1/1] hw/intc/aspeed: Fix IRQ handler mask checkHello Steven,
Quoted 11 lines · Steven Lee
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
eth0and the debug UART are handled inGICINT132. Without this fix, the debug console may hang if theeth0ISR is not handled.Signed-off-by Steven Lee <[email protected]>Change-Id Ic3609eb72218dfd68be6057d78b8953b18828709---
Quoted 6 lines
I think the issue was introduced by the initial commit :
d831c5fd8682 ("aspeed/intc: Add AST2700 support")Is that correct ?
Yes, and the implementation is based on commit 38ba38d (hw/intc/aspeed: Add Support for AST2700 INTCIO Controller).
Additionally, I sent a patch series for AST27x0 multi-SoC support on March 13th. However, I forgot to append the v2 tag to the series. Should I resend it with the correct version tag?
Patchwork link:
https://patchwork.kernel.org/project/qemu-devel/list/?series=943379
Thanks,
Steven
Quoted 25 lines
Reviewed-by Cédric Le Goater <[email protected]>Thanks,
C.
hw/intc/aspeed_intc.c static void
Quoted 8 lines
hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/intc/aspeed_intc.c index renamed from hw/intc/aspeed_intc.c +0
-0
3fd417084f..f17bf43925100644hw/intc/aspeed_intc.c +0
-0@@ -111,7 +111,7 @@ static voidaspeed_intc_set_irq_handler(AspeedINTCState *s,
Quoted 9 lines
hw/intc/aspeed_intc.c +2
-1outpin_idx = intc_irq->outpin_idx; inpin_idx = intc_irq->inpin_idx; -if (s->mask[inpin_idx] || s->regs[status_reg]) { +if ((s->mask[inpin_idx] & select) || (s->regs[status_reg] & + select)) {/* * a. mask is not 0 means in ISR mode * sources interrupt routine are executing.
Hello Steven,
Quoted 32 lines · Steven Lee
Hi Cédric,
Quoted 30 lines
-----Original Message-----
From: Cédric Le Goater <[email protected]>
Sent: Thursday, March 20, 2025 11:29 PM
To: Steven Lee <[email protected]>; Peter Maydell <[email protected]>; Troy Lee <[email protected]>; Jamin Lin <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>; [email protected]; Yunlin Tang <[email protected]>
Subject: Re: [PATCH 1/1] hw/intc/aspeed: Fix IRQ handler mask checkHello Steven,
Quoted 11 lines · Steven Lee
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
eth0and the debug UART are handled inGICINT132. Without this fix, the debug console may hang if theeth0ISR is not handled.Signed-off-by Steven Lee <[email protected]>Change-Id Ic3609eb72218dfd68be6057d78b8953b18828709---
I think the issue was introduced by the initial commit :
Quoted 8 lines
Quoted 4 lines
d831c5fd8682 ("aspeed/intc: Add AST2700 support")Is that correct ?
Yes, and the implementation is based on commit 38ba38d (hw/intc/aspeed: Add Support for AST2700 INTCIO Controller).
Additionally, I sent a patch series for AST27x0 multi-SoC support on March 13th. However, I forgot to append the v2 tag to the series.
That's OK.
We are in -rc phase of the QEMU 10.0 cycle, so I am looking at fixes first.
Quoted 1 line
Should I resend it with the correct version tag?
No need. This is enough:
Thanks,
C.
Quoted 32 lines
Patchwork link:
https://patchwork.kernel.org/project/qemu-devel/list/?series=943379Thanks,
StevenQuoted 25 lines
Reviewed-by Cédric Le Goater <[email protected]>Thanks,
C.
hw/intc/aspeed_intc.c static void
Quoted 8 lines
hw/intc/aspeed_intc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/intc/aspeed_intc.c index renamed from hw/intc/aspeed_intc.c +0
-0
3fd417084f..f17bf43925100644hw/intc/aspeed_intc.c +0
-0@@ -111,7 +111,7 @@ static voidaspeed_intc_set_irq_handler(AspeedINTCState *s,
Quoted 9 lines
hw/intc/aspeed_intc.c +2
-1outpin_idx = intc_irq->outpin_idx; inpin_idx = intc_irq->inpin_idx; -if (s->mask[inpin_idx] || s->regs[status_reg]) { +if ((s->mask[inpin_idx] & select) || (s->regs[status_reg] & + select)) {/* * a. mask is not 0 means in ISR mode * sources interrupt routine are executing.