summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSibi Sankar <quic_sibis@quicinc.com>2024-10-30 18:25:11 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-22 15:39:54 +0100
commit3eb311649c89d9e8cc2420518372779c36ef64f5 (patch)
treec5760b762f743c853afeb1a05c60a317b2a58894
parent201fb9e164a1e4c5937de2cf58bcb0327c08664f (diff)
downloadlinux-stable-3eb311649c89d9e8cc2420518372779c36ef64f5.tar.gz
linux-stable-3eb311649c89d9e8cc2420518372779c36ef64f5.tar.bz2
linux-stable-3eb311649c89d9e8cc2420518372779c36ef64f5.zip
pmdomain: arm: Use FLAG_DEV_NAME_FW to ensure unique names
commit 0bf020344204a2c1067b7562b6a247e6c689e28b upstream. The domain attributes returned by the perf protocol can end up reporting identical names across domains, resulting in debugfs node creation failure. Use the GENPD_FLAG_DEV_NAME_FW to ensure the genpd providers end up with an unique name. Logs: [X1E reports 'NCC' for all its scmi perf domains] debugfs: Directory 'NCC' with parent 'pm_genpd' already present! debugfs: Directory 'NCC' with parent 'pm_genpd' already present! Reported-by: Johan Hovold <johan+linaro@kernel.org> Closes: https://lore.kernel.org/lkml/ZoQjAWse2YxwyRJv@hovoldconsulting.com/ Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Cc: stable@vger.kernel.org Message-ID: <20241030125512.2884761-6-quic_sibis@quicinc.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/pmdomain/arm/scmi_perf_domain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pmdomain/arm/scmi_perf_domain.c b/drivers/pmdomain/arm/scmi_perf_domain.c
index d7ef46ccd9b8..3693423459c9 100644
--- a/drivers/pmdomain/arm/scmi_perf_domain.c
+++ b/drivers/pmdomain/arm/scmi_perf_domain.c
@@ -125,7 +125,8 @@ static int scmi_perf_domain_probe(struct scmi_device *sdev)
scmi_pd->ph = ph;
scmi_pd->genpd.name = scmi_pd->info->name;
scmi_pd->genpd.flags = GENPD_FLAG_ALWAYS_ON |
- GENPD_FLAG_OPP_TABLE_FW;
+ GENPD_FLAG_OPP_TABLE_FW |
+ GENPD_FLAG_DEV_NAME_FW;
scmi_pd->genpd.set_performance_state = scmi_pd_set_perf_state;
scmi_pd->genpd.attach_dev = scmi_pd_attach_dev;
scmi_pd->genpd.detach_dev = scmi_pd_detach_dev;