linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap: add rcu_locking to omap2_set_init_voltage.
@ 2012-01-09  2:14 NeilBrown
  2012-01-09 23:11 ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2012-01-09  2:14 UTC (permalink / raw)
  To: linux-arm-kernel


opp_find_freq_ceil and opp_get_voltage are documented as requiring
rcu_lock to be held.  So hold it.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 00bff46..470976e 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)) {
+		rcu_read_unlock();
 		pr_err("%s: unable to find boot up OPP for vdd_%s\n",
 			__func__, vdd_name);
 		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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120109/0cd918f9/attachment.sig>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] omap: add rcu_locking to omap2_set_init_voltage.
  2012-01-09  2:14 [PATCH] omap: add rcu_locking to omap2_set_init_voltage NeilBrown
@ 2012-01-09 23:11 ` Kevin Hilman
  2012-01-09 23:12   ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Hilman @ 2012-01-09 23:11 UTC (permalink / raw)
  To: linux-arm-kernel

NeilBrown <neilb@suse.de> writes:

> opp_find_freq_ceil and opp_get_voltage are documented as requiring
> rcu_lock to be held.  So hold it.
>
> Signed-off-by: NeilBrown <neilb@suse.de>

Missing 'ARM: ' prefix, but I added it locally and queued as a fix for
v3.3.

Thanks for the patch!

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] omap: add rcu_locking to omap2_set_init_voltage.
  2012-01-09 23:11 ` Kevin Hilman
@ 2012-01-09 23:12   ` Kevin Hilman
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2012-01-09 23:12 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/09/2012 03:11 PM, Kevin Hilman wrote:
> NeilBrown<neilb@suse.de>  writes:
>
>> opp_find_freq_ceil and opp_get_voltage are documented as requiring
>> rcu_lock to be held.  So hold it.
>>
>> Signed-off-by: NeilBrown<neilb@suse.de>
>
> Missing 'ARM: ' prefix, but I added it locally and queued as a fix for
> v3.3.

oops, sent this before I saw your updated version.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-09 23:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09  2:14 [PATCH] omap: add rcu_locking to omap2_set_init_voltage NeilBrown
2012-01-09 23:11 ` Kevin Hilman
2012-01-09 23:12   ` Kevin Hilman

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).