Skip to content

Commit

Permalink
drivers: clk: remove spinlock in clk_print_tree()
Browse files Browse the repository at this point in the history
Remove spinlock handling from clk_print_tree(). This lock may mask
interrupts for a long period of time which and may affect the system
behavior. Since there is no clock unregistering and clock destroying
function, all clock references used are safe to use, even outside
the locked state. Whether or not printed information is accurate is
not an issue as clk_print_tree() is concerned as the function is only
informative.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
etienne-lms authored and jforissier committed Nov 29, 2023
1 parent e64dede commit 4362d4f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,7 @@ static void print_tree(void)
void clk_print_tree(void)
{
if (IS_ENABLED(CFG_DRIVERS_CLK_PRINT_TREE)) {
uint32_t exceptions = 0;

exceptions = cpu_spin_lock_xsave(&clk_lock);
IMSG("Clock tree summary:");
IMSG("Clock tree summary (informative):");
print_tree();
cpu_spin_unlock_xrestore(&clk_lock, exceptions);
}
}

0 comments on commit 4362d4f

Please sign in to comment.