Re: [PATCH] hw/intc/loongarch_extioi: Fix interrupt routing update

2024-03-19 Thread gaosong

在 2024/3/13 下午5:39, Bibo Mao 写道:

Interrupt number in loop sentence should be base irq plus
loop index, it is missing on checking whether the irq
is pending.

Fixes: 428a6ef4396 ("Add vmstate post_load support")
Signed-off-by: Bibo Mao 
---
  hw/intc/loongarch_extioi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Song Gao 

Thanks.
Song Gao

diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index bdfa3b481e..0b358548eb 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -151,7 +151,7 @@ static inline void extioi_update_sw_coremap(LoongArchExtIOI 
*s, int irq,
  continue;
  }
  
-if (notify && test_bit(irq, (unsigned long *)s->isr)) {

+if (notify && test_bit(irq + i, (unsigned long *)s->isr)) {
  /*
   * lower irq at old cpu and raise irq at new cpu
   */





[PATCH] hw/intc/loongarch_extioi: Fix interrupt routing update

2024-03-13 Thread Bibo Mao
Interrupt number in loop sentence should be base irq plus
loop index, it is missing on checking whether the irq
is pending.

Fixes: 428a6ef4396 ("Add vmstate post_load support")
Signed-off-by: Bibo Mao 
---
 hw/intc/loongarch_extioi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index bdfa3b481e..0b358548eb 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -151,7 +151,7 @@ static inline void extioi_update_sw_coremap(LoongArchExtIOI 
*s, int irq,
 continue;
 }
 
-if (notify && test_bit(irq, (unsigned long *)s->isr)) {
+if (notify && test_bit(irq + i, (unsigned long *)s->isr)) {
 /*
  * lower irq at old cpu and raise irq at new cpu
  */
-- 
2.39.3