linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 1/2] provide lock-less versions of clk_{enable|disable}
Date: Mon, 12 Dec 2016 14:32:11 +0530	[thread overview]
Message-ID: <e548f7cf-a1d5-0bc2-1095-db8464a1bcc4@ti.com> (raw)
In-Reply-To: <20161209185421.fybpk4bdq6b7yglf@pengutronix.de>

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

  reply	other threads:[~2016-12-12  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 16:59 [PATCH v7 1/2] provide lock-less versions of clk_{enable|disable} Alexandre Bailon
2016-12-09 16:59 ` [PATCH v7 2/2] ARM: davinci: da8xx: Fix sleeping function called from invalid context Alexandre Bailon
2017-01-02 11:01   ` Sekhar Nori
2016-12-09 18:54 ` [PATCH v7 1/2] provide lock-less versions of clk_{enable|disable} Uwe Kleine-König
2016-12-12  9:02   ` Sekhar Nori [this message]
2016-12-12 10:27     ` Alexandre Bailon
2016-12-16 20:41       ` David Lechner
2016-12-18 15:51         ` Sekhar Nori
2017-01-02 10:43           ` Sekhar Nori

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=e548f7cf-a1d5-0bc2-1095-db8464a1bcc4@ti.com \
    --to=nsekhar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).