提交 257621a9 编写于 作者: D Dmitry Osipenko 提交者: Peter Maydell

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: NDmitry Osipenko <digetx@gmail.com>
Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 8a52340c
...@@ -38,7 +38,7 @@ static inline int get_current_cpu(ARMMPTimerState *s) ...@@ -38,7 +38,7 @@ static inline int get_current_cpu(ARMMPTimerState *s)
static inline void timerblock_update_irq(TimerBlock *tb) 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. */ /* Return conversion factor from mpcore timer ticks to qemu timer ticks. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册