qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v1 0/2] ARM MPTimer fixes and refactoring


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [RFC v1 0/2] ARM MPTimer fixes and refactoring
Date: Sun, 20 Sep 2015 10:48:27 -0700

On Sun, Jul 5, 2015 at 1:58 PM, Peter Crosthwaite
<address@hidden> wrote:
> On Sun, Jul 5, 2015 at 1:47 PM, Dmitry Osipenko <address@hidden> wrote:
>> 05.07.2015 23:26, Peter Crosthwaite пишет:
>>
>>> Hi Dmitry,
>>>
>>> Based on my comment earlier, this is what I came up with RE consolidation
>>> of
>>> those arm_mptimer code paths that were giving you problems. I have not
>>> done the
>>> interrupt mask fix, as that one from your series is reasonably
>>> independent.
>>>
>>> Regards,
>>> Peter
>>>
>>> Peter Crosthwaite (2):
>>>    timer: arm_mp: Factor out timer value calculation
>>>    timer: arm_mp: consolidate control and counter write logic
>>>
>>>   hw/timer/arm_mptimer.c | 73
>>> +++++++++++++++++++++++++++++---------------------
>>>   1 file changed, 42 insertions(+), 31 deletions(-)
>>>
>>
>> Hi Peter, thanks a lot! Generally, I don't have any trouble with currently
>> missed functionality, just noticed it while was hacking my NVIDIA Tegra2
>> emulation pet-project and decided to contribute =).
>>
>> It looks like you are trying to duplicate what generic ptimer is already
>> doing, isn't it?
>>
>
> Yes, ptimer was probably the correct way to do this in the first
> place. Some of the new code structures introduced in this patch series
> are directly applicable though for that conversion effort.
>

I looked into doing this with ptimer, and pitmer doesn't really play
nice with periodic down counters. You could do the subtractions
against an up counter with the load value but that seems just as
complex as the current solution IMO. The hardest part is setting the
counter value on an already running timer.

The alternative is to patch ptimer to handle down timers.

Regards,
Peter

> Regards,
> Peter
>
>> --
>> Dmitry
>>



reply via email to

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