ANDROID: Revert "cpufreq: Avoid using inconsistent policy->min and policy->max"
The combination of the cpufreq changes that came in with v6.12.28, commit 573b0472 ("cpufreq: Avoid using inconsistent policy->min and policy->max") and commit 962d8830 ("cpufreq: Fix setting policy limits when frequency tables are used") unfortunately broke the KABI. The second of which was reverted in ad2b007e ("Revert "cpufreq: Fix setting policy limits when frequency tables are used""). However, that change is actually a necessary fix to the first. As the refactoring to passing the max and min through the arguments couldn't be done without KABI impact, the changes to be more consistent with policy->min/max ends up introducing a subtle problem where the new max value being set ends up being clamped to the current max value - thus cpufreq max can be reduced but not increased (with the min increased but not decreased). A minimal fix of this effectively undoes the key point of commit 573b0472, so it seems best to revert the whole thing for now. I think the small pre-existing risk of the policy->max/min values being read when shortly to an intermediate value before getting assigned the final value seems to be less problematic in practice. Fixes: ad2b007e ("Revert "cpufreq: Fix setting policy limits when frequency tables are used"") Bug: 428984800 Signed-off-by:John Stultz <jstultz@google.com> Change-Id: I5a76cc2b0056071ffa26a682458df5fe0a4b83a3
Loading