From: Mike Turquette <mturquette@ti.com>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Mike Chan <mike@android.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] [ARM] omap: resource: Make resource_refresh() thread safe.
Date: Thu, 10 Sep 2009 23:12:38 -0500 [thread overview]
Message-ID: <4AA9CE36.3080903@ti.com> (raw)
In-Reply-To: <87eiqhkqch.fsf@deeprootsystems.com>
Kevin Hilman wrote:
> Mike Chan <mike@android.com> writes:
>
>> Need to lock the res_mutex when traversing the res_list.
>>
>> Signed-off-by: Mike Chan <mike@android.com>
>
> Looks good, thanks.
This patch causes a hang for me when transitioning to OFF mode. This
was tested on the Android 2.6.29 tree and is 100% reproducible. The
moment a user runs 'echo 1 > /sys/power/enable_off_mode' the board hangs
without any further output.
Reverting the patch allows me to hit OFF mode again. I haven't yet
tested this on vanilla 2.6.29 or latest L-O.
Mike
> Pushed to PM branch and pm-2.6.29.
>
> Kevin
>
>> ---
>> arch/arm/plat-omap/resource.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/resource.c b/arch/arm/plat-omap/resource.c
>> index 25072cd..4631912 100644
>> --- a/arch/arm/plat-omap/resource.c
>> +++ b/arch/arm/plat-omap/resource.c
>> @@ -234,11 +234,13 @@ int resource_refresh(void)
>> struct shared_resource *resp = NULL;
>> int ret = 0;
>>
>> + down(&res_mutex);
>> list_for_each_entry(resp, &res_list, node) {
>> ret = update_resource_level(resp);
>> if (ret)
>> break;
>> }
>> + up(&res_mutex);
>> return ret;
>> }
>>
>> --
>> 1.5.4.5
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2009-09-11 4:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 23:18 [PATCH] [ARM] omap: resource: Make resource_refresh() thread safe Mike Chan
2009-09-08 22:45 ` Kevin Hilman
2009-09-11 4:12 ` Mike Turquette [this message]
2009-09-11 21:10 ` Kevin Hilman
2009-09-11 22:50 ` Mike Chan
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=4AA9CE36.3080903@ti.com \
--to=mturquette@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=mike@android.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