[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v15 03/15] hw/ptimer: Actually stop timer in case of e
From: |
Dmitry Osipenko |
Subject: |
[Qemu-arm] [PATCH v15 03/15] hw/ptimer: Actually stop timer in case of error |
Date: |
Thu, 21 Jul 2016 17:31:14 +0300 |
Running with counter / period = 0 is treated as a error case, printing error
message claiming that timer has been disabled. However, timer is only marked
as disabled, keeping to tick till expired and triggering after being claimed
as disabled. Stop the QEMU timer to avoid confusion.
Signed-off-by: Dmitry Osipenko <address@hidden>
---
hw/core/ptimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 461b91c..1dd2d32 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -44,6 +44,7 @@ static void ptimer_reload(ptimer_state *s)
}
if (s->delta == 0 || s->period == 0) {
fprintf(stderr, "Timer with period zero, disabling\n");
+ timer_del(s->timer);
s->enabled = 0;
return;
}
--
2.9.2
- [Qemu-arm] [PATCH v15 00/15] PTimer fixes/features and ARM MPTimer conversion, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 02/15] hw/ptimer: Fix counter - 1 returned by ptimer_get_count for the active timer, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 08/15] hw/ptimer: Add "continuous trigger" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 01/15] hw/ptimer: Change ptimer_get_count to return "1" for the expired timer, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 03/15] hw/ptimer: Actually stop timer in case of error,
Dmitry Osipenko <=
- [Qemu-arm] [PATCH v15 09/15] tests: ptimer: Add tests for "continuous trigger" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 06/15] hw/ptimer: Add "wraparound after one period" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 05/15] tests: Add ptimer tests, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 10/15] hw/ptimer: Add "no immediate trigger" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 12/15] hw/ptimer: Add "no immediate reload" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 07/15] tests: ptimer: Add tests for "wraparound after one period" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 04/15] hw/ptimer: Introduce timer policy feature, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 13/15] tests: ptimer: Add tests for "no immediate reload" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 11/15] tests: ptimer: Add tests for "no immediate trigger" policy, Dmitry Osipenko, 2016/07/21
- [Qemu-arm] [PATCH v15 14/15] arm_mptimer: Convert to use ptimer, Dmitry Osipenko, 2016/07/21