clk: rockchip: fix deadlock possibility in cpuclk
Lockdep reported a possible deadlock between the cpuclk lock and for example the i2c driver. CPU0 CPU1 ---- ---- lock(clk_lock); local_irq_disable(); lock(&(&i2c->lock)->rlock); lock(clk_lock); <Interrupt> lock(&(&i2c->lock)->rlock); *** DEADLOCK *** The generic clock-types of the core ccf already use spin_lock_irqsave when touching clock registers, so do the same for the cpuclk. Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NMichael Turquette <mturquette@linaro.org> [mturquette@linaro.org: removed initialization of "flags"]
Showing
想要评论请 注册 或 登录