[PATCH v4 14/15] ARM: local timers: convert MSM to runtime registration interface
From: Marc Zyngier <hidden>
Date: 2012-01-27 17:12:24
On 27/01/12 16:08, Stephen Boyd wrote:
On 01/20/12 04:04, Marc Zyngier wrote:quoted
Convert the MSM timers to the runtime registration interface.Acked-by: Stephen Boyd <redacted>
Thanks Stephen.
quoted
Tested-by: David Brown <redacted> Acked-by: David Brown <redacted> Signed-off-by: Marc Zyngier <redacted> --- arch/arm/mach-msm/timer.c | 79 +++++++++++++++++++++++++-------------------- 1 files changed, 44 insertions(+), 35 deletions(-)diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 11d0d8f..75f4be4 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c[snip]quoted
+ +static struct local_timer_ops msm_local_timer_ops __cpuinitdata = { + .setup = msm_local_timer_setup, + .stop = msm_local_timer_stop,Would this be a good time to rename these to start/stop? setup sounds like it's done once, but its actually done every cpu up from what I recall.
I thought about that. But you could also argue that next_event() is also a kind of start for the timer. Actually, if I was to change anything about the naming, I'd turn stop to teardown. And not changing the naming makes the patch series smaller and more easily verified.
quoted
+}; +#endif /* CONFIG_LOCAL_TIMERS */ + static void __init msm_timer_init(void) { struct clock_event_device *ce = &msm_clockevent;@@ -173,8 +212,12 @@ static void __init msm_timer_init(void) *__this_cpu_ptr(msm_evt.percpu_evt) = ce; res = request_percpu_irq(ce->irq, msm_timer_interrupt, ce->name, msm_evt.percpu_evt); - if (!res) + if (!res) { enable_percpu_irq(ce->irq, 0); +#ifdef CONFIG_LOCAL_TIMERS + local_timer_register(&msm_local_timer_ops); +#endif + }It's unfortunate we can't avoid this ifdef here. O well.
I tried. It's actually uglier without the ifdef... M. -- Jazz is not dead. It just smells funny...