diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-09-26 13:40:23 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-09-26 13:40:23 -0400 |
commit | e8b364b88cc4001b21c28c1ecf1e1e3ffbe162e6 (patch) | |
tree | 980f84081c2278ff2b6bb4a113d949a1730759a8 /arch/x86/platform/mrst/mrst.c | |
parent | f9d81f61c84aca693bc353dfef4b8c36c2e5e1b5 (diff) |
PM / Clocks: Do not acquire a mutex under a spinlock
Commit b7ab83e (PM: Use spinlock instead of mutex in clock
management functions) introduced a regression causing clocks_mutex
to be acquired under a spinlock. This happens because
pm_clk_suspend() and pm_clk_resume() call pm_clk_acquire() under
pcd->lock, but pm_clk_acquire() executes clk_get() which causes
clocks_mutex to be acquired. Similarly, __pm_clk_remove(),
executed under pcd->lock, calls clk_put(), which also causes
clocks_mutex to be acquired.
To fix those problems make pm_clk_add() call pm_clk_acquire(), so
that pm_clk_suspend() and pm_clk_resume() don't have to do that.
Change pm_clk_remove() and pm_clk_destroy() to separate
modifications of the pcd->clock_list list from the actual removal of
PM clock entry objects done by __pm_clk_remove().
Reported-and-tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/x86/platform/mrst/mrst.c')
0 files changed, 0 insertions, 0 deletions