cpufreq regression on imx6q sabresd

Viresh Kumar viresh.kumar at linaro.org
Wed Oct 14 00:12:39 EDT 2020


On 13-10-20, 11:58, Aisheng Dong wrote:
> I think it's caused by the patch below:
> 90d46d71cce2 opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()
> 
> My kernel is next-20201012.
> $ git log --no-merges --oneline -n10 drivers/opp/
> a5663c9b1e31 opp: Allow opp-level to be set to 0
> cb60e9602cce opp: Prevent memory leak in dev_pm_opp_attach_genpd()
> 0ff25c99042a opp: Allow opp-supported-hw to contain multiple versions
> 2c59138c22f1 opp: Set required OPPs in reverse order when scaling down
> 60cdeae0d627 opp: Reduce code duplication in _set_required_opps()
> 475ac8ead803 opp: Drop unnecessary check from dev_pm_opp_attach_genpd()
> 90d46d71cce2 opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()
> 922ff0759a16 opp: Don't drop reference for an OPP table that was never parsed
> dd461cd9183f opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER
> 8aaf6264fc7f opp: Remove _dev_pm_opp_find_and_remove_table() wrapper
> 
> If back to the version earlier than that commit, the issue was gone.
> e.g.
> git checkout 922ff0759a16 drivers/opp/
> NOTE: no dt changes. Only opp changes.
> 
> As I'm busy with some other urgent things, so still did not spend too much time to dig
> Into the code to see why the issue happened.
> I may find some time to look into it later if no one else look at it.

This should fix it.

Subject: [PATCH] opp: Don't always remove static OPPs in
 _of_add_opp_table_v1()

The patch missed returning 0 early in case of success and hence the
static OPPs got removed by mistake. Fix it.

Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()")
Reported-by: Aisheng Dong <aisheng.dong at nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar at linaro.org>
---
 drivers/opp/of.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 874b58756220..9faeb83e4b32 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -944,6 +944,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
 		nr -= 2;
 	}
 
+	return 0;
+
 remove_static_opp:
 	_opp_remove_all_static(opp_table);
 
-- 
viresh



More information about the linux-arm-kernel mailing list