20.09.2015 20:48, Peter Crosthwaite пишет:
On Sun, Jul 5, 2015 at 1:58 PM, Peter Crosthwaite
wrote:
On Sun, Jul 5, 2015 at 1:47 PM, Dmitry Osipenko wrote:
05.07.2015 23:26, Peter Crosthwaite пишет:
Hi Dmitry,
Based on my comment earlier, this is what I came up with RE consolidation
of
03.10.2015 16:11, Dmitry Osipenko пишет:
20.09.2015 20:48, Peter Crosthwaite пишет:
On Sun, Jul 5, 2015 at 1:58 PM, Peter Crosthwaite
wrote:
On Sun, Jul 5, 2015 at 1:47 PM, Dmitry Osipenko wrote:
05.07.2015 23:26, Peter Crosthwaite пишет:
Hi Dmitry,
Based on my comment earlier, this is
05.10.2015 19:27, Peter Crosthwaite пишет:
On Mon, Oct 5, 2015 at 9:07 AM, Dmitry Osipenko wrote:
03.10.2015 16:11, Dmitry Osipenko пишет:
20.09.2015 20:48, Peter Crosthwaite пишет:
On Sun, Jul 5, 2015 at 1:58 PM, Peter Crosthwaite
wrote:
On Sun, Jul 5, 2015 at 1:47 PM, Dmitry Osipenko
ation
- Fixes counter value preservation after stopping the timer
- Code simplification and reduction
Bump timerblock VMSD to version 3, since VMState is changed and is not
compatible with the previuos implementation.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c
Here the tests I used to verify MPTimer emulation correctness:
https://gist.github.com/digetx/dbd46109503b1a91941a
--
Dmitry
ation
- Fixes counter value preservation after stopping the timer
- Code simplification and reduction
Bump timerblock VMSD to version 3, since VMState is changed and is not
compatible with the previuos implementation.
Signed-off-by: Dmitry Osipenko
---
Changelog:
V2: Fixed cha
27.10.2015 16:48, Krzeminski, Marcin (Nokia - PL/Wroclaw) пишет:
Hello,
I am playing with U-Boot on ARM under qemu.
U-boot uses mptimer, and under qemu one second takes about 1 in real world.
At the moment it seem that in u-boot is ok, so I have question about below
function.
Why prescaler value
27.10.2015 21:01, Peter Crosthwaite пишет:
On Tue, Oct 27, 2015 at 7:19 AM, Dmitry Osipenko mailto:dig...@gmail.com>> wrote:
27.10.2015 16:48, Krzeminski, Marcin (Nokia - PL/Wroclaw) пишет:
Hello,
I am playing with U-Boot on ARM under qemu.
U-boot uses m
25.10.2015 20:39, Peter Crosthwaite пишет:
On Sun, Oct 25, 2015 at 6:23 AM, Dmitry Osipenko wrote:
25.10.2015 02:55, Peter Crosthwaite пишет:
On Sat, Oct 24, 2015 at 3:22 PM, Dmitry Osipenko wrote:
24.10.2015 22:45, Peter Crosthwaite пишет:
This looks like a give-up without trying to
29.10.2015 04:39, Peter Crosthwaite пишет:
On Tue, Oct 27, 2015 at 2:26 PM, Dmitry Osipenko mailto:dig...@gmail.com>> wrote:
25.10.2015 20:39, Peter Crosthwaite пишет:
On Sun, Oct 25, 2015 at 6:23 AM, Dmitry Osipenko mailto:dig...@gmail.com>> wrote:
25.1
29.10.2015 10:00, Krzeminski, Marcin (Nokia - PL/Wroclaw) пишет:
*From:*EXT Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com]
*Sent:* Tuesday, October 27, 2015 7:23 PM
*To:* Peter Maydell
*Cc:* Dmitry Osipenko ; Krzeminski, Marcin (Nokia -
PL/Wroclaw) ; qemu-devel@nongnu.org
*Subject:* Re
29.10.2015 17:28, Dmitry Osipenko пишет:
- Disable limiting for that host machine?
- Tune timer limit?
These tho variants seem too farfetched, since we don't distinguish the guest
software timer poll and some device internal ptimer_get_count() call. Just a note.
--
Dmitry
31.10.2015 00:52, Peter Maydell пишет:
On 24 October 2015 at 13:21, Dmitry Osipenko wrote:
Changelog for ARM MPTimer QEMUTimer to ptimer conversion:
V2: Fixed changing periodic timer counter value "on the fly". I added a
test to the gist to cover that issue.
Allow switching between periodic <-> oneshot modes while timer is running.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 9
eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index cb50d30..904a77b 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -189,6 +189,7
certain hardware, don't perform wrap around when in icount mode and return
counter = 0 in that case (that doesn't affect polled counter distribution).
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git
sion whether adjustment is required, as limit could
be altered while timer is running, resulting in incorrect value returned by
ptimer_get_count.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 51 +++
1 file changed, 3
r and stop
the timer.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 27 ---
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 142cc64..cec59e1 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -39,11 +
timer already expired" patch since it would cause bogus tick after
QEMU been reset if ptimer was stopped and it's QEMUtimer expired
during reset.
Patch "Legalize running with delta = load = 0" now explicitly
forbids period = 0.
Dmit
Currently ptimer users are used to store copy of the limit value, because
ptimer doesn't provide facility to retrieve the limit. Let's provide it.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c| 5 +
include/hw/ptimer.h | 1 +
2 files
ation
- Fixes counter value preservation after stopping the timer
- Correctly handles prescaler != 0 cases
- Code simplification and reduction
Bump VMSD to version 3, since VMState is changed and is not compatible
with the previous implementation.
Signed-off-by: Dmitry Osi
Hello Peter,
24.01.2016 08:25, Peter Crosthwaite пишет:
[snip]
+timerblock_run(tb->timer, control, (value != 0) && (control & 1));
break;
case 8: /* Control. */
-old = tb->control;
-tb->control = value;
-if (value & 1) {
-if ((old &
24.01.2016 07:28, Peter Crosthwaite пишет:
[snip]
/* Set counter frequency in Hz. */
void ptimer_set_freq(ptimer_state *s, uint32_t freq)
{
+g_assert(freq != 0);
s->delta = ptimer_get_count(s);
s->period = 10ll / freq;
s->period_frac = (10ll << 32) /
Hello Peter,
24.01.2016 08:29, Peter Crosthwaite пишет:
[snip]
+if (expired && (counter != 0)) {
+/* Wrap around periodic counter. */
+counter = s->limit - counter % s->limit;
+}
Noticed another nit here. This should be:
counter = s->
24.01.2016 17:59, Dmitry Osipenko пишет:
Hello Peter,
24.01.2016 08:25, Peter Crosthwaite пишет:
[snip]
+timerblock_run(tb->timer, control, (value != 0) && (control & 1));
break;
case 8: /* Control. */
-old = tb->control;
-t
eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index d4452d3..f58790a 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -189,6 +189,7
sion whether adjustment is required, as limit could
be altered while timer is running, resulting in incorrect value returned by
ptimer_get_count.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 51 +++
1 file changed, 3
"Fix counter - 1 returned by ptimer_get_count for the active timer"
"Perform delayed tick instead of immediate if delta = 0"
Dmitry Osipenko (9):
hw/ptimer: Fix issues caused by the adjusted timer limit value
hw/ptimer: Perform counter wrap around if t
Allow switching between periodic <-> oneshot modes while timer is running.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index f
certain hardware, don't perform wrap around when in icount mode and return
counter = 0 in that case (that doesn't affect polled counter distribution).
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 19 +--
1 file changed, 13 insert
Currently ptimer users are used to store copy of the limit value, because
ptimer doesn't provide facility to retrieve the limit. Let's provide it.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c| 5 +
include/hw/ptimer.h | 1 +
2 files
ff-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c | 133 +
include/hw/timer/arm_mptimer.h | 5 +-
2 files changed, 70 insertions(+), 68 deletions(-)
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index 5dfab66..f002458 100644
---
It might be necessary by some emulated HW to perform the tick after one
period if delta = 0. Given that it is much less churny to implement immediate
tick by the ptimer user itself, let's make ptimer do the delayed tick.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c
r and stop
the timer.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 28 +---
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index bf62fdd..62f8cb1 100644
--- a/hw/core/ptimer.c
+++
eriod expired and
decrement after. Fix this by adding 1 to the counter value for the active and
unexpired timer.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 62f8cb1..b2044fb 100644
---
30.01.2016 19:43, Dmitry Osipenko пишет:
Due to rounding down performed by ptimer_get_count, it returns counter - 1 for
the active timer. That's incorrect because counter should decrement only after
period been expired, not before. I.e. if running timer has been loaded with
value X, then
02.02.2016 18:19, Dmitry Osipenko пишет:
There is possibility to return timer counter = limit + 1, if the following
ptimer calls execute in less than 1ns.
s/limit/delta/
--
Dmitry
period = 0.
In addition, don't load one-shot timer when delta = 0 and actually stop the
timer by timer_del().
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
hw/core/ptimer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index cf329eb..0a54212 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -194,6 +194,7
sion whether adjustment is required, as limit could
be altered while timer is running, resulting in incorrect value returned by
ptimer_get_count.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 51 +++
1 file changed, 31 insertions(+), 20 deletions(-)
certain hardware, don't perform wrap around when in icount mode and return
counter = 0 in that case (that doesn't affect polled counter distribution).
In addition, there is no reason to keep expired timer tick deferred, so
just perform the tick from ptimer_get_count().
Signed-off-by: Dmitr
; mode switch, silence error msg when
delta = load = 0, introduce ptimer_get_limit.
Dmitry Osipenko (7):
hw/ptimer: Fix issues caused by the adjusted timer limit value
hw/ptimer: Perform tick and counter wrap around if timer already
expired
hw/ptimer: Update .delta o
Allow to switch between periodic <-> oneshot modes while timer is running.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 0a54212..6960738 100644
--- a/h
ation
- Fixes counter value preservation after stopping the timer
- Correctly handles prescaler != 0 cases
- Code simplification and reduction
Bump VMSD to version 3, since VMState is changed and is not compatible
with the previous implementation.
Signed-off-by: Dmitry Osi
Currently ptimer users are used to store copy of the limit value, because
ptimer doesn't provide facility to retrieve the limit. Let's provide it.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c| 5 +
include/hw/ptimer.h | 1 +
2 files changed, 6 insertions(+)
diff --git
10.01.2016 03:44, Peter Crosthwaite пишет:
On Sat, Jan 9, 2016 at 9:39 AM, Dmitry Osipenko wrote:
ptimer_get_count() might be called while QEMU timer already been expired.
In that case ptimer would return counter = 0, which might be undesirable
in case of polled timer. Do counter wrap around
I missed case where periodic timer should stop in the following case:
load = 0, counter != 0 -> run -> set counter = 0 -> should stop
Test added. Will fix it in V11.
--
Dmitry
10.01.2016 21:05, Dmitry Osipenko пишет:
I missed case where periodic timer should stop in the following case:
load = 0, counter != 0 -> run -> set counter = 0 -> should stop
Test added. Will fix it in V11.
Forgot to mention that prescaler must be 0 in that case. Prescaler !
12.01.2016 06:58, Peter Crosthwaite пишет:
On Sat, Jan 09, 2016 at 08:39:53PM +0300, Dmitry Osipenko wrote:
Currently ptimer would print error message and clear enable flag for an
arming timer that has delta = load = 0. That actually could be a valid case
for some hardware, like instant IRQ
12.01.2016 21:12, Dmitry Osipenko пишет:
12.01.2016 06:58, Peter Crosthwaite пишет:
On Sat, Jan 09, 2016 at 08:39:53PM +0300, Dmitry Osipenko wrote:
Currently ptimer would print error message and clear enable flag for an
arming timer that has delta = load = 0. That actually could be a valid
12.01.2016 21:12, Dmitry Osipenko пишет:
12.01.2016 06:58, Peter Crosthwaite пишет:
On Sat, Jan 09, 2016 at 08:39:53PM +0300, Dmitry Osipenko wrote:
Currently ptimer would print error message and clear enable flag for an
arming timer that has delta = load = 0. That actually could be a valid
Hi Peter,
10.01.2016 03:44, Peter Crosthwaite пишет:
On Sat, Jan 9, 2016 at 9:39 AM, Dmitry Osipenko wrote:
[cut]
In addition, there is no reason to keep expired timer tick deferred, so
just perform the tick from ptimer_get_count().
[cut]
I noticed an issue here... The problem is that
20.01.2016 20:03, Dmitry Osipenko пишет:
Hi Peter,
10.01.2016 03:44, Peter Crosthwaite пишет:
On Sat, Jan 9, 2016 at 9:39 AM, Dmitry Osipenko wrote:
[cut]
In addition, there is no reason to keep expired timer tick deferred, so
just perform the tick from ptimer_get_count().
[cut]
I
k.
Added missed "else" statement.
V8: Adjust period instead of the limit and do it for periodic timer only
(.limit adjusting bug). Added patch/fix for freq/period change and
ptimer_get_count() improvement.
Dmitry Osipenko (4):
hw/ptimer: Fix issues caused by t
_period(t, 1)
2) ptimer_set_limit(t, 1, 0)
3) ptimer_set_period(t, 1) <-- bypass limit correction
Fix all of the above issues by adjusting timer period instead of the limit.
Do the adjust for periodic timer only.
Signed-off-by: Dmitry Osipenko
---
hw/core/p
deferred, so
just perform the tick from ptimer_get_count().
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 035af97..96a6c7a 100644
--- a/hw/core
eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 96a6c7a..8c2dd9f 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -207,6 +207,7 @@ void ptimer_stop(ptimer_state
ation
- Fixes counter value preservation after stopping the timer
- Code simplification and reduction
Bump VMSD to version 3, since VMState is changed and is not compatible
with the previous implementation.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c
deferred, so
just perform the tick from ptimer_get_count().
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 035af97..ff0586b 100644
--- a/hw/core
_period(t, 1)
2) ptimer_set_limit(t, 1, 0)
3) ptimer_set_period(t, 1) <-- bypass limit correction
Fix all of the above issues by adjusting timer period instead of the limit.
Do the adjust for periodic timer only.
Signed-off-by: Dmitry Osipenko
---
hw/core/p
eliminate potential further mistakes.
Signed-off-by: Dmitry Osipenko
---
hw/core/ptimer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index ff0586b..eb4eb4b 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -207,6 +207,7 @@ void ptimer_stop(ptimer_state
f counter == 0, otherwise polled periodic
timer won't ever return counter = 0.
Dmitry Osipenko (4):
hw/ptimer: Fix issues caused by the adjusted timer limit value
hw/ptimer: Perform tick and counter wrap around if timer already
expired
hw/ptimer: Update .delta on period/freq ch
ation
- Fixes counter value preservation after stopping the timer
- Code simplification and reduction
Bump VMSD to version 3, since VMState is changed and is not compatible
with the previous implementation.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c
06.01.2016 15:17, Peter Crosthwaite пишет:
On Tue, Jan 05, 2016 at 05:33:27AM +0300, Dmitry Osipenko wrote:
ptimer_get_count() might be called while QEMU timer already been expired.
In that case ptimer would return counter = 0, which might be undesirable
in case of polled timer. Do counter wrap
06.01.2016 15:15, Peter Crosthwaite пишет:
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index edf077c..035af97 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -34,20 +34,39 @@ static void ptimer_trigger(ptimer_state *s)
static void ptimer_reload(ptimer_state *s)
{
-if (s->del
06.01.2016 16:59, Peter Crosthwaite пишет:
+
+if (expired) {
+/* Wrap around periodic counter. */
+counter = s->delta = s->limit - counter % s->limit;
Why do you update the delta here?
Because we would want to schedule next tick based on current
06.01.2016 16:17, Peter Crosthwaite пишет:
On Tue, Jan 05, 2016 at 05:33:29AM +0300, Dmitry Osipenko wrote:
Current ARM MPTimer implementation uses QEMUTimer for the actual timer,
this implementation isn't complete and mostly tries to duplicate of what
generic ptimer is already doing
06.01.2016 16:17, Peter Crosthwaite пишет:
+if ((old & 3) != (tb->control & 3)) {
+ptimer_stop(tb->timer);
+}
+if (!(tb->control & 1)) {
+break;
+}
+ptimer_set_period(tb->timer, timerblock_scale(tb));
+if ((old & 3) != (tb->c
Timer, running in periodic mode, can't be stopped or coming one-shot tick
won't be canceled because timer control code just doesn't handle timer
disabling. Fix it by checking enable bit and deleting timer if bit isn't set.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_
Hello Peter, thanks a lot for comment.
02.07.2015 12:27, Peter Maydell пишет:
Thanks; this does look like a bug. This change will mean we
call timer_del() even if the timer was already disabled,
though, so I think it would be slightly better to rearrange
the existing logic something like this:
Timer, running in periodic mode, can't be stopped or coming one-shot tick
won't be canceled because timer control code just doesn't handle timer
disabling. Fix it by deleting timer if enable bit isn't set.
Signed-off-by: Dmitry Osipenko
---
v2: Avoid calling timer_del() if t
02.07.2015 20:34, Peter Maydell пишет:
On 2 July 2015 at 18:20, Dmitry Osipenko wrote:
Timer, running in periodic mode, can't be stopped or coming one-shot tick
won't be canceled because timer control code just doesn't handle timer
disabling. Fix it by deleting timer if enabl
02.07.2015 20:34, Peter Maydell пишет:
This will now cause us to do the "reload the timer"
logic if you write a 1 to the control bit when it was
already 1, which we didn't do before.
The logic I suggested in my previous review
comment gets this right...
-- PMM
The problem with code you sugg
02.07.2015 21:09, Peter Maydell пишет:
On 2 July 2015 at 18:52, Dmitry Osipenko wrote:
02.07.2015 20:34, Peter Maydell пишет:
This will now cause us to do the "reload the timer"
logic if you write a 1 to the control bit when it was
already 1, which we didn't do befor
02.07.2015 21:43, Dmitry Osipenko пишет:
02.07.2015 21:09, Peter Maydell пишет:
TIMER_CONTROL_IT_ENABLE) to TIMER_CONTROL < it won't start, bug
s/it won't start/it won't start periodic/
--
Dmitry
Hello, this series fixes 3 arm_mptimer issues. All 3 patches were successfully
tested on ARM Cortex-A9 QEMU machine booting Linux kernel and behavior was
compared to real hw by running couple handcrafted mptimer tests.
arm_mptimer: Fix timer shutdown
arm_mptimer: Fix ONE-SHOT -> PERIODIC mode chan
Timer, running in periodic mode, can't be stopped or coming one-shot tick
won't be canceled because timer control code just doesn't handle timer
disabling. Fix it by deleting timer if enable bit isn't set.
Signed-off-by: Dmitry Osipenko
---
v2: Avoid calling timer_del() if t
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
---
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
Timer won't start periodic ticking if ONE-SHOT -> PERIODIC mode change happened
after one-shot tick was completed. Fix it by starting ticking only if timer was
disabled previously and isn't ticking right now.
Signed-off-by: Dmitry Osipenko
---
hw/timer/arm_mptimer.c | 9
02.07.2015 21:43, Dmitry Osipenko пишет:
4) re-load TIMER_LOAD
And 4-th step can be omitted.
Anyway, I already sent patches fixing this and IT issues.
--
Dmitry
Hello Peter,
04.07.2015 22:39, Peter Crosthwaite пишет:
You also need to trigger timerblock_update_irq on change of state for
the control bit itself. "case 8: /* Control. */" in the _write
handler needs to call this fn.
Right, as it will mask/unmask interrupt line. Good catch, thanks.
--
D
04.07.2015 22:36, Peter Crosthwaite пишет:
Your do-nothing code paths are now inconsistent between the 0 and 1
cases. I think this if can be consolidated with:
if (value & 1) {
if ((old & 1) && (tb->count != 0)) {
break;
}
if (tb->control & 2) {
...
}
Hello, this is V2 of arm_mptimer patch series. Comments and suggestion from V1
has been addressed and the series was re-tested, including new test for IT bit
masking/unmasking.
[PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change
[PATCH v2 2/2] arm_mptimer: Respect IT bit state
C mode change
happened after one-shot tick was completed. Fix it by starting ticking
only if the timer isn't ticking right now.
To avoid code churning, these two fixes are squashed in one commit.
Signed-off-by: Dmitry Osipenko
---
Commits are squashed as per Peter Crosthwaite suggesti
Timer should fire interrupt only if IT(interrupt enable) bit state of control
register is enabled and timer should update IRQ status on IT bit change as it
would mask/unmask the interrupt line.
Signed-off-by: Dmitry Osipenko
---
v2: Added missed IRQ status update on control register write as
05.07.2015 22:07, Peter Crosthwaite пишет:
-if (((old & 1) == 0) && (value & 1)) {
-if (tb->count == 0 && (tb->control & 2)) {
+if (value & 1) {
+if ((old & 1) && (tb->count != 0)) {
+/* Do nothing if timer is ticking right now. */
+
05.07.2015 22:52, Peter Crosthwaite пишет:
On Sun, Jul 5, 2015 at 8:39 AM, Dmitry Osipenko wrote:
Hello, this is V2 of arm_mptimer patch series. Comments and suggestion from V1
has been addressed and the series was re-tested, including new test for IT bit
masking/unmasking.
[PATCH 1/2
05.07.2015 22:52, Peter Crosthwaite пишет:
This series doesn't show up in the patch tracking system due to irregular cover.
BTW, doesn't QEMU use patchwork for tracking? I see both patches there.
--
Dmitry
05.07.2015 23:26, Peter Crosthwaite пишет:
Hi Dmitry,
Based on my comment earlier, this is what I came up with RE consolidation of
those arm_mptimer code paths that were giving you problems. I have not done the
interrupt mask fix, as that one from your series is reasonably independent.
Regards,
06.07.2015 00:06, Peter Maydell пишет:
On 5 July 2015 at 22:01, Peter Crosthwaite wrote:
On Sun, Jul 5, 2015 at 1:58 PM, Peter Crosthwaite
wrote:
On Sun, Jul 5, 2015 at 1:47 PM, Dmitry Osipenko wrote:
Hi Peter, thanks a lot! Generally, I don't have any trouble with currently
m
06.07.2015 00:19, Peter Crosthwaite пишет:
On Sun, Jul 5, 2015 at 8:39 AM, Dmitry Osipenko wrote:
Timer, running in periodic mode, can't be stopped or coming one-shot
tick won't be canceled because timer control code just doesn't handle
timer disabling. Fix it by deleting the
eted. Fix it by
re-starting ticking if the timer isn't ticking right now.
To avoid code churning, these two fixes are squashed in one commit.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
v1: Commits are squashed as per Peter Crosthwaite suggestion.
v2: Grammar fixes o
The timer should fire interrupt only if IT(interrupt enable) bit state of
control register is enabled and the timer should update IRQ status on IT
bit change as it would mask/unmask the interrupt line.
Signed-off-by: Dmitry Osipenko
Reviewed-by: Peter Crosthwaite
---
v2: Added missed IRQ
Hello, this is V3 of arm_mptimer patch series. No code changes here, just
grammar fixes for "shutdown and mode change" patch and general re-send, as
V2 was screwed for patchtracker.
Dmitry Osipenko (2):
arm_mptimer: Fix timer shutdown and mode change
arm_mptimer: Respect IT bit
v2: Added missed IRQ status update on control register write as per
Peter Crosthwaite comment.
Oh, no! Turned out, that is wrong. I wasn't testing that case properly on HW, V1
is correct. Quote from ARM doc "If the timer interrupt is enabled, Interrupt ID
29 is set as Pending in the Inter
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
---
v2: Added missed IRQ status update on control register write as per
Peter Crosthwaite comment.
v3: No code
06.07.2015 12:23, Peter Maydell пишет:
If you need to update a patch, please resend the whole series,
not just one patch from it. (This is one of the things we talk
about on http://wiki.qemu.org/Contribute/SubmitAPatch -- the
v2/3/4 etc version number applies to a series, not a single
I made a
06.07.2015 16:16, Peter Maydell пишет:
Probably, I should go and try those tools myself to have better sense of
what I should and shouldn't be doing.
The particular one I find useful is Anthony Liguori's "patches"
tool: https://github.com/aliguori/patches
Thanks! I'll take a look at it.
But
06.07.2015 19:45, Peter Crosthwaite пишет:
As someone who doesn't send PULLs, I still find patches very useful.
It sanity checks your email sends. A while back, I drafted a paragraph
on how to use patches to verify receipt of your series if we want to
add it to "submit a patch".
Sounds useful.
ation
- Fixes counter value preservation after stopping the timer
- Code simplification and reduction
- Fixes starting the timer with load = 0
Bump VMSD to version 3, since VMState is changed and is not compatible
with the previuos implementation.
Signed-off-by: Dmitry Osi
1 - 100 of 657 matches
Mail list logo