[PATCH v7 1/2] provide lock-less versions of clk_{enable|disable}

Sekhar Nori nsekhar at ti.com
Sun Dec 18 07:51:25 PST 2016


On Saturday 17 December 2016 02:11 AM, David Lechner wrote:
> On 12/12/2016 04:27 AM, Alexandre Bailon wrote:
>> On 12/12/2016 10:02 AM, Sekhar Nori wrote:
>>> Hi Uwe,
>>>
>>> On Saturday 10 December 2016 12:24 AM, Uwe Kleine-König wrote:
>>>> Hello,
>>>>
>>>> On Fri, Dec 09, 2016 at 05:59:32PM +0100, Alexandre Bailon wrote:
>>>>> Rename __clk_{enable|disble} in davinci_clk_{enable|disable}.
>>>>> davinci_clk_{enable|disable} is a lock-less version of
>>>>> clk_{enable|disable}.
>>>>> This is useful to recursively enable clock without doing recursive
>>>>> call
>>>>> to clk_enable(), which would cause a recursive locking issue.
>>>>> The lock-less version could be used by example by the usb20 phy clock,
>>>>> that need to enable the usb20 clock before to start.
>>>>
>>>> I wouldn't call that lock-less. The difference is that the newly
>>>> exposed
>>>> funcion requires the caller to already hold the lock. So maybe a better
>>>
>>> Right.
>> Is it enough to update the commit message or should I also update the
>> patch title?
>> If so, could you suggest one because I don't know how to describe it
>> shortly.
> 
> How about... "ARM: davinci: Make __clk_{enable,disable} functions public"

Looks fine to me, here is the updated subject line and commit text. No
need to resend just for this, I can adjust when applying.

"
ARM: davinci: Make __clk_{enable,disable} functions public

In some cases, there is a need to enable a clock as part of clock
enable callback of a different clock. For example, USB 2.0 PHY clock
enable requires USB 2.0 clock to be enabled. In this case, it is safe to
instead call  __clk_enable() since the clock framework lock is already
taken. calling clk_enable() causes recursive locking error.

A similar case arises in the clock disable path.

To enable such usage, make __clk_{enable,disable} functions publicly
available outside of clock.c. Also, call them
davinci_clk_{enable|disable} now to be consistent with how other
davinci-specific clock functions are named.

Note that these functions are not exported to drivers. They are meant
for usage in platform specific clock management code.
"

Thanks,
Sekhar



More information about the linux-arm-kernel mailing list