From: Stephen Boyd <sboyd@codeaurora.org>
To: David Lechner <david@lechnology.com>
Cc: linux-clk@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: fix reentrancy of clk_enable() on UP systems
Date: Wed, 10 Jan 2018 13:40:44 -0800 [thread overview]
Message-ID: <20180110214044.GD28313@codeaurora.org> (raw)
In-Reply-To: <1515116768-17089-1-git-send-email-david@lechnology.com>
On 01/04, David Lechner wrote:
> Reentrant calls to clk_enable() are not working on UP systems. This is
> caused by the fact spin_trylock_irqsave() always returns true when
> CONFIG_SMP=n (and CONFIG_DEBUG_SPINLOCK=n) which causes the reference
> counting to not work correctly when clk_enable_lock() is called twice
> before clk_enable_unlock() is called (this happens when clk_enable()
> is called from within another clk_enable()).
>
> This fixes the problem by skipping the call to spin_trylock_irqsave() on UP
> systems and relying solely on reference counting. We also make sure to set
> flags in this case so that we are not returning an uninitialized value.
>
> Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2018-01-10 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 1:46 David Lechner
2018-01-10 21:40 ` Stephen Boyd [this message]
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=20180110214044.GD28313@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=david@lechnology.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.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
Powered by JetHome