From: Dmitry Osipenko Date: Mon, 6 Jul 2015 01:27:12 +0000 (+0300) Subject: arm_mptimer: Respect IT bit state X-Git-Tag: v2.4.0-rc0~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=257621a9566054472d1d55a819880d0f9da02bda;p=thirdparty%2Fqemu.git arm_mptimer: Respect IT bit state 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 Reviewed-by: Peter Crosthwaite Signed-off-by: Peter Maydell --- diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c index 0e132b15b5a..3e59c2a288a 100644 --- a/hw/timer/arm_mptimer.c +++ b/hw/timer/arm_mptimer.c @@ -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. */