From: cov@codeaurora.org (Christopher Covington)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/4] ARM: architected timers: add support for UP timer
Date: Mon, 13 Feb 2012 18:07:04 -0500 [thread overview]
Message-ID: <4F399798.8010601@codeaurora.org> (raw)
In-Reply-To: <1328115575-24866-5-git-send-email-marc.zyngier@arm.com>
Hi Marc,
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
Regards,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2012-02-13 23:07 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 [this message]
2012-02-14 11:19 ` 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=4F399798.8010601@codeaurora.org \
--to=cov@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.