cpufreq regression on imx6q sabresd

Aisheng Dong aisheng.dong at nxp.com
Tue Oct 13 07:58:42 EDT 2020


> From: Viresh Kumar <viresh.kumar at linaro.org>
> Sent: Tuesday, October 13, 2020 5:28 PM
> 
> On 13-10-20, 09:00, Aisheng Dong wrote:
> > Hi
> >
> > Cpufreq on MX6Q SDB becomes unwork since next-20200902 and this issue
> > also exist with latest linux-next next-20201012.
> >
> > Error log as follows:
> > [    6.782395] cpu cpu0: failed to disable 852MHz OPP
> > [    6.787246] cpu cpu0: failed to disable 1.2GHz OPP
> > [    6.792189] cpu cpu0: failed to init cpufreq table: -61
> > [    6.800234] imx6q-cpufreq: probe of imx6q-cpufreq failed with error -61
> >
> > Simply back to next-20200828 version for drivers/opp can avoid this issue.
> > e.g. git checkout next-20200828 drivers/opp/ So the issue seems to be
> > related to OPP changes.
> >
> > $ git log --oneline --no-merges next-20200828..next-20201012
> > drivers/opp/
> 
> diff with 20200902 would have been more interesting as you said it didn't work
> there either ? I had a look at it and am not sure why would it fail this way.
> 
> I tried to look into this but I am afraid you need to dig in a bit further to see
> where it is going bad.
> 

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.

Regards
Aisheng

> Hint, from the error message and the return error (ENOENT), it looks like there
> are no entires in the OPP table that are valid and so a count of 0 is returned,
> which made OPP core return ENOENT. You need to look into why the count is
> zero, while you were able to add the OPP table.
> 
> --
> viresh


More information about the linux-arm-kernel mailing list