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

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

On 12/09/2011 09:33 AM, Marc Zyngier wrote:
> sched_clock() is yet another blocker on the road to the single
> image. This patch implements an idea by Russell King:
> 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.
> If the platform doesn't provide a read(), the code falls back
> to the jiffy counter (just like the default sched_clock).
> 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).
> Tested on 11MPCore, OMAP4 and Tegra.
> Cc: Imre Kaloz <kaloz@xxxxxxxxxxx>
> Cc: Krzysztof Halasa <khc@xxxxxxxxx>
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Cc: Eric Miao <eric.y.miao@xxxxxxxxx>
> Cc: Colin Cross <ccross@xxxxxxxxxxx>
> Cc: Erik Gilling <konkers@xxxxxxxxxxx>
> Cc: Olof Johansson <olof@xxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
> Cc: Sascha Hauer <kernel@xxxxxxxxxxxxxx>
> Cc: Alessandro Rubini <rubini@xxxxxxxx>
> Cc: STEricsson <STEricsson_nomadik_linux@xxxxxxxxxxx>
> Cc: Lennert Buytenhek <kernel@xxxxxxxxxxxxxx>
> Cc: Nicolas Pitre <nico@xxxxxxxxxxx>
> Cc: Ben Dooks <ben-linux@xxxxxxxxx>
> Cc: Kukjin Kim <>
> Cc: Jamie Iles <jamie@xxxxxxxxxxxxx>
> Tested-by: Jamie Iles <jamie@xxxxxxxxxxxxx>
> Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> ---
> I'm reposting this patch with the hope that it (or Russell's
> alternative patch
> will get merged in 3.3. It doesn't look intrusive enough to be
> left on the side of the road for yet another cycle...

Please! I've been holding off on (re)doing and submitting sched_clock
support for highbank until this goes in.


linux-arm-kernel mailing list

[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter