Skip to content

Commit

Permalink
[CPUFREQ] Do not set policy for offline cpus
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dave Jones <[email protected]>
  • Loading branch information
prarit authored and Dave Jones committed Aug 4, 2009
1 parent 26d204a commit 42c74b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,8 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)

spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu(j, policy->cpus) {
if (!cpu_online(j))
continue;
per_cpu(cpufreq_cpu_data, j) = policy;
per_cpu(policy_cpu, j) = policy->cpu;
}
Expand Down

0 comments on commit 42c74b8

Please sign in to comment.