[PATCH v6] OMAP2+: PM: omap device: API's for handling mstandby mode

Cousson, Benoit b-cousson at ti.com
Thu Dec 2 03:22:38 EST 2010


Hi Adrian and Manju,

On 12/2/2010 8:58 AM, Adrian Hunter wrote:
> On 02/12/10 08:12, ext G, Manjunath Kondaiah wrote:
>> * Adrian Hunter<adrian.hunter at nokia.com>   [2010-12-01 22:16:44 +0200]:
>>> On 01/12/10 20:47, ext G, Manjunath Kondaiah wrote:

[...]

>>> Also, there is a mutex but don't these functions get called
>>> sometimes in interrupt context?
>>
>> I feel we should leave this to caller of these API's. The caller should
>> make sure that, he disables interrupts if it is used in interrupt context.
>
> How does that help?  It seems to me that a mutex cannot be used for this.

That mutex is the one that was protecting the hwmod list and should not 
be used, we do have a per-hwmod mutex.
But it will disappear soon, Paul already submitted a patch to replace it 
by a spinlock (8297db801c424f95ef3ebfbd28e62b94798d35dd)

Please note that the goal of this API is to not be used at all :-)
It is there because of dirty HW bugs in several IPs.
So I'm fine to limit its usability and to prevent its usage everywhere.
Thanks to the spinlock it will anyway no longer be an issue.

Thanks,
Benoit



More information about the linux-arm-kernel mailing list