[PATCH v7 1/2] provide lock-less versions of clk_{enable|disable}
Sekhar Nori
nsekhar at ti.com
Mon Dec 12 01:02:11 PST 2016
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.
> name would be clk_enable_locked.
I am not sure the new name you propose is much clearer. Unless I am
missing an obvious naming pattern in kernel. Besides, I want to have the
"davinci_" prefix for consistency with how other mach-davinci internal
functions are named. FWIW, the equivalent function in common-clk is
called clk_core_enable().
>
> Would it be more sensible to convert davinci to common-clk?
Yes, but there is no work going on on that and AFAIK, know one is
planning on working on it too. These patches are needed anyway since we
need to fix the existing issue on v4.10
Thanks,
Sekhar
More information about the linux-arm-kernel
mailing list