* [PATCH] clk: add debug message showing which unused clocks are disabled on boot
@ 2022-11-17 10:58 Brian Masney
2023-03-29 21:49 ` Stephen Boyd
0 siblings, 1 reply; 4+ messages in thread
From: Brian Masney @ 2022-11-17 10:58 UTC (permalink / raw)
To: sboyd, mturquette; +Cc: linux-clk, linux-kernel
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.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 57b83665e5c3..ddf5a48e72b6 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -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);
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: add debug message showing which unused clocks are disabled on boot
2022-11-17 10:58 [PATCH] clk: add debug message showing which unused clocks are disabled on boot Brian Masney
@ 2023-03-29 21:49 ` Stephen Boyd
2023-03-30 14:05 ` Brian Masney
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2023-03-29 21:49 UTC (permalink / raw)
To: Brian Masney, mturquette; +Cc: linux-clk, linux-kernel
Quoting Brian Masney (2022-11-17 02:58:29)
> 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.
>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: add debug message showing which unused clocks are disabled on boot
2023-03-29 21:49 ` Stephen Boyd
@ 2023-03-30 14:05 ` Brian Masney
2023-04-11 19:30 ` Brian Masney
0 siblings, 1 reply; 4+ messages in thread
From: Brian Masney @ 2023-03-30 14:05 UTC (permalink / raw)
To: Stephen Boyd; +Cc: mturquette, linux-clk, linux-kernel
On Wed, Mar 29, 2023 at 02:49:50PM -0700, Stephen Boyd wrote:
> Quoting Brian Masney (2022-11-17 02:58:29)
> > 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.
> >
> > Signed-off-by: Brian Masney <bmasney@redhat.com>
> > ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: add debug message showing which unused clocks are disabled on boot
2023-03-30 14:05 ` Brian Masney
@ 2023-04-11 19:30 ` Brian Masney
0 siblings, 0 replies; 4+ messages in thread
From: Brian Masney @ 2023-04-11 19:30 UTC (permalink / raw)
To: Stephen Boyd; +Cc: mturquette, linux-clk, linux-kernel
On Thu, Mar 30, 2023 at 10:05:37AM -0400, Brian Masney wrote:
> On Wed, Mar 29, 2023 at 02:49:50PM -0700, Stephen Boyd wrote:
> > Quoting Brian Masney (2022-11-17 02:58:29)
> > > 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.
> > >
> > > Signed-off-by: Brian Masney <bmasney@redhat.com>
> > > ---
> >
> > 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.
Just to close out this thread, I submitted a patch to the docs tree.
https://lore.kernel.org/lkml/20230411192153.289688-1-bmasney@redhat.com/T/#u
Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-11 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-17 10:58 [PATCH] clk: add debug message showing which unused clocks are disabled on boot Brian Masney
2023-03-29 21:49 ` Stephen Boyd
2023-03-30 14:05 ` Brian Masney
2023-04-11 19:30 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).