Skip to content

Commit

Permalink
hw/intc/arm_gic: Actually set the active bits for active interrupts
Browse files Browse the repository at this point in the history
Although we were correctly handling interrupts becoming active
and then inactive, we weren't actually exposing this to the guest
by setting the 'active' flag for the interrupt, so reads
of GICD_ICACTIVERn and GICD_ISACTIVERn would generally incorrectly
return zeroes. Correct this oversight.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1438089748-5528-6-git-send-email-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Sep 8, 2015
1 parent 72889c8 commit d5523a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/intc/arm_gic.c
Expand Up @@ -262,6 +262,7 @@ static void gic_activate_irq(GICState *s, int cpu, int irq)
}

s->running_priority[cpu] = prio;
GIC_SET_ACTIVE(irq, 1 << cpu);
}

static int gic_get_prio_from_apr_bits(GICState *s, int cpu)
Expand Down Expand Up @@ -536,6 +537,7 @@ void gic_complete_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs)
*/

gic_drop_prio(s, cpu, group);
GIC_CLEAR_ACTIVE(irq, cm);
gic_update(s);
}

Expand Down

0 comments on commit d5523a1

Please sign in to comment.