]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
cpufreq: Restore policy min/max limits on CPU online
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 21 Mar 2017 06:06:06 +0000 (11:36 +0530)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 30 Mar 2017 12:35:45 +0000 (06:35 -0600)
commit04e72fb5739e8d9d433b17333274f195625a9ab5
tree11e730b0e6a23504ca12ecdce9a695e44a90b28f
parenta9106ddee77b05feb73cc86581402888a33bf0d9
cpufreq: Restore policy min/max limits on CPU online

BugLink: http://bugs.launchpad.net/bugs/1677589
commit ff010472fb75670cb5c08671e820eeea3af59c87 upstream.

On CPU online the cpufreq core restores the previous governor (or
the previous "policy" setting for ->setpolicy drivers), but it does
not restore the min/max limits at the same time, which is confusing,
inconsistent and real pain for users who set the limits and then
suspend/resume the system (using full suspend), in which case the
limits are reset on all CPUs except for the boot one.

Fix this by making cpufreq_online() restore the limits when an inactive
policy is brought online.

The commit log and patch are inspired from Rafael's earlier work.

Reported-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/cpufreq/cpufreq.c