From 4362d4f975f6816bcdcd8cb52de4165db2b1cd17 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Mon, 27 Nov 2023 07:16:31 +0100 Subject: [PATCH] drivers: clk: remove spinlock in clk_print_tree() 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 Signed-off-by: Etienne Carriere --- core/drivers/clk/clk.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/drivers/clk/clk.c b/core/drivers/clk/clk.c index afe81482f20..333d91f68fc 100644 --- a/core/drivers/clk/clk.c +++ b/core/drivers/clk/clk.c @@ -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); } }