Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: Add some more lockdep assertions

We don't check to make sure the enable_lock is held across
enable/disable and we don't check if the prepare_lock is held
across prepare/unprepare. Add some asserts to catch any future
locking problems.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

+8
+8
drivers/clk/clk.c
··· 543 543 544 544 static void clk_core_unprepare(struct clk_core *core) 545 545 { 546 + lockdep_assert_held(&prepare_lock); 547 + 546 548 if (!core) 547 549 return; 548 550 ··· 590 588 static int clk_core_prepare(struct clk_core *core) 591 589 { 592 590 int ret = 0; 591 + 592 + lockdep_assert_held(&prepare_lock); 593 593 594 594 if (!core) 595 595 return 0; ··· 648 644 649 645 static void clk_core_disable(struct clk_core *core) 650 646 { 647 + lockdep_assert_held(&enable_lock); 648 + 651 649 if (!core) 652 650 return; 653 651 ··· 697 691 static int clk_core_enable(struct clk_core *core) 698 692 { 699 693 int ret = 0; 694 + 695 + lockdep_assert_held(&enable_lock); 700 696 701 697 if (!core) 702 698 return 0;