[RFC PATCH] ARM: sched_clock: allow sched_clock to be selected at runtime

Eric Miao eric.y.miao at gmail.com
Tue Aug 9 17:28:05 EDT 2011


On Wed, Aug 10, 2011 at 5:20 AM, Rob Herring <robherring2 at gmail.com> wrote:
> On 08/09/2011 12:13 PM, Marc Zyngier wrote:
>> sched_clock() is yet another blocker on the road to the single
>> image. This patch implements an idea by Russell King:
>>
>> http://www.spinics.net/lists/linux-omap/msg49561.html
>>
>> Instead of asking the platform to implement both sched_clock()
>> itself and the rollover callback, simply register a read()
>> function, and let the ARM code care about sched_clock() itself,
>> the conversion to ns and the rollover. sched_clock() uses
>> this read() function as an indirection to the platform code.
>>
>> This allow some simplifications and possibly some footprint gain
>> when multiple platforms are compiled in. Among the drawbacks,
>> the removal of the *_fixed_sched_clock optimization which could
>> negatively impact some platforms (sa1100, tegra, versatile
>> and omap).
>
> There are similar patchsets that move sched_clock into clocksource code.
> That seems like a cleaner approach to me.
>
> http://thread.gmane.org/gmane.linux.kernel/844872
>
> http://www.spinics.net/lists/arm-kernel/msg122716.html

+1, yeah would be better for clocksource to handle that if possible.



More information about the linux-arm-kernel mailing list