qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH v3 6/9] arm: clarify the use of muldiv64()


From: Laurent Vivier
Subject: Re: [Qemu-trivial] [PATCH v3 6/9] arm: clarify the use of muldiv64()
Date: Tue, 1 Sep 2015 13:23:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0


On 01/09/2015 13:17, Peter Maydell wrote:
> On 27 August 2015 at 20:33, Laurent Vivier <address@hidden> wrote:
>> muldiv64() is used to convert microseconds into CPU ticks.
>>
>> But it is not clear and not commented. This patch uses macro
>> to clearly identify what is used: time, CPU frequency and ticks.
>> For an elapsed time and a given frequency, we compute how many ticks
>>  we have.
>>
>> Signed-off-by: Laurent Vivier <address@hidden>
>> ---
>> v2: replace "arm: remove muldiv64()"
>>  target-arm/helper.c | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/target-arm/helper.c b/target-arm/helper.c
>> index 7df1f06..4455761 100644
>> --- a/target-arm/helper.c
>> +++ b/target-arm/helper.c
>> @@ -12,6 +12,8 @@
>>  #include <zlib.h> /* For crc32 */
>>  #include "exec/semihost.h"
>>
>> +#define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */
> 
> LL suffix for large constants, please.

In fact, I didn't put the LL suffix to not force the use of a 64bit on a
32bit machines. Moreover in muldiv64() it is used as a 32bit value.

But if you think it is better, I will. Have I to resend the whole series
or only this patch ? Perhaps the commiter can edit it ?

> 
> Otherwise
> Acked-by: Peter Maydell <address@hidden>
> 
> (assuming you're planning to put this somewhere other than the
> target-arm tree).
> 
> thanks
> -- PMM
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]