]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
arm_mptimer: Respect IT bit state
authorDmitry Osipenko <digetx@gmail.com>
Mon, 6 Jul 2015 01:27:12 +0000 (04:27 +0300)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 6 Jul 2015 09:26:35 +0000 (10:26 +0100)
The timer should fire the interrupt only if the IT (interrupt enable) bit
state of the control register is enabled.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/timer/arm_mptimer.c

index 0e132b15b5ac5ce12c6106a5df97c0b9ce05ccfd..3e59c2a288a2371fc6b754dbb1b24af2c165ac89 100644 (file)
@@ -38,7 +38,7 @@ static inline int get_current_cpu(ARMMPTimerState *s)
 
 static inline void timerblock_update_irq(TimerBlock *tb)
 {
-    qemu_set_irq(tb->irq, tb->status);
+    qemu_set_irq(tb->irq, tb->status && (tb->control & 4));
 }
 
 /* Return conversion factor from mpcore timer ticks to qemu timer ticks.  */