[PATCH v4 14/15] ARM: local timers: convert MSM to runtime registration interface

Stephen Boyd sboyd at codeaurora.org
Fri Jan 27 11:08:37 EST 2012


On 01/20/12 04:04, Marc Zyngier wrote:
> Convert the MSM timers to the runtime registration interface.
>
>

Acked-by: Stephen Boyd <sboyd at codeaurora.org>

> Tested-by: David Brown <davidb at codeaurora.org>
> Acked-by: David Brown <davidb at codeaurora.org>
> Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
> ---
>  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]
> +
> +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.

> +};
> +#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.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.




More information about the linux-arm-kernel mailing list