All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [PATCH v3 6/9] arm: clarify the use of muldiv64()
Date: Tue, 1 Sep 2015 13:23:07 +0200	[thread overview]
Message-ID: <55E58A9B.5060200@redhat.com> (raw)
In-Reply-To: <CAFEAcA9cm4g0wOEAXGmhNZkWbD82o+eWkWpK4R-uorfFtJyOXA@mail.gmail.com>



On 01/09/2015 13:17, Peter Maydell wrote:
> On 27 August 2015 at 20:33, Laurent Vivier <lvivier@redhat.com> 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 <lvivier@redhat.com>
>> ---
>> 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 <peter.maydell@linaro.org>
> 
> (assuming you're planning to put this somewhere other than the
> target-arm tree).
> 
> thanks
> -- PMM
> 


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 6/9] arm: clarify the use of muldiv64()
Date: Tue, 1 Sep 2015 13:23:07 +0200	[thread overview]
Message-ID: <55E58A9B.5060200@redhat.com> (raw)
In-Reply-To: <CAFEAcA9cm4g0wOEAXGmhNZkWbD82o+eWkWpK4R-uorfFtJyOXA@mail.gmail.com>



On 01/09/2015 13:17, Peter Maydell wrote:
> On 27 August 2015 at 20:33, Laurent Vivier <lvivier@redhat.com> 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 <lvivier@redhat.com>
>> ---
>> 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 <peter.maydell@linaro.org>
> 
> (assuming you're planning to put this somewhere other than the
> target-arm tree).
> 
> thanks
> -- PMM
> 

  reply	other threads:[~2015-09-01 11:23 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 19:32 [Qemu-trivial] [PATCH v3 0/9] remove useless muldiv64() Laurent Vivier
2015-08-27 19:32 ` [Qemu-devel] " Laurent Vivier
2015-08-27 19:32 ` [Qemu-trivial] [PATCH v3 1/9] i6300esb: remove muldiv64() Laurent Vivier
2015-08-27 19:32   ` [Qemu-devel] " Laurent Vivier
2015-09-14 13:31   ` [Qemu-devel] [PATCH v4 " Laurent Vivier
2015-08-27 19:33 ` [Qemu-devel] [PATCH v3 2/9] rtl8139: " Laurent Vivier
2015-08-28 14:12   ` Stefan Hajnoczi
2015-08-27 19:33 ` [Qemu-devel] [PATCH v3 3/9] pcnet: " Laurent Vivier
2015-08-28 14:12   ` Stefan Hajnoczi
2015-08-27 19:33 ` [Qemu-devel] [PATCH v3 4/9] mips: " Laurent Vivier
2015-09-08 12:54   ` Laurent Vivier
2015-09-08 13:42   ` Leon Alrae
2015-08-27 19:33 ` [Qemu-devel] [PATCH v3 5/9] openrisc: " Laurent Vivier
2015-09-08 12:54   ` Laurent Vivier
2015-08-27 19:33 ` [Qemu-trivial] [PATCH v3 6/9] arm: clarify the use of muldiv64() Laurent Vivier
2015-08-27 19:33   ` [Qemu-devel] " Laurent Vivier
2015-08-27 20:23   ` [Qemu-trivial] " Peter Crosthwaite
2015-08-27 20:23     ` Peter Crosthwaite
2015-09-01 11:17   ` [Qemu-trivial] " Peter Maydell
2015-09-01 11:17     ` [Qemu-devel] " Peter Maydell
2015-09-01 11:23     ` Laurent Vivier [this message]
2015-09-01 11:23       ` Laurent Vivier
2015-09-01 11:30       ` [Qemu-trivial] " Peter Maydell
2015-09-01 11:30         ` [Qemu-devel] " Peter Maydell
2015-08-27 19:33 ` [Qemu-trivial] [PATCH v3 7/9] hpet: remove muldiv64() Laurent Vivier
2015-08-27 19:33   ` [Qemu-devel] " Laurent Vivier
2015-09-08 12:55   ` [Qemu-trivial] " Laurent Vivier
2015-09-08 12:55     ` Laurent Vivier
2015-09-08 12:58     ` [Qemu-trivial] " Paolo Bonzini
2015-09-08 12:58       ` Paolo Bonzini
2015-08-27 19:33 ` [Qemu-trivial] [PATCH v3 8/9] bt: " Laurent Vivier
2015-08-27 19:33   ` [Qemu-devel] " Laurent Vivier
2015-09-08 12:55   ` [Qemu-trivial] " Laurent Vivier
2015-09-08 12:55     ` Laurent Vivier
2015-09-08 12:57     ` [Qemu-trivial] " Paolo Bonzini
2015-09-08 12:57       ` Paolo Bonzini
2015-08-27 19:33 ` [Qemu-trivial] [PATCH v3 9/9] net: " Laurent Vivier
2015-08-27 19:33   ` [Qemu-devel] " Laurent Vivier
2015-08-28 14:12   ` [Qemu-trivial] " Stefan Hajnoczi
2015-08-28 14:12     ` [Qemu-devel] " Stefan Hajnoczi
2015-09-24 16:21 ` [Qemu-devel] [PATCH v3 0/9] remove useless muldiv64() Laurent Vivier
2015-09-25 10:31   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E58A9B.5060200@redhat.com \
    --to=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.