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 hadnling 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.

Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Nov 27, 2023
1 parent 8f8159d commit 46fb073
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 @@ -497,11 +497,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 46fb073

Please sign in to comment.