From: Kevin Hilman <khilman@ti.com>
To: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Cc: linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Thara Gopinath <thara@ti.com>,
Russell King <linux@arm.linux.org.uk>,
Philip Oberstaller <philip.oberstaller@septentrio.com>
Subject: Re: [PATCH] OMAP2 PM: do RCU locking for opp_get_voltage()
Date: Tue, 14 Feb 2012 10:48:37 -0800 [thread overview]
Message-ID: <87sjid6yka.fsf@ti.com> (raw)
In-Reply-To: <1329122644-7121-1-git-send-email-arnout@mind.be> (Arnout Vandecappelle's message of "Mon, 13 Feb 2012 09:44:04 +0100")
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> writes:
> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
>
> According to the documentation of opp_get_voltage(), it must be called
> with rcu_read_lock() held. The OMAP2 power manager doesn't do this.
> The locking error is caught by PROVE_RCU.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thanks for the patch, I've got a patch from Neil Brown queued for this
already:
http://marc.info/?l=linux-omap&m=132608991812586&w=2
Kevin
> ---
> Please CC me, I'm not on the list.
>
> I was very surprised by this error, because this is the only user of
> opp_get_voltage().
>
> Regards,
> Arnout
> ---
> arch/arm/mach-omap2/pm.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 00bff46..bce2bdc 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
> freq = clk->rate;
> clk_put(clk);
>
> + rcu_read_lock();
> opp = opp_find_freq_ceil(dev, &freq);
> if (IS_ERR(opp)) {
> pr_err("%s: unable to find boot up OPP for vdd_%s\n",
> __func__, vdd_name);
> + rcu_read_unlock();
> goto exit;
> }
>
> bootup_volt = opp_get_voltage(opp);
> + rcu_read_unlock();
> if (!bootup_volt) {
> pr_err("%s: unable to find voltage corresponding "
> "to the bootup OPP for vdd_%s\n", __func__, vdd_name);
prev parent reply other threads:[~2012-02-14 18:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 8:44 [PATCH] OMAP2 PM: do RCU locking for opp_get_voltage() Arnout Vandecappelle (Essensium/Mind)
2012-02-14 18:48 ` Kevin Hilman [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=87sjid6yka.fsf@ti.com \
--to=khilman@ti.com \
--cc=arnout@mind.be \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=philip.oberstaller@septentrio.com \
--cc=thara@ti.com \
--cc=tony@atomide.com \
/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.