Re: [Qemu-devel] [PATCH] hw/timer/grlib_gptimer: Avoid integer overflow

2014-02-15 Thread Peter Maydell
On 13 February 2014 09:16, Sebastian Huber wrote: > The GPTIMER uses 32-bit registers. Use a 64-bit operation to get the > ptimer count, otherwise we end up with a count of 0 for GPTIMER counter > values of 0x. > --- > hw/timer/grlib_gptimer.c |4 ++-- > 1 files changed, 2 insertions

Re: [Qemu-devel] [PATCH] hw/timer/grlib_gptimer: Avoid integer overflow

2014-02-13 Thread Fabien Chouteau
On 02/13/2014 10:16 AM, Sebastian Huber wrote: > The GPTIMER uses 32-bit registers. Use a 64-bit operation to get the > ptimer count, otherwise we end up with a count of 0 for GPTIMER counter > values of 0x. Looks good, thanks Sebastian. Reviewed-by: Fabien Chouteau > --- > hw/timer/g

[Qemu-devel] [PATCH] hw/timer/grlib_gptimer: Avoid integer overflow

2014-02-13 Thread Sebastian Huber
The GPTIMER uses 32-bit registers. Use a 64-bit operation to get the ptimer count, otherwise we end up with a count of 0 for GPTIMER counter values of 0x. --- hw/timer/grlib_gptimer.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/timer/grlib_gptimer.c b/hw