@@ -157,19 +157,20 @@ static void irq_handler(struct pt_regs *regs)
u32 irqstat = gic_read_iar();
u32 irqnr = gic_iar_irqnr(irqstat);
- if (irqnr != GICC_INT_SPURIOUS)
- gic_write_eoir(irqstat);
-
if (irqnr == PPI(vtimer_info.irq)) {
info = &vtimer_info;
} else if (irqnr == PPI(ptimer_info.irq)) {
info = &ptimer_info;
} else {
+ if (irqnr != GICC_INT_SPURIOUS)
+ gic_write_eoir(irqstat);
report_info("Unexpected interrupt: %d\n", irqnr);
return;
}
info->write_ctl(ARCH_TIMER_CTL_IMASK | ARCH_TIMER_CTL_ENABLE);
+ gic_write_eoir(irqstat);
+
info->irq_received = true;
}