From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: smp-twd: check for uninitialized clock in twd_cpufreq_init
Date: Fri, 17 Feb 2012 13:09:19 +0200 [thread overview]
Message-ID: <1329476959.4102.434.camel@sokoban> (raw)
In-Reply-To: <CAMQu2gzP1co6QhP-Co9wAwB_pVrjE0X_2GgGni4+t94yjHKi1g@mail.gmail.com>
On Fri, 2012-02-17 at 16:17 +0530, Shilimkar, Santosh wrote:
> On Fri, Feb 17, 2012 at 4:04 PM, Tero Kristo <t-kristo@ti.com> wrote:
> > Non-smp platforms don't have local timer support, but the twd_cpufreq_init
> > only checks for IS_ERR during init. Check against null also, to avoid
> > crashes during cpufreq transitions on non-smp platforms.
> >
> > Signed-off-by: Tero Kristo <t-kristo@ti.com>
> > ---
> I sent a patch for the same issue which Kevin reported.
Oh sorry for the noise then. I did a quick search for a similar patch
but didn't find one. This patch can be ignored.
-Tero
>
> Thread.
> http://www.spinics.net/lists/arm-kernel/msg160275.html
>
> > arch/arm/kernel/smp_twd.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
> > index 4285daa..dae8902 100644
> > --- a/arch/arm/kernel/smp_twd.c
> > +++ b/arch/arm/kernel/smp_twd.c
> > @@ -129,7 +129,7 @@ static struct notifier_block twd_cpufreq_nb = {
> >
> > static int twd_cpufreq_init(void)
> > {
> > - if (!IS_ERR(twd_clk))
> > + if (twd_clk && !IS_ERR(twd_clk))
>
> Checking the clock node is not enoough because you can
> not have clock node and rely on calibration..
> Testing twd_evt is safe to avoid the issue.
>
> Regards
> santosh
next prev parent reply other threads:[~2012-02-17 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 10:34 [PATCH] arm: smp-twd: check for uninitialized clock in twd_cpufreq_init Tero Kristo
2012-02-17 10:47 ` Shilimkar, Santosh
2012-02-17 11:09 ` Tero Kristo [this message]
2012-02-18 15:56 ` Sergei Shtylyov
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=1329476959.4102.434.camel@sokoban \
--to=t-kristo@ti.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox