clk: add debug message showing which unused clocks are disabled on boot
PATCH 1/1 clk: add debug message showing which unused clocks are disabled on boot
The clk framework on bootup will automatically disable all unused clocks on bootup unless the clk_ignore_unused kernel parameter is present. Let's add a basic debugging log statement here that shows which clocks are disabled. There is already tracepoint present here as well, but there's nothing like a simple, good ol' fashioned printk for simplicity.
--- drivers/clk/clk.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk.c +1 -0
@@ -1352,6 +1352,7 @@ static void __init clk_disable_unused_subtree(struct clk_core *core)* back to .disable */ if (clk_core_is_enabled (core)) { +dev_dbg (core->dev,"Powering off unused clock %s\n" , core->name);trace_clk_disable (core);if (core->ops->disable_unused) core->ops->disable_unused (core->hw);
Signature · 1 line
2.38.1
Stephen Boyd
maintainerQuoting Brian Masney (2022-11-17 02:58:29)
Quoted 8 lines
The clk framework on bootup will automatically disable all unused clocks on bootup unless the
clk_ignore_unusedkernel parameter is present. Let's add a basic debugging log statement here that shows which clocks are disabled. There is already tracepoint present here as well, but there's nothing like a simple, good ol' fashioned printk for simplicity.Signed-off-by Brian Masney <[email protected]>---
I'd like to see a documentation update instead that covers how to enable the tracepoint on the kernel commandline and have it print to the serial console.
Quoted 7 lines · Stephen Boyd
Quoting Brian Masney (2022-11-17 02:58:29)
Quoted 6 lines
The clk framework on bootup will automatically disable all unused clocks on bootup unless the
clk_ignore_unusedkernel parameter is present. Let's add a basic debugging log statement here that shows which clocks are disabled. There is already tracepoint present here as well, but there's nothing like a simple, good ol' fashioned printk for simplicity.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Brian Masney <[email protected]>---
I'd like to see a documentation update instead that covers how to enable the tracepoint on the kernel commandline and have it print to the serial console.
Sure, I can do that. I see there's a section 'Disabling clock gating of unused clocks' in Documentation/driver-api/clk.rst where I think this would be appropriate.
Brian
Quoted 11 lines · Brian Masney
Quoted 10 lines · Stephen Boyd
Quoting Brian Masney (2022-11-17 02:58:29)
Quoted 8 lines
The clk framework on bootup will automatically disable all unused clocks on bootup unless the
clk_ignore_unusedkernel parameter is present. Let's add a basic debugging log statement here that shows which clocks are disabled. There is already tracepoint present here as well, but there's nothing like a simple, good ol' fashioned printk for simplicity.Signed-off-by Brian Masney <[email protected]>---
Quoted 7 lines
Quoted 3 lines
I'd like to see a documentation update instead that covers how to enable the tracepoint on the kernel commandline and have it print to the serial console.
Sure, I can do that. I see there's a section 'Disabling clock gating of unused clocks' in
Documentation/driver-api/clk.rstwhere I think this would be appropriate.
Just to close out this thread, I submitted a patch to the docs tree.
https://lore.kernel.org/lkml/[email protected]/T/#u
Brian