summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-04-02 07:51:33 +0300
committerSasha Levin <sasha.levin@oracle.com>2015-04-25 00:13:44 +0300
commit5f44e3971fd6c83677a844f396a9e57b179e266f (patch)
tree0251df0799c249991cd97356f720dd7b9f927622 /mm
parent42d921d36be6e0d315d1354921eaf0813544267c (diff)
downloadlinux-5f44e3971fd6c83677a844f396a9e57b179e266f.tar.xz
cpufreq: Schedule work for the first-online CPU on resume
[ Upstream commit c75de0ac0756d4b442f460e10461720c7c2412c2 ] All CPUs leaving the first-online CPU are hotplugged out on suspend and and cpufreq core stops managing them. On resume, we need to call cpufreq_update_policy() for this CPU's policy to make sure its frequency is in sync with cpufreq's cached value, as it might have got updated by hardware during suspend/resume. The policies are always added to the top of the policy-list. So, in normal circumstances, CPU 0's policy will be the last one in the list. And so the code checks for the last policy. But there are cases where it will fail. Consider quad-core system, with policy-per core. If CPU0 is hotplugged out and added back again, the last policy will be on CPU1 :( To fix this in a proper way, always look for the policy of the first online CPU. That way we will be sure that we are calling cpufreq_update_policy() for the only CPU that wasn't hotplugged out. Cc: 3.15+ <stable@vger.kernel.org> # 3.15+ Fixes: 2f0aea936360 ("cpufreq: suspend governors on system suspend/hibernate") Reported-by: Saravana Kannan <skannan@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Saravana Kannan <skannan@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions