linux/arch/arm
Marc Zyngier 2f0778afac ARM: 7205/2: 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.
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@openwrt.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Colin Cross <ccross@android.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: STEricsson <STEricsson_nomadik_linux@list.st.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Tested-by: Jamie Iles <jamie@jamieiles.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-12-18 23:00:26 +00:00
..
boot Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux into devel-stable 2011-12-08 18:02:04 +00:00
common ARM: 7183/1: vic: register the VIC for ST-modified VIC's 2011-12-11 09:56:57 +00:00
configs Merge branch 'defconfigs-for-arnd' of git://git.linaro.org/people/triad/linux-stericsson into fixes 2011-11-29 14:50:17 +00:00
include/asm ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
kernel ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
lib ARM: lib: add call_with_stack function for safely changing stack 2011-12-12 16:07:35 +00:00
mach-at91 ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-bcmring Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-clps711x Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-cns3xxx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-davinci ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-dove ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-ebsa110 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-ep93xx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-exynos Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-footbridge Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-gemini ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-h720x ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-highbank Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-imx Merge branch 'imx-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes 2011-11-23 20:26:57 +00:00
mach-integrator ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-iop13xx ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-iop32x Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-iop33x Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-ixp4xx ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-ixp23xx ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-ixp2000 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-kirkwood ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-ks8695 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-l7200/include/mach ARM: add an extra temp register to the low level debugging addruart macro 2011-09-26 10:11:25 -04:00
mach-lpc32xx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-mmp ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-msm Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-mv78xx0 ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-mx5 Merge branch 'cleanups/assorted' into imx-fixes-for-arnd 2011-11-22 11:32:39 +01:00
mach-mxs Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-netx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-nomadik Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-omap1 ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-omap2 ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-orion5x ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-picoxcell ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-pnx4008 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-prima2 ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-pxa ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-realview Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-rpc Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-s3c64xx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-s3c2410 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-s3c2412 Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:18:05 -07:00
mach-s3c2416 Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:21:21 -07:00
mach-s3c2440 Merge branch 'next/cleanup3' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:18:05 -07:00
mach-s3c2443 Merge branch 'next/devel2' of git://git.linaro.org/people/arnd/arm-soc 2011-11-05 18:21:21 -07:00
mach-s5p64x0 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-s5pc100 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-s5pv210 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-sa1100 ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-shark Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-shmobile Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-spear3xx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-spear6xx Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-tcc8k Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2011-10-28 12:02:27 -07:00
mach-tegra ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-u300 ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
mach-ux500 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-versatile Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-vexpress Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-vt8500 ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-w90x900 Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mach-zynq Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
mm Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux into devel-stable 2011-12-08 18:02:04 +00:00
nwfpe
oprofile
plat-iop ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-mxc ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-nomadik ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-omap ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-orion ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-pxa Merge git://git.infradead.org/mtd-2.6 2011-11-07 09:11:16 -08:00
plat-s3c24xx ARM: SAMSUNG: inclusion export.h instead of module.h 2011-11-17 01:14:38 +09:00
plat-s5p ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
plat-samsung ARM: SAMSUNG: include linux/types.h at gpio-cfg.h 2011-11-17 01:17:18 +09:00
plat-spear Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable 2011-12-05 23:27:59 +00:00
plat-tcc ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
plat-versatile ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00
tools ARM: Update mach-types to fix mxs build breakage 2011-11-17 07:49:17 +08:00
vfp arm: remove several unnecessary module.h include instances 2011-10-31 19:30:48 -04:00
Kconfig ARM: stop: execute platform callback from cpu_stop code 2011-12-12 16:07:35 +00:00
Kconfig-nommu
Kconfig.debug Merge branch 'next/soc' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:08:03 -07:00
Makefile ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos 2011-11-06 13:54:56 +09:00