lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20211209085609.E6498C341C8@smtp.kernel.org>
Date:   Thu, 09 Dec 2021 00:56:08 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        dmitry.baryshkov@...aro.org
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 1/2] clk: Introduce CLK_ASSUME_ENABLED_WHEN_UNUSED

Quoting Bjorn Andersson (2021-12-02 19:54:35)
> Some clock implementations doesn't provide means of implementing
> is_enabled(), but still requires to be explicitly disabled when found
> unused as part of clk_disable_unused().
> 
> One such set of clocks are Qualcomm's display RCGs. These can be enabled
> and disabled automatically by the hardware, so it's not possible to
> reliably query their configuration. Further more, these clocks need to
> be disabled when unused, to allow them to be "parked" onto a safe
> parent. Failure to disable the RCG results in the hardware locking up as
> clk_disable_unused() traverses up the tree and turns off its source
> clocks.
> 
> Add a new flag, CLK_ASSUME_ENABLED_BOOT, which clock drivers can use to
> signal that these clocks should be disabled even if they don't implement
> the is_enabled() ops.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---

I'm inclined to remove the disable unused logic. It is the main cause of
problems in the clk framework and with android pushing everyone to use
modules it's become a more broken design in need of an actual fix.  The
best approach is probably to just rip it out and start over, kicking off
the process for someone to fix the power regression of any clks that are
left enabled at boot. Or we can take the regulator approach and delay
disabling for 30 seconds and keep it around.

I'd prefer we take the approach of parking clks at init instead as
Dmitry proposed. It will break continuous splash screen but I don't
think that's being used anyway?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ