hw/intc/arm_gic: Fix NVIC assertion failure
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Feb 2014 10:35:48 +0000 (10:35 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Feb 2014 10:35:48 +0000 (10:35 +0000)
Commit 40d225009ef accidentally changed the behaviour of
gic_acknowledge_irq() for the NVIC. The NVIC doesn't have SGIs,
so this meant we hit an assertion:
  gic_acknowledge_irq: Assertion `s->sgi_pending[irq][cpu] != 0' failed.

Return NVIC acknowledge-irq to its previous behaviour, like 11MPCore.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
hw/intc/arm_gic.c

index 93eaa6b2fa73d75fa3266c37110c6d409d8255e5..955b8d4945513fe0c20e69cb4eb9937da251cc1c 100644 (file)
@@ -189,7 +189,7 @@ uint32_t gic_acknowledge_irq(GICState *s, int cpu)
     }
     s->last_active[irq][cpu] = s->running_irq[cpu];
 
-    if (s->revision == REV_11MPCORE) {
+    if (s->revision == REV_11MPCORE || s->revision == REV_NVIC) {
         /* Clear pending flags for both level and edge triggered interrupts.
          * Level triggered IRQs will be reasserted once they become inactive.
          */