[PATCH v2] pmdomain: ti-sci: skip unrepresentable power-domain IDs
Pengpeng Hou
pengpeng at iscas.ac.cn
Wed Dec 2 19:39:00 PST 2026
The domain count is the largest DT ID plus one. U32_MAX cannot be
represented by that scheme: it wraps the count to zero, but the list
still carries the ID for the final table fill.
Skip that reference during collection. Valid domains can still be
registered, and the existing xlate range check rejects a later lookup of
the skipped ID.
Fixes: efa5c01cd7ee ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one")
Cc: stable at vger.kernel.org
Signed-off-by: Pengpeng Hou <pengpeng at iscas.ac.cn>
---
Changes since v1:
Add Fixes and stable Cc. Skip just the invalid reference rather than fail
probe after other domains have been initialized.
Previous version: https://lore.kernel.org/r/20260722041142.95204-1-pengpeng@iscas.ac.cn
Codex assisted with patch preparation and the changelog.
Current review: Codex (Assisted-by: gpt 5).
Static review only; this revision was not built.
drivers/pmdomain/ti/ti_sci_pm_domains.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index 50898dc43310cf998660cd93e3b9f5488cc827d4..ca7444a5259d67eb55b4dce78729cac7d3e60f09 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -248,7 +248,8 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
"#power-domain-cells",
index, &args)) {
- if (args.args_count >= 1 && args.np == dev->of_node) {
+ if (args.args_count >= 1 && args.np == dev->of_node &&
+ args.args[0] != U32_MAX) {
bool is_on;
of_node_put(args.np);
base-commit: 693c2e04e3f1d4c59af236e1211b7b8cb165a790
More information about the linux-arm-kernel
mailing list