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: <CANMq1KDqDgdKcDWa0A15XLhS6ny3btejx5CKs07eLC8j-3Li=g@mail.gmail.com>
Date:   Fri, 11 Sep 2020 15:04:50 +0800
From:   Nicolas Boichat <drinkcat@...omium.org>
To:     Matthias Brugger <matthias.bgg@...il.com>
Cc:     Daniel Kurtz <djkurtz@...omium.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>
Subject: Re: [PATCH] soc: mediatek: Check if power domains can be powered on
 at boot time

Matthias, gentle ping on the patch below >>>

Thanks!

On Thu, Jul 30, 2020 at 12:01 PM Nicolas Boichat <drinkcat@...omium.org> wrote:
>
> In the error case, where a power domain cannot be powered on
> successfully at boot time (in mtk_register_power_domains),
> pm_genpd_init would still be called with is_off=false, and the
> system would later try to disable the power domain again, triggering
> warnings as disabled clocks are disabled again (and other potential
> issues).
>
> Fixes: c84e358718a66f7 ("soc: Mediatek: Add SCPSYS power domain driver")
> Signed-off-by: Nicolas Boichat <drinkcat@...omium.org>
>
> ---
>
>  drivers/soc/mediatek/mtk-scpsys.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
> index f669d3754627dad..0055a52a49733d5 100644
> --- a/drivers/soc/mediatek/mtk-scpsys.c
> +++ b/drivers/soc/mediatek/mtk-scpsys.c
> @@ -524,6 +524,7 @@ static void mtk_register_power_domains(struct platform_device *pdev,
>         for (i = 0; i < num; i++) {
>                 struct scp_domain *scpd = &scp->domains[i];
>                 struct generic_pm_domain *genpd = &scpd->genpd;
> +               bool on;
>
>                 /*
>                  * Initially turn on all domains to make the domains usable
> @@ -531,9 +532,9 @@ static void mtk_register_power_domains(struct platform_device *pdev,
>                  * software.  The unused domains will be switched off during
>                  * late_init time.
>                  */
> -               genpd->power_on(genpd);
> +               on = genpd->power_on(genpd) >= 0;
>
> -               pm_genpd_init(genpd, NULL, false);
> +               pm_genpd_init(genpd, NULL, !on);
>         }
>
>         /*
> --
> 2.28.0.rc0.142.g3c755180ce-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ