]> git.baikalelectronics.ru Git - kernel.git/commit
PM / devfreq: Fix cpufreq passive unregister erroring on PROBE_DEFER
authorChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Tue, 14 Jun 2022 23:09:47 +0000 (01:09 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 29 Jun 2022 20:11:17 +0000 (05:11 +0900)
commit609dfd12dafd041ef6705cd4ca453011b376ef2d
tree564c95082d52fe7e96a7533054fd41620a6f5636
parentd361b1e56d169bc3598efbd0e01f0bc6f3980ac1
PM / devfreq: Fix cpufreq passive unregister erroring on PROBE_DEFER

With the passive governor, the cpu based scaling can PROBE_DEFER due to
the fact that CPU policy are not ready.
The cpufreq passive unregister notifier is called both from the
GOV_START errors and for the GOV_STOP and assume the notifier is
successfully registred every time. With GOV_START failing it's wrong to
loop over each possible CPU since the register path has failed for
some CPU policy not ready. Change the logic and unregister the notifer
based on the current allocated parent_cpu_data list to correctly handle
errors and the governor unregister path.

Fixes: 0de7288a58b9 ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/governor_passive.c