The value of pending register was updated only when an irq was raised
from a device; it should also be updated when an interrupt is cleared.

Signed-off-by: Beniamino Galvani <b.galv...@gmail.com>
---
 hw/intc/allwinner-a10-pic.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/intc/allwinner-a10-pic.c b/hw/intc/allwinner-a10-pic.c
index 00f3c11..9011c82 100644
--- a/hw/intc/allwinner-a10-pic.c
+++ b/hw/intc/allwinner-a10-pic.c
@@ -49,6 +49,8 @@ static void aw_a10_pic_set_irq(void *opaque, int irq, int 
level)
 
     if (level) {
         set_bit(irq % 32, (void *)&s->irq_pending[irq / 32]);
+    } else {
+        clear_bit(irq % 32, (void *)&s->irq_pending[irq / 32]);
     }
     aw_a10_pic_update(s);
 }
-- 
1.7.10.4


Reply via email to