From: sashiko-bot@kernel.org
To: "Dario Binacchi" <dario.binacchi@amarulasolutions.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v2 2/4] pmdomain: imx: gpcv2: Keep the domains left on by the bootloader
Date: Sun, 22 Nov 2026 10:12:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-227887@kernel.org> (raw)
In-Reply-To: <20261122095927.2631909-3-dario.binacchi@amarulasolutions.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] pmdomain: imx: gpcv2: async pm_runtime_put() before disable
in probe()
--
commit bc7dd5905cdf54cdef1c1603983c4dca7eef08f7
Author: Dario Binacchi <dario.binacchi@amarulasolutions.com>
pmdomain: imx: gpcv2: Keep the domains left on by the bootloader
This commit checks the ADB400 power-up handshake acknowledge bit during
probe to detect domains left on by the bootloader and registers them as
active in genpd while acquiring their runtime PM, regulator, and clock
resources.
> diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c
> index 6a54ee7345146..71e551f0471d2 100644
> --- a/drivers/pmdomain/imx/gpcv2.c
> +++ b/drivers/pmdomain/imx/gpcv2.c
[ ... ]
> @@ -1362,11 +1415,20 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
> &domain->genpd);
> if (ret) {
> dev_err_probe(domain->dev, ret, "Failed to add genpd provider\n");
> - goto out_genpd_remove;
> + goto out_clk_disable;
> }
>
> return 0;
>
> +out_clk_disable:
> + if (!init_off && domain->keep_clocks)
> + clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
> +out_regulator_disable:
> + if (!init_off && !IS_ERR(domain->regulator))
> + regulator_disable(domain->regulator);
> +out_put_pm:
> + if (!init_off)
> + pm_runtime_put(domain->dev);
> out_genpd_remove:
> pm_genpd_remove(&domain->genpd);
> out_domain_unmap:
[Severity: Medium]
Should out_put_pm use pm_runtime_put_sync(domain->dev) like
imx_pgc_domain_remove() does?
pm_runtime_put() queues an asynchronous runtime suspend work item that is
immediately canceled by the following pm_runtime_disable() call under
out_domain_unmap. If regulator_enable(), clk_bulk_prepare_enable(), or
of_genpd_add_provider_simple() fails on a boot-on domain, domain->dev is
left in RPM_ACTIVE and leaks the active reference on its parent device and
any parent power domain.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122095927.2631909-1-dario.binacchi@amarulasolutions.com?part=2
next prev parent reply other threads:[~2026-11-22 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 9:59 [PATCH v2 0/4] pmdomain: imx: Keep the domains left on by the bootloader Dario Binacchi
2026-11-22 9:59 ` [PATCH v2 1/4] pmdomain: imx8m-blk-ctrl: Remove the power notifier on probe failure Dario Binacchi
2026-11-22 9:59 ` [PATCH v2 2/4] pmdomain: imx: gpcv2: Keep the domains left on by the bootloader Dario Binacchi
2026-11-22 10:12 ` sashiko-bot [this message]
2026-11-22 9:59 ` [PATCH v2 3/4] pmdomain: imx8m-blk-ctrl: " Dario Binacchi
2026-11-22 9:59 ` [PATCH v2 4/4] pmdomain: imx8m-blk-ctrl: Hold boot-on domain clocks until sync_state Dario Binacchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-227887@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox