The critical clock handling in __clk_core_init isn't taking the enable lock
before calling clk_core_enable, which in turns triggers the warning in the
lockdep_assert_held call in that function when lockep is enabled.
Add the calls to clk_enable_lock/unlock to make sure it doesn't happen.
Fixes:
32b9b1096186 ("clk: Allow clocks to be marked as CRITICAL")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
core->ops->init(core->hw);
if (core->flags & CLK_IS_CRITICAL) {
+ unsigned long flags;
+
clk_core_prepare(core);
+
+ flags = clk_enable_lock();
clk_core_enable(core);
+ clk_enable_unlock(flags);
}
kref_init(&core->ref);