From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 4/4] ARM: architected timers: add support for UP timer
Date: Tue, 14 Feb 2012 11:19:26 +0000 [thread overview]
Message-ID: <4F3A433E.4070309@arm.com> (raw)
In-Reply-To: <4F399798.8010601@codeaurora.org>
Hi Christopher,
On 13/02/12 23:07, Christopher Covington wrote:
> On 02/01/2012 11:59 AM, Marc Zyngier wrote:
>> If CONFIG_LOCAL_TIMERS is not defined, let the architected timer
>> driver register a single clock_event_device that is used as a
>> global timer.
>
> [snip]
>
>> static int __init arch_timer_common_register(void)
>> {
>> @@ -277,7 +281,16 @@ static int __init arch_timer_common_register(void)
>> }
>> }
>>
>> - err = local_timer_register(&arch_timer_ops);
>> +#ifdef CONFIG_LOCAL_TIMERS
>> + if (is_smp())
>> + err = local_timer_register(&arch_timer_ops);
>> + else
>> +#endif
>> + {
>> + arch_timer_global_evt.cpumask = cpumask_of(0);
>> + err = arch_timer_setup(&arch_timer_global_evt);
>> + }
>> +
>> if (err)
>> goto out_free_irq;
>>
>
> The logic here seems unnecessarily split between the preprocessor and
> compiler. Certainly this can be revised to a more elegant form that
> better keeps with the guidelines on ifdef usage [1].
>
> 1. http://www.linuxjournal.com/article/5780?page=0,3
This would require a small change in the local timer code (basically
refusing to register a local timer if not on an SMP platform). But this
is just moving code from one #ifdef section to another...
Thanks for reviewing.
M.
--
Jazz is not dead. It just smells funny...
prev parent reply other threads:[~2012-02-14 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 16:59 [PATCH v2 0/4] A7/A15 architected timer support Marc Zyngier
2012-02-01 16:59 ` [PATCH v2 1/4] ARM: local timers: Add A15 " Marc Zyngier
2012-02-13 23:03 ` Christopher Covington
2012-02-01 16:59 ` [PATCH v2 2/4] ARM: architected timers: Add A15 specific sched_clock implementation Marc Zyngier
2012-02-01 16:59 ` [PATCH v2 3/4] ARM: architected timers: add DT support Marc Zyngier
2012-02-13 23:05 ` Christopher Covington
2012-02-01 16:59 ` [PATCH v2 4/4] ARM: architected timers: add support for UP timer Marc Zyngier
2012-02-13 23:07 ` Christopher Covington
2012-02-14 11:19 ` Marc Zyngier [this message]
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=4F3A433E.4070309@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