qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] timer.h: Provide better monotonic time


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] timer.h: Provide better monotonic time
Date: Wed, 7 Jun 2017 15:30:27 +0100

On 5 June 2017 at 10:27, Paolo Bonzini <address@hidden> wrote:
>
>
> On 02/06/2017 14:24, Peter Maydell wrote:
>> On 18 April 2017 at 20:18, Pranith Kumar <address@hidden> wrote:
>>> Tested and confirmed that the stretch i386 debian qcow2 image on a
>>> raspberry pi 2 works.
>>>
>>> Fixes: LP#: 893208 <https://bugs.launchpad.net/qemu/+bug/893208/>
>>> Signed-off-by: Pranith Kumar <address@hidden>
>>> ---
>>>  include/qemu/timer.h | 5 ++---
>>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/include/qemu/timer.h b/include/qemu/timer.h
>>> index 8a1eb74839..1b518bca30 100644
>>> --- a/include/qemu/timer.h
>>> +++ b/include/qemu/timer.h
>>> @@ -1020,10 +1020,9 @@ static inline int64_t cpu_get_host_ticks(void)
>>>  /* The host CPU doesn't have an easily accessible cycle counter.
>>>     Just return a monotonically increasing value.  This will be
>>>     totally wrong, but hopefully better than nothing.  */
>>> -static inline int64_t cpu_get_host_ticks (void)
>>> +static inline int64_t cpu_get_host_ticks(void)
>>>  {
>>> -    static int64_t ticks = 0;
>>> -    return ticks++;
>>> +    return get_clock();
>>>  }
>>>  #endif
>>
>> Hmm, it looks like this patch got lost. Paolo, did you want to
>> give it a reviewed-by? From the discussion on v1 it sounded
>> like you had the best grip on the timer code ;-)
>
> Sure:
>
> Reviewed-by: Paolo Bonzini <address@hidden>
>
>> (Does the comment on the function need updating ?)
>
> Apart from "totally", it's still pretty correct. :)

Thanks. I'll apply this to my arm queue since in practice only
ARM hosts are affected by this change.

-- PMM



reply via email to

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