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: <162821289569.19113.17542153894487967394@swboyd.mtv.corp.google.com>
Date:   Thu, 05 Aug 2021 18:21:35 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        Mike Tipton <mdtipton@...eaurora.org>,
        Taniya Das <tdas@...eaurora.org>, Vinod Koul <vkoul@...nel.org>
Cc:     linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2] clk: qcom: gdsc: Ensure regulator init state matches GDSC state

Quoting Bjorn Andersson (2021-07-21 15:40:56)
> As GDSCs are registered and found to be already enabled gdsc_init()
> ensures that 1) the kernel state matches the hardware state, and 2)
> votable GDSCs are properly enabled from this master as well.
> 
> But as the (optional) supply regulator is enabled deep into
> gdsc_toggle_logic(), which is only executed for votable GDSCs the
> kernel's state of the regulator might not match the hardware. The
> regulator might be automatically turned off if no other users are
> present or the next call to gdsc_disable() would cause an unbalanced
> regulator_disable().
> 
> But as the votable case deals with an already enabled GDSC, most of
> gdsc_enable() and gdsc_toggle_logic() can be skipped. Reducing it to
> just clearing the SW_COLLAPSE_MASK and enabling hardware control allow
> us to simply call regulator_enable() in both cases.
> 
> The enablement of hardware control seems to be an independent property
> from the GDSC being enabled, so this is moved outside that conditional
> segment.
> 
> Lastly, as the propagation of ALWAY_ON to GENPD_FLAG_ALWAYS_ON needs to
> happen regardless of the initial state this is grouped together with the
> other sc->pd updates at the end of the function.
> 
> Cc: stable@...r.kernel.org
> Fixes: 37416e554961 ("clk: qcom: gdsc: Handle GDSC regulator supplies")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---

Applied to clk-fixes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ