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>
This commit is contained in:
parent
d3579f362f
commit
b52b81e44f
|
@ -66,7 +66,8 @@ void gic_update(GICState *s)
|
||||||
best_prio = 0x100;
|
best_prio = 0x100;
|
||||||
best_irq = 1023;
|
best_irq = 1023;
|
||||||
for (irq = 0; irq < s->num_irq; irq++) {
|
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) {
|
if (GIC_GET_PRIORITY(irq, cpu) < best_prio) {
|
||||||
best_prio = GIC_GET_PRIORITY(irq, cpu);
|
best_prio = GIC_GET_PRIORITY(irq, cpu);
|
||||||
best_irq = irq;
|
best_irq = irq;
|
||||||
|
|
Loading…
Reference in a new issue