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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFqqCWt5oCj6qBuP_oZ=O1kmkfMirYETPXEeW-AmiA9P+g@mail.gmail.com>
Date: Mon, 28 Oct 2024 14:33:25 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc: linux-kernel@...r.kernel.org, linux-amarula@...rulasolutions.com, 
	Michael Trimarchi <michael@...rulasolutions.com>, linux-pm@...r.kernel.org
Subject: Re: [PATCH] pmdomain: core: fix "sd_count" field setting

On Thu, 24 Oct 2024 at 11:49, Dario Binacchi
<dario.binacchi@...rulasolutions.com> wrote:
>
> The "sd_count" field keeps track of the number of subdomains with power
> "on," so if pm_genpd_init() is called with the "is_off" parameter set to
> false, it means that the power domain is already on, and therefore its
> "sd_count" must be 1.

genpd_sd_counter_inc() is being called when adding subdomains. Doesn't
that work correctly for you?

>
> Co-developed-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
>

Kind regards
Uffe

> ---
>
>  drivers/pmdomain/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
> index 5ede0f7eda09..2df6dda98021 100644
> --- a/drivers/pmdomain/core.c
> +++ b/drivers/pmdomain/core.c
> @@ -2221,7 +2221,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
>         genpd_lock_init(genpd);
>         genpd->gov = gov;
>         INIT_WORK(&genpd->power_off_work, genpd_power_off_work_fn);
> -       atomic_set(&genpd->sd_count, 0);
> +       atomic_set(&genpd->sd_count, is_off ? 0 : 1);
>         genpd->status = is_off ? GENPD_STATE_OFF : GENPD_STATE_ON;
>         genpd->device_count = 0;
>         genpd->provider = NULL;
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ