[PATCH v2] clocksource: exynos-mct: Register the timer for stable udelay

amit daniel kachhap amit.daniel at samsung.com
Fri Jun 20 04:19:47 PDT 2014


On Fri, Jun 20, 2014 at 1:45 PM, Will Deacon <will.deacon at arm.com> wrote:
> On Thu, Jun 19, 2014 at 05:40:49PM +0100, Tomasz Figa wrote:
>> On 19.06.2014 18:31, Doug Anderson wrote:
>> >>> My personal vote would be to submit a patch to change "cycles_t" to
>> >>> always be 32-bits.  Given that 32-bits was fine for udelay() for ARM
>> >>> that seems sane and simple.  If someone later comes up with a super
>> >>> compelling reason why we need 64-bit timers for udelay (really??) then
>> >>> they can later add all the complexity needed.
>> >>
>> >> Yes, this could work. I'm not sure what else cycles_t is used for, though.
>> >
>> > True, it is a bit questionable to change this since it's a type that's
>> > not obviously just for udelay().  Perhaps a better option would be to
>> > make a new typedef for the result of read_current_timer().  ...or just
>> > change it to return a u32?
>> >
>>
>> Sounds good to me, but let's hear other opinions. I'm adding Will and
>> Jonathan as they wrote the ARM delay timer code.
>
> I think cycles_t is only used for small interval calculations at the moment,
> but I remember Ted mentioning something about using it (or something
> similar) as a source of early entropy, in which case the more bits the
> better.
>
Will,
Thanks for the clarification that cycles_t is used for short
intervals. So it is safe to return lower 32 bit
counter for read_current_timer.

Tomasz, Doug,
As of now let me send a minimal implementation of this read delay
timer to fix the broken udelay for exynos platforms so that it goes to
upstream in rc releases. I will also prepare a fix for all
raw_readl/writel in mct to relaxed version to make it consistent.

> That said, I can't find any code in the tree to that effect.
>
> Will
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list