Le 06/09/2015 16:35, Paolo Bonzini a écrit :
>
>
> On 06/09/2015 12:29, Michael Tokarev wrote:
>> 04.08.2015 11:27, Laurent Vivier wrote:
>>> We use muldiv64() to compute the time to wait:
>>>
>>> timeout = muldiv64(get_ticks_per_sec(), timeout, 3300);
>> ...
>>
>> Applied to -trivial,
On 06/09/2015 12:29, Michael Tokarev wrote:
> 04.08.2015 11:27, Laurent Vivier wrote:
>> We use muldiv64() to compute the time to wait:
>>
>> timeout = muldiv64(get_ticks_per_sec(), timeout, 3300);
> ...
>
> Applied to -trivial, thank you!
I think this was superseded by a later patch.
04.08.2015 11:27, Laurent Vivier wrote:
> We use muldiv64() to compute the time to wait:
>
> timeout = muldiv64(get_ticks_per_sec(), timeout, 3300);
...
Applied to -trivial, thank you!
/mjt
On Tue, Aug 04, 2015 at 10:27:31AM +0200, Laurent Vivier wrote:
> We use muldiv64() to compute the time to wait:
>
> timeout = muldiv64(get_ticks_per_sec(), timeout, 3300);
>
> but get_ticks_per_sec() is 10^9 (30 bit value) and timeout
> is a 35 bit value.
>
> Whereas muldiv64 is:
>
>
On Tue, Aug 04, 2015 at 10:27:31AM +0200, Laurent Vivier wrote:
> --- a/hw/watchdog/wdt_i6300esb.c
> +++ b/hw/watchdog/wdt_i6300esb.c
> @@ -136,7 +136,7 @@ static void i6300esb_restart_timer(I6300State *d, int
> stage)
> * multiply here can exceed 64-bits, before we divide by 33MHz, so
>
We use muldiv64() to compute the time to wait:
timeout = muldiv64(get_ticks_per_sec(), timeout, 3300);
but get_ticks_per_sec() is 10^9 (30 bit value) and timeout
is a 35 bit value.
Whereas muldiv64 is:
uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
So we loose 3 bits of time