diff options
| author | Sergey Fedorov <serge.fdrv@gmail.com> | 2014-08-29 15:00:29 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-29 15:00:29 +0100 |
| commit | b52b81e44f7d087a7b06217eb83cd79f8bf2fb05 (patch) | |
| tree | 5af54799887d24e279a5b86ad309439efd1480f4 /hw/intc | |
| parent | d3579f362f61addb6b8b9c683f398d29af47eb23 (diff) | |
| download | focaccia-qemu-b52b81e44f7d087a7b06217eb83cd79f8bf2fb05.tar.gz focaccia-qemu-b52b81e44f7d087a7b06217eb83cd79f8bf2fb05.zip | |
hw/intc/arm_gic: honor target mask in gic_update()
Take IRQ target mask into account when determining the highest priority pending interrupt. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1407947471-26981-1-git-send-email-serge.fdrv@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc')
| -rw-r--r-- | hw/intc/arm_gic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 55019c9742..db9110c1c4 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -66,7 +66,8 @@ void gic_update(GICState *s) best_prio = 0x100; best_irq = 1023; for (irq = 0; irq < s->num_irq; irq++) { - if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm)) { + if (GIC_TEST_ENABLED(irq, cm) && gic_test_pending(s, irq, cm) && + (irq < GIC_INTERNAL || GIC_TARGET(irq) & cm)) { if (GIC_GET_PRIORITY(irq, cpu) < best_prio) { best_prio = GIC_GET_PRIORITY(irq, cpu); best_irq = irq; |