Commit 42c74b84c64633dd3badbfc2abd2ef1728b64b30

Authored by Prarit Bhargava
Committed by Dave Jones
1 parent 26d204afa1

[CPUFREQ] Do not set policy for offline cpus

Suspend/Resume fails on multi socket, multi core systems because the cpufreq
code erroneously sets the per_cpu policy_cpu value when a logical cpu is
offline.

This most notably results in missing sysfs files that are used to set the
cpu frequencies of the various cpus.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/cpufreq/cpufreq.c
... ... @@ -924,6 +924,8 @@
924 924  
925 925 spin_lock_irqsave(&cpufreq_driver_lock, flags);
926 926 for_each_cpu(j, policy->cpus) {
  927 + if (!cpu_online(j))
  928 + continue;
927 929 per_cpu(cpufreq_cpu_data, j) = policy;
928 930 per_cpu(policy_cpu, j) = policy->cpu;
929 931 }