From: Kevin Hilman <khilman@deeprootsystems.com>
To: Mike Chan <mike@android.com>
Cc: android-kernel@googlegroups.com,
Chunqiu Wang <cqwang@motorola.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@arm.linux.org.uk>,
Rajendra Nayak <rnayak@ti.com>,
Tero Kristo <tero.kristo@nokia.com>,
Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>,
Jouni Hogander <jouni.hogander@nokia.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] omap: resource: Add per-resource mutex for OMAP resource framework
Date: Wed, 10 Mar 2010 09:27:37 -0800 [thread overview]
Message-ID: <87eijsgk8m.fsf@deeprootsystems.com> (raw)
In-Reply-To: <8bb80c381003091611l7211439ief40c5cf31e782a0@mail.gmail.com> (Mike Chan's message of "Tue\, 9 Mar 2010 16\:11\:52 -0800")
Mike Chan <mike@android.com> writes:
> On Tue, Mar 9, 2010 at 4:09 PM, <y@google.com> wrote:
>> From: Chunqiu Wang <cqwang@motorola.com>
>>
>> Current OMAP resource fwk uses a global res_mutex
>> for resource_request and resource_release calls
>> for all the available resources.It may cause dead
>> lock if resource_request/resource_release is called
>> recursively.
>>
>> For current OMAP3 VDD1/VDD2 resource, the change_level
>> implementation is mach-omap2/resource34xx.c/set_opp(),
>> when using resource_release to remove vdd1 constraint,
>> this function may call resource_release again to release
>> Vdd2 constrait if target vdd1 level is less than OPP3.
>> in this scenario, the global res_mutex down operation
>> will be called again, this will cause the second
>> down operation hang there.
>>
>> To fix the problem, per-resource mutex is added
>> to avoid hangup when resource_request/resource_release
>> is called recursively.
>>
>> Signed-off-by: Chunqiu Wang <cqwang@motorola.com>
>> Signed-off-by: Mike Chan <mike@android.com>
>> ---
>> arch/arm/plat-omap/include/plat/resource.h | 2 ++
>> arch/arm/plat-omap/resource.c | 21 ++++++++++-----------
>> 2 files changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/include/plat/resource.h b/arch/arm/plat-omap/include/plat/resource.h
>> index 9acebcc..b5aff1f 100644
>> --- a/arch/arm/plat-omap/include/plat/resource.h
>> +++ b/arch/arm/plat-omap/include/plat/resource.h
>> @@ -54,6 +54,8 @@ struct shared_resource {
>> /* Shared resource operations */
>> struct shared_resource_ops *ops;
[...]
>
> Oops, my git client was slightly screwed up, apologies, I meant to
> send this from mike@android.com, the patch is still good though :)
>
FYI... SRF is currently only in the PM branch of the OMAP tree, is
deprecated and is not targeted for mainline.
I'll merge this there, but please note that there is no new
development happening for SRF.
Thanks,
Kevin
next prev parent reply other threads:[~2010-03-10 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <-1645286213079228429@unknownmsgid>
2010-03-10 0:11 ` [PATCH] omap: resource: Add per-resource mutex for OMAP resource framework Mike Chan
2010-03-10 17:27 ` Kevin Hilman [this message]
2010-03-10 0:09 y
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=87eijsgk8m.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=android-kernel@googlegroups.com \
--cc=cqwang@motorola.com \
--cc=ext-kalle.jokiniemi@nokia.com \
--cc=jouni.hogander@nokia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mike@android.com \
--cc=rnayak@ti.com \
--cc=tero.kristo@nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox