Re: [Qemu-devel] [PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change

2015-07-05 Thread Dmitry Osipenko
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 timer if enable bi

Re: [Qemu-devel] [PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change

2015-07-05 Thread 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 timer if enable bit isn't set. > You don't need to itemize

Re: [Qemu-devel] [PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change

2015-07-05 Thread Dmitry Osipenko
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. */ +

Re: [Qemu-devel] [PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change

2015-07-05 Thread 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 timer if enable bit isn't set. > > Timer won't start perio

[Qemu-devel] [PATCH 1/2] arm_mptimer: Fix timer shutdown and mode change

2015-07-05 Thread Dmitry Osipenko
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 timer if enable bit isn't set. Timer won't start periodic ticking if ONE-SHOT -> PERIODIC mode change happened after on