interconnect: qcom: rpm: fix msm8996 interconnect registration
Subsystems (3)
cover interconnect: qcom: rpm: fix msm8996 interconnect registration
Christophe noticed that a recent patch adding a missing clock disable to one of the Qualcomm rpm driver error paths was broken. This would lead to the provider not being registered on msm8996 which is the only platform using this code path.
Turns out, however, that the power domain attach during probe is bogus and would always succeed as any power domain would already have been attached by the platform bus code.
Georgi, the offending commit is currently in your icc-next (and local icc-fixes) branch. Perhaps you can fold in the fixup unless you prefer applying it on top.
The bogus PM domain lookup is redundant and confusing but should otherwise be benign so the removal could be applied to either branch.
Johan
Johan Hovold (2):
interconnect: qcom: rpm: fix msm8996 interconnect registration
interconnect: qcom: rpm: drop bogus pm domain attach
drivers/interconnect/qcom/icc-rpm.c | 5 ----- drivers/interconnect/qcom/icc-rpm.h | 1 - drivers/interconnect/qcom/msm8996.c | 1 - 3 files changed, 7 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/2 interconnect: qcom: rpm: fix msm8996 interconnect registration
A recent commit broke interconnect provider registration for the msm8996 platform by accidentally removing a conditional when adding the missing clock disable in the power-domain lookup error path.
--- drivers/interconnect/qcom/icc-rpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/interconnect/qcom/icc-rpm.c +2 -1
@@ -498,7 +498,8 @@ int qnoc_probe(struct platform_device *pdev)if (desc->has_bus_pd) { ret =dev_pm_domain_attach (dev, true); - goto err_disable_clks; +if (ret) + goto err_disable_clks; } provider = &qp->provider;
Signature · 1 line
2.39.2
Quoted 5 lines · Johan Hovold
A recent commit broke interconnect provider registration for the msm8996 platform by accidentally removing a conditional when adding the missing clock disable in the power-domain lookup error path.
Fixes b6edcc7570b2 ("interconnect: qcom: rpm: fix probe PM domain error handling")
The hash seems to be different:
Quoted 13 lines
Reported-by Christophe JAILLET <[email protected]>Cc [email protected] # 5.17Signed-off-by Johan Hovold <[email protected]>--- drivers/interconnect/qcom/icc-rpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/interconnect/qcom/icc-rpm.c +0
-0
drivers/interconnect/qcom/icc-rpm.c int qnoc_probe(struct platform_device *pdev) · line 502
Quoted 6 lines
drivers/interconnect/qcom/icc-rpm.c +2
-1@@ -498,7 +498,8 @@ int qnoc_probe(struct platform_device *pdev)if (desc->has_bus_pd) { ret =dev_pm_domain_attach (dev, true); - goto err_disable_clks; +if (ret) + goto err_disable_clks;
*wipes glasses*.. right..
Konrad
Quoted 3 lines
drivers/interconnect/qcom/icc-rpm.c +0
-0} provider = &qp->provider;
Quoted 9 lines · Konrad Dybcio
Quoted 5 lines · Johan Hovold
A recent commit broke interconnect provider registration for the msm8996 platform by accidentally removing a conditional when adding the missing clock disable in the power-domain lookup error path.
Fixes b6edcc7570b2 ("interconnect: qcom: rpm: fix probe PM domain error handling")The hash seems to be different:
Bah, thanks for catching that.
Georgi, can you change this to:
unless you decide to fold this fixup in?
Quoted 4 lines
Quoted 4 lines
Reported-by Christophe JAILLET <[email protected]>Cc [email protected] # 5.17Signed-off-by Johan Hovold <[email protected]>
Johan
PATCH 2/2 interconnect: qcom: rpm: drop bogus pm domain attach
In reply to Johan HovoldAny power domain would already have been attached by the platform bus code so drop the bogus power domain attach which always succeeds from probe.
This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm:
Add support for bus power domain").
--- drivers/interconnect/qcom/icc-rpm.c | 6 ------ drivers/interconnect/qcom/icc-rpm.h | 1 - drivers/interconnect/qcom/msm8996.c | 1 - 3 files changed, 8 deletions(-)
drivers/interconnect/qcom/icc-rpm.c +0 -6
@@ -496,12 +496,6 @@ int qnoc_probe(struct platform_device *pdev)if (ret)return ret; -if (desc->has_bus_pd) { - ret =dev_pm_domain_attach (dev, true); -if (ret) - goto err_disable_clks; - } - provider = &qp->provider; provider->dev = dev; provider->set = qcom_icc_set;
drivers/interconnect/qcom/icc-rpm.h +0 -1
@@ -91,7 +91,6 @@ struct qcom_icc_desc {size_t num_nodes;const char *const *clocks;size_t num_clocks; -bool has_bus_pd;enum qcom_icc_type type;const struct regmap_config *regmap_cfg;unsigned int qos_offset;
drivers/interconnect/qcom/msm8996.c +0 -1
@@ -1823,7 +1823,6 @@ static const struct qcom_icc_desc msm8996_a0noc = { .num_nodes = ARRAY_SIZE(a0noc_nodes), .clocks = bus_a0noc_clocks, .num_clocks = ARRAY_SIZE(bus_a0noc_clocks), - .has_bus_pd = true, .regmap_cfg = &msm8996_a0noc_regmap_config };
Signature · 1 line
2.39.2
Re: [PATCH 2/2] interconnect: qcom: rpm: drop bogus pm domain attach
Quoted 11 lines · Johan Hovold
Any power domain would already have been attached by the platform bus code so drop the bogus power domain attach which always succeeds from probe.
This effectively reverts commit
7de109c0abe9("interconnect: icc-rpm:
Add support for bus power domain").Fixes 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")Cc Yassine Oudjana <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Running Friday's -next (so, without your cleanups):
cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
Quoted 1 line
on
Removing the pd attach:
cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
Quoted 1 line
on
Also removing the other consumer of this genpd, the simple-pm-bus hosting PCIe:
cat /sys/kernel/debug/pm_genpd/aggre0_noc/current_state
Quoted 1 line
on
So it looks like that's the case!
Konrad
Quoted 46 lines
drivers/interconnect/qcom/icc-rpm.c | 6 ------ drivers/interconnect/qcom/icc-rpm.h | 1 - drivers/interconnect/qcom/msm8996.c | 1 - 3 files changed, 8 deletions(-)drivers/interconnect/qcom/icc-rpm.c +0
-6@@ -496,12 +496,6 @@ int qnoc_probe(struct platform_device *pdev)if (ret)return ret; -if (desc->has_bus_pd) { - ret =dev_pm_domain_attach (dev, true); -if (ret) - goto err_disable_clks; - } - provider = &qp->provider; provider->dev = dev; provider->set = qcom_icc_set;drivers/interconnect/qcom/icc-rpm.h +0
-1@@ -91,7 +91,6 @@ struct qcom_icc_desc {size_t num_nodes;const char *const *clocks;size_t num_clocks; -bool has_bus_pd;enum qcom_icc_type type;const struct regmap_config *regmap_cfg;unsigned int qos_offset;drivers/interconnect/qcom/msm8996.c +0
-1@@ -1823,7 +1823,6 @@ static const struct qcom_icc_desc msm8996_a0noc = { .num_nodes = ARRAY_SIZE(a0noc_nodes), .clocks = bus_a0noc_clocks, .num_clocks = ARRAY_SIZE(bus_a0noc_clocks), - .has_bus_pd = true, .regmap_cfg = &msm8996_a0noc_regmap_config };
Georgi Djakov
maintainerRe: [PATCH 2/2] interconnect: qcom: rpm: drop bogus pm domain attach
In reply to Johan HovoldHi Johan,
Quoted 49 lines · Johan Hovold
Any power domain would already have been attached by the platform bus code so drop the bogus power domain attach which always succeeds from probe.
This effectively reverts commit
7de109c0abe9("interconnect: icc-rpm:
Add support for bus power domain").Fixes 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")Cc Yassine Oudjana <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/interconnect/qcom/icc-rpm.c | 6 ------ drivers/interconnect/qcom/icc-rpm.h | 1 - drivers/interconnect/qcom/msm8996.c | 1 - 3 files changed, 8 deletions(-)drivers/interconnect/qcom/icc-rpm.c
Quoted 1 line
drivers/interconnect/qcom/icc-rpm.c +0
-0index
3b055cd893ea..c303ce22a7cd100644drivers/interconnect/qcom/icc-rpm.c +0
-6@@ -496,12 +496,6 @@ int qnoc_probe(struct platform_device *pdev)if (ret)return ret; -if (desc->has_bus_pd) { - ret =dev_pm_domain_attach (dev, true); -if (ret) - goto err_disable_clks; - } - provider = &qp->provider; provider->dev = dev; provider->set = qcom_icc_set;drivers/interconnect/qcom/icc-rpm.h +0
-1@@ -91,7 +91,6 @@ struct qcom_icc_desc {size_t num_nodes;const char *const *clocks;size_t num_clocks; -bool has_bus_pd;enum qcom_icc_type type;const struct regmap_config *regmap_cfg;unsigned int qos_offset;drivers/interconnect/qcom/msm8996.c +0
-0
drivers/interconnect/qcom/msm8996.c static const struct qcom_icc_desc msm8996_a0noc = { · line 1828
Quoted 7 lines
drivers/interconnect/qcom/msm8996.c +0
-1@@ -1823,7 +1823,6 @@ static const struct qcom_icc_desc msm8996_a0noc = { .num_nodes = ARRAY_SIZE(a0noc_nodes), .clocks = bus_a0noc_clocks, .num_clocks = ARRAY_SIZE(bus_a0noc_clocks), - .has_bus_pd = true, .regmap_cfg = &msm8996_a0noc_regmap_config };
To make it a complete revert, I'll fold this in:
drivers/interconnect/qcom/icc-rpm.c +0 -1
@@ -11,7 +11,6 @@#include <linux/of_device.h> #include <linux/of_platform.h> #include <linux/platform_device.h> -#include <linux/pm_domain.h> #include <linux/regmap.h> #include <linux/slab.h>
Thanks,
Georgi
Re: [PATCH 2/2] interconnect: qcom: rpm: drop bogus pm domain attach
Quoted 21 lines · Georgi Djakov
Hi Johan,
Quoted 10 lines · Johan Hovold
Any power domain would already have been attached by the platform bus code so drop the bogus power domain attach which always succeeds from probe.
This effectively reverts commit
7de109c0abe9("interconnect: icc-rpm:
Add support for bus power domain").Fixes 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain")Cc Yassine Oudjana <[email protected]>Signed-off-by Johan Hovold <[email protected]>To make it a complete revert, I'll fold this in:
drivers/interconnect/qcom/icc-rpm.c +0
-0
drivers/interconnect/qcom/icc-rpm.c line 15
Quoted 6 lines
drivers/interconnect/qcom/icc-rpm.c +0
-1@@ -11,7 +11,6 @@#include <linux/of_device.h> #include <linux/of_platform.h> #include <linux/platform_device.h> -#include <linux/pm_domain.h> #include <linux/regmap.h> #include <linux/slab.h>
Thanks for catching that!
Johan
Georgi Djakov
maintainerHi Johan,
Thank you for all the fixes!
Quoted 4 lines · Johan Hovold
Christophe noticed that a recent patch adding a missing clock disable to one of the Qualcomm rpm driver error paths was broken. This would lead to the provider not being registered on msm8996 which is the only platform using this code path.
Thanks Christophe for catching this!
Quoted 3 lines
Turns out, however, that the power domain attach during probe is bogus and would always succeed as any power domain would already have been attached by the platform bus code.
Thanks Konrad for testing and confirming!
Quoted 6 lines
Georgi, the offending commit is currently in your icc-next (and local icc-fixes) branch. Perhaps you can fold in the fixup unless you prefer applying it on top.
The bogus PM domain lookup is redundant and confusing but should otherwise be benign so the removal could be applied to either branch.
Maybe then I'll just drop this:
interconnect: qcom: rpm: fix probe PM domain error handling
and apply this one instead:
interconnect: qcom: rpm: drop bogus pm domain attach
BR,
Georgi
Quoted 13 lines
Johan
Johan Hovold (2):
interconnect: qcom: rpm: fix msm8996 interconnect registration
interconnect: qcom: rpm: drop bogus pm domain attachdrivers/interconnect/qcom/icc-rpm.c | 5 ----- drivers/interconnect/qcom/icc-rpm.h | 1 - drivers/interconnect/qcom/msm8996.c | 1 - 3 files changed, 7 deletions(-)
Quoted 11 lines · Georgi Djakov
Quoted 6 lines
Georgi, the offending commit is currently in your icc-next (and local icc-fixes) branch. Perhaps you can fold in the fixup unless you prefer applying it on top.
The bogus PM domain lookup is redundant and confusing but should otherwise be benign so the removal could be applied to either branch.
Maybe then I'll just drop this:
interconnect: qcom: rpm: fix probe PM domain error handling
and apply this one instead:
interconnect: qcom: rpm: drop bogus pm domain attach
Sure, that works too. Wasn't sure whether you preferred incremental fixes on top or not.
I've checked the end result in linux-next against my local branch and everything looks good.
Thanks for getting that sorted.
Johan