Re: [PATCH] clk: add new Kconfig to control default behavior of disabling unused clocks

From: Hans de Goede

Date: Tue Mar 17 2026 - 11:15:56 EST


Hi,

On 17-Mar-26 16:00, Brian Masney wrote:
> On Tue, Mar 17, 2026 at 04:20:06PM +0200, Abel Vesa wrote:
>> On 26-03-17 10:13:08, Brian Masney wrote:
>>> FWIW, the only reason I posted this patch is because at the end of
>>> Stephen's LPC talk I got the impression that this was also an acceptable
>>> change. I'm fine with dropping this change.
>>
>> Here is the scenario that proves adding such config isn't the right
>> solution: think of single kernel image working with different SoCs from
>> different vendors. This is actually the case where distros need to have
>> a way to provide one kernel image + thousands of DTBs and be able to
>> boot one each one of the boards. Whatever this config is set to in the
>> kernel image, it will not work with all platforms.
>
> Agreed.
>
> However, with or without this new Kconfig, we have this problem today.
> Right now the kernel isn't bootable on large numbers of systems, and
> people have to manually add clk_ignore_unused.
>
> I agree though that we don't want to penalize boards that are doing
> things right, and have a full clock tree described with higher power
> draw.
>
> As a test, on my Thinkpad x13s (sc8280xp) clk_disable_unused on Fedora
> 43 turns off 96 clocks on this laptop! I can infer what some of the
> clocks do based on their names, however I'm not in Qualcomm, and some
> of these clocks I'm not entire sure which ones would need
> CLK_IGNORE_UNUSED. I got it down to a set of 7 possible clocks that
> may need that flag by excluding some classes of clocks, such as usb.

My plan for the T14s is to:

1) Make sure I've working debug output in some form at this point
of the boot, since lately the screen seems to go black during boot
until the msm driver loads. Something which I / we really need to
get to the bottom too.

2) Add printk-s of the clock name before disabling the clock,
then sleep 10s then disable clock and move on to the next 1.

So the last clock you see printed before things go sideways will
then need a CLK_IGNORE_UNUSED.

At least that is my naive plan for when I can make some time for
this.

Regards,

Hans