public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 14/15] ARM: local timers: convert MSM to runtime registration interface
Date: Fri, 27 Jan 2012 17:12:24 +0000	[thread overview]
Message-ID: <4F22DAF8.30303@arm.com> (raw)
In-Reply-To: <4F22CC05.6040709@codeaurora.org>

On 27/01/12 16:08, Stephen Boyd wrote:
> On 01/20/12 04:04, Marc Zyngier wrote:
>> Convert the MSM timers to the runtime registration interface.
>>
>>
> 
> Acked-by: Stephen Boyd <sboyd@codeaurora•org>

Thanks Stephen.

>> Tested-by: David Brown <davidb@codeaurora•org>
>> Acked-by: David Brown <davidb@codeaurora•org>
>> Signed-off-by: Marc Zyngier <marc.zyngier@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.

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.

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

  reply	other threads:[~2012-01-27 17:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 12:03 [PATCH v4 00/15] Runtime registration for local timers Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 01/15] ARM: smp_twd: make local_timer_stop a symbol instead of a #define Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 02/15] ARM: local timers: introduce a new registration interface Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 03/15] ARM: smp_twd: add runtime registration support Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 04/15] ARM: smp_twd: add device tree support Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 05/15] ARM: OMAP4: convert to twd_local_timer_register() interface Marc Zyngier
2012-01-20 12:43   ` Tony Lindgren
2012-01-20 12:49     ` Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 06/15] ARM: plat-versatile: " Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 07/15] ARM: tegra: " Marc Zyngier
2012-01-20 17:40   ` Stephen Warren
2012-01-20 12:03 ` [PATCH v4 08/15] ARM: shmobile: " Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 09/15] ARM: ux500: " Marc Zyngier
     [not found]   ` <CANmRt2gjhg-nznAOxQHA1g7EX+F4uEjp1nW5iT3Rtw4s8y5uGg@mail.gmail.com>
2012-03-14 17:39     ` Lee Jones
2012-03-15 11:47       ` Marc Zyngier
2012-03-15 14:31         ` Lee Jones
2012-01-20 12:03 ` [PATCH v4 10/15] ARM: highbank: " Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 11/15] ARM: imx6q: " Marc Zyngier
2012-01-20 12:41   ` Shawn Guo
2012-01-20 12:48     ` Marc Zyngier
2012-01-20 12:03 ` [PATCH v4 12/15] ARM: smp_twd: remove old local timer interface Marc Zyngier
2012-01-20 12:04 ` [PATCH v4 13/15] ARM: local timers: convert exynos to runtime registration interface Marc Zyngier
2012-01-20 12:04 ` [PATCH v4 14/15] ARM: local timers: convert MSM " Marc Zyngier
2012-01-27 16:08   ` Stephen Boyd
2012-01-27 17:12     ` Marc Zyngier [this message]
2012-01-20 12:04 ` [PATCH v4 15/15] ARM: local timers: make the runtime registration interface mandatory Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F22DAF8.30303@arm.com \
    --to=marc.zyngier@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox