[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] arm_mptimer: Respect IT bit state
From: |
Dmitry Osipenko |
Subject: |
[Qemu-devel] [PATCH 3/3] arm_mptimer: Respect IT bit state |
Date: |
Fri, 3 Jul 2015 01:52:11 +0300 |
Timer fires interrupt regardless of current IT(interrupt enable) bit state.
Fix it by making timer to respect IT state.
Signed-off-by: Dmitry Osipenko <address@hidden>
---
hw/timer/arm_mptimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index 58e17c4..82c4462 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. */
--
2.4.4