From: Mason <mpeg.blue@free.fr>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
cpufreq <cpufreq@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
John Stultz <john.stultz@linaro.org>,
Stefan Agner <stefan@agner.ch>, Shawn Guo <shawn.guo@linaro.org>,
Rob Herring <robh@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: Delays, clocks, timers, hrtimers, etc
Date: Wed, 11 Feb 2015 13:58:45 -0800 [thread overview]
Message-ID: <54DBD095.3040800@free.fr> (raw)
In-Reply-To: <20150211184515.GB11190@codeaurora.org>
Stephen Boyd wrote:
> Mason wrote:
>
>> Also, you wrote "I don't see any problem with the TWD dropping the
>> dependency on SMP." Would something as simple as this be acceptable?
>> (Most probably NOT; there are a lot of smp* occurrences in smp_twd.c
>> even the file name.) What is the rationale for the dependency?
>>
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index a34698d..47b02c8 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -1565,7 +1565,6 @@ config HAVE_ARM_ARCH_TIMER
>> config HAVE_ARM_TWD
>> bool
>> - depends on SMP
>> select CLKSRC_OF if OF
>> help
>> This options enables support for the ARM timer and watchdog unit
>>
>
> Hmm it looks like we would also need to add this to the patch. It
> looks like a holdover from when the local timer APIs were around.
> Back then twd_local_timer_common_register() would fail if
> is_smp() was false or setup_max_cpus was 0. Now it will just
> register a clockevent that may or may not be used depending on
> what other clockevents are in the system and the ratings of those
> other clockevents.
>
> ----8<----
> diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
> index 172c6a05d27f..e8f6d241881f 100644
> --- a/arch/arm/kernel/smp_twd.c
> +++ b/arch/arm/kernel/smp_twd.c
> @@ -23,7 +23,6 @@
> #include <linux/of_irq.h>
> #include <linux/of_address.h>
>
> -#include <asm/smp_plat.h>
> #include <asm/smp_twd.h>
>
> /* set up by the platform code */
> @@ -388,9 +387,6 @@ static void __init twd_local_timer_of_register(struct device_node *np)
> {
> int err;
>
> - if (!is_smp() || !setup_max_cpus)
> - return;
> -
> twd_ppi = irq_of_parse_and_map(np, 0);
> if (!twd_ppi) {
> err = -EINVAL;
Looking at the difference between OF and !OF registration functions
in smp_twd.c
!OF
if (twd_base || twd_evt) return -EBUSY;
assign twd_ppi and twd_base
twd_local_timer_common_register(NULL)
OF
if (!is_smp() || !setup_max_cpus) return; // TO BE DELETED
assign twd_ppi and twd_base
twd_local_timer_common_register(np)
I suppose OF guarantees that the init code is called only once?
(Hence the !OF guard code would be unnecessary.)
Regards.
next prev parent reply other threads:[~2015-02-11 21:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 13:16 Delays, clocks, timers, hrtimers, etc Mason
2015-01-29 13:57 ` Mason
2015-02-03 12:09 ` Russell King - ARM Linux
2015-02-06 18:37 ` Mason
2015-02-06 19:14 ` Russell King - ARM Linux
2015-02-06 21:03 ` Mason
2015-02-07 10:42 ` Russell King - ARM Linux
2015-02-09 7:45 ` Michal Simek
2015-02-09 16:10 ` Sören Brinkmann
2015-02-09 23:27 ` Mason
2015-02-06 20:25 ` Stefan Agner
2015-02-06 21:17 ` Mason
2015-02-06 21:31 ` Stefan Agner
2015-02-07 2:21 ` Mason
2015-02-07 9:51 ` Russell King - ARM Linux
2015-02-09 19:01 ` Stephen Boyd
2015-02-09 22:31 ` Mason
2015-02-09 23:17 ` Stephen Boyd
2015-02-09 23:50 ` Mason
2015-02-11 17:43 ` Mason
2015-02-11 18:45 ` Stephen Boyd
2015-02-11 21:58 ` Mason [this message]
2015-02-11 23:26 ` Stephen Boyd
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=54DBD095.3040800@free.fr \
--to=mpeg.blue@free.fr \
--cc=cpufreq@vger.kernel.org \
--cc=john.stultz@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=shawn.guo@linaro.org \
--cc=stefan@agner.ch \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).