From: Sudeep Holla <sudeep.holla@kernel.org>
To: Guangshuo Li <lgs201920130244@gmail.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
Ulf Hansson <ulfh@kernel.org>, Peng Fan <peng.fan@nxp.com>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pmdomain: arm: scmi: Check pm_genpd_init() in probe
Date: Mon, 6 Jul 2026 10:34:23 +0100 [thread overview]
Message-ID: <20260706-dashing-dazzling-sambar-453a4d@sudeepholla> (raw)
In-Reply-To: <20260705103256.284467-1-lgs201920130244@gmail.com>
On Sun, Jul 05, 2026 at 06:32:56PM +0800, Guangshuo Li wrote:
> scmi_pm_domain_probe() stores each domain in the onecell domains array
> after calling pm_genpd_init(), but it ignores the return value from
> pm_genpd_init().
>
> If pm_genpd_init() fails, the genpd has not been added to the global
> genpd list. The probe code nevertheless stores the genpd pointer in the
> domains array. A later provider registration failure then unwinds the
> array with pm_genpd_remove(), which can try to remove a genpd that was
> never registered.
>
> Check the return value from pm_genpd_init() and only store successfully
> initialized domains in the onecell array. On failure, unwind the domains
> that were already initialized.
>
It was done that way intentionally IIRC. We don't want to remove all the
power domains if some not so important power domains fail to initialise.
You can log the error if that helps but removing all the domains that
have initialised seems bit of extreme.
Are you facing any issues on a real platform or is this just by code
inspection.
--
Regards,
Sudeep
prev parent reply other threads:[~2026-07-06 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 10:32 [PATCH] pmdomain: arm: scmi: Check pm_genpd_init() in probe Guangshuo Li
2026-07-06 9:34 ` Sudeep Holla [this message]
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=20260706-dashing-dazzling-sambar-453a4d@sudeepholla \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ulfh@kernel.org \
/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