clocksource: Add generic dummy timer driver
authorMark Rutland <mark.rutland@arm.com>
Mon, 3 Jun 2013 20:33:53 +0000 (13:33 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 24 Jun 2013 20:27:37 +0000 (22:27 +0200)
commit064706514ec3fea740c2656e03c4f01f6a551ac4
tree84b20f418dc6939aed90184fbeaafa02a3c147b5
parent70e5975d3a04be5479a28eec4a2fb10f98ad2785
clocksource: Add generic dummy timer driver

Several architectures have a dummy timer driver tightly coupled with
their broadcast code to support machines without cpu-local timers (or
where there is a lack of driver support).

Since 12ad100046: "clockevents: Add generic timer broadcast function"
it's been possible to write broadcast-capable timer drivers decoupled
from the broadcast mechanism. We can use this functionality to implement
a generic dummy timer driver that can be shared by all architectures
with generic tick broadcast (ARCH_HAS_TICK_BROADCAST).

This patch implements a generic dummy timer using this facility.

[sboyd: Make percpu data static, use __this_cpu_ptr(), move to
        early_initcall to properly register on each CPU, only
register if more than one CPU possible]

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>,
Cc: John Stultz <john.stultz@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1370291642-13259-3-git-send-email-sboyd@codeaurora.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/clocksource/Makefile
drivers/clocksource/dummy_timer.c [new file with mode: 0644]