summaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/clk-2xxx.c
diff options
context:
space:
mode:
authorDavid Lechner2018-01-05 02:46:08 +0100
committerStephen Boyd2018-01-10 22:39:31 +0100
commita12aa8a68dfef5de181f2e555aa950a0ab05411f (patch)
treef2faf66b671c503e15028be86a07e70f63767f96 /drivers/clk/ti/clk-2xxx.c
parentLinux 4.15-rc1 (diff)
downloadkernel-qcow2-linux-a12aa8a68dfef5de181f2e555aa950a0ab05411f.tar.gz
kernel-qcow2-linux-a12aa8a68dfef5de181f2e555aa950a0ab05411f.tar.xz
kernel-qcow2-linux-a12aa8a68dfef5de181f2e555aa950a0ab05411f.zip
clk: fix reentrancy of clk_enable() on UP systems
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> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/ti/clk-2xxx.c')
0 files changed, 0 insertions, 0 deletions