From: Sudeep Holla <sudeep.holla@kernel.org>
To: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
Ulf Hansson <ulfh@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Kevin Hilman <khilman@baylibre.com>,
Ulf Hansson <ulf.hansson@oss.qualcomm.com>
Subject: [PATCH RESEND 2/2] pmdomain: arm_scmi: Propagate domain hierarchy setup failures
Date: Mon, 9 Nov 2026 15:53:32 +0000 [thread overview]
Message-ID: <20261109155332.1686594-2-sudeep.holla@kernel.org> (raw)
In-Reply-To: <20261109155332.1686594-1-sudeep.holla@kernel.org>
of_genpd_add_child_ids() uses all-or-nothing semantics and reports an
error if any relationship cannot be established. The SCMI driver
currently only logs that error and completes probe, leaving domains
registered without their DT-described parent relationships.
Treat hierarchy setup failures as probe failures. Translate -ENOENT to
-EPROBE_DEFER so external parent providers can register first, remove the
onecell provider before unwinding domains, and publish driver data only
after hierarchy setup succeeds.
Fixes: fba9c703c184 ("pmdomain: arm_scmi: add support for domain hierarchies")
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
---
drivers/pmdomain/arm/scmi_pm_domain.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/pmdomain/arm/scmi_pm_domain.c b/drivers/pmdomain/arm/scmi_pm_domain.c
index b95b24470ba5..95857bebc444 100644
--- a/drivers/pmdomain/arm/scmi_pm_domain.c
+++ b/drivers/pmdomain/arm/scmi_pm_domain.c
@@ -117,19 +117,24 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
if (ret)
goto err_rm_genpds;
- dev_set_drvdata(dev, scmi_pd_data);
-
/*
* Parse (optional) power-domains-child-ids property to establish
* parent-child relationships.
*/
ret = of_genpd_add_child_ids(np, scmi_pd_data);
- if (ret < 0)
- dev_err(dev, "Failed to add child domain hierarchy: %d\n", ret);
+ if (ret < 0) {
+ ret = dev_err_probe(dev, ret == -ENOENT ? -EPROBE_DEFER : ret,
+ "failed to add child domain hierarchy\n");
+ goto err_del_provider;
+ }
+
+ dev_set_drvdata(dev, scmi_pd_data);
dev_info(dev, "Initialized %d power domains", num_domains);
return 0;
+err_del_provider:
+ of_genpd_del_provider(np);
err_rm_genpds:
for (i = num_domains - 1; i >= 0; i--) {
if (!domains[i])
--
2.43.0
next prev parent reply other threads:[~2026-11-09 15:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 15:53 [PATCH RESEND 1/2] pmdomain: arm_scmi: Skip domains that fail initialization Sudeep Holla
2026-11-09 15:53 ` Sudeep Holla [this message]
2026-11-11 12:11 ` Sudeep Holla
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=20261109155332.1686594-2-sudeep.holla@kernel.org \
--to=sudeep.holla@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=ulf.hansson@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.