]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Call cpufreq_disable_fast_switch() in sugov_exit()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Apr 2016 21:38:46 +0000 (23:38 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Apr 2016 20:41:36 +0000 (22:41 +0200)
commit8d0144cd43e6ca58a92c6b7c0068d801db5e8be3
treeb21381042f1d974f0f844d1e93b6cb84767e9a3d
parent4aa8f902a1a53023170c15412b32572d1c46af5c
cpufreq: Call cpufreq_disable_fast_switch() in sugov_exit()

Due to differences in the cpufreq core's handling of runtime CPU
offline and nonboot CPUs disabling during system suspend-to-RAM,
fast frequency switching gets disabled after a suspend-to-RAM and
resume cycle on all of the nonboot CPUs.

To prevent that from happening, move the invocation of
cpufreq_disable_fast_switch() from cpufreq_exit_governor() to
sugov_exit(), as the schedutil governor is the only user of fast
frequency switching today anyway.

That simply prevents cpufreq_disable_fast_switch() from being called
without invoking the ->governor callback for the CPUFREQ_GOV_POLICY_EXIT
event (which happens during system suspend now).

Fixes: a40016373fcd (cpufreq: Support for fast frequency switching)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h
kernel/sched/cpufreq_schedutil.c