Skip to contentSkip to conversation

ARM: sched_clock: allow sched_clock to be selected at runtime

PATCH Superseded Marc Zyngier 2 participants 3 messages Aug 30, 2011 – Sep 2, 2011

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: sched_clock: allow sched_clock to be selected at runtime

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).

Tested on 11MPCore, OMAP4 and Tegra.

Cc Imre Kaloz <[email protected]>
Cc Krzysztof Halasa <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Eric Miao <[email protected]>
Cc Colin Cross <[email protected]>
Cc Erik Gilling <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Alessandro Rubini <[email protected]>
Cc STEricsson <[email protected]>
Cc Lennert Buytenhek <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Ben Dooks <[email protected]>
Cc Kukjin Kim <[email protected]>

---
Based on 3.1-rc4.

#1 lore raw

PATCH v3 1/1 ARM: sched_clock: allow sched_clock to be selected at runtime

Quoted 11 lines · Marc Zyngier

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.

Quoted 7 lines

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.

Great, seems to boot just fine with printk_time :)

I gave it a quick boot test on omap16xx, 2420, 3430, 3630 and 4430:

#2 lore raw

PATCH v3 1/1 ARM: sched_clock: allow sched_clock to be selected at runtime

Hi Tony,

Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Marc Zyngier

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).

Quoted 8 lines
Quoted 1 line

Tested on 11MPCore, OMAP4 and Tegra.

Great, seems to boot just fine with printk_time :)

I gave it a quick boot test on omap16xx, 2420, 3430, 3630 and 4430:

Thanks for testing!.

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...