diff options
author | Prarit Bhargava <prarit@redhat.com> | 2009-08-03 16:58:11 +0200 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-08-04 20:32:10 +0200 |
commit | 42c74b84c64633dd3badbfc2abd2ef1728b64b30 (patch) | |
tree | 16b9378a38cde51f50078a2d5d41353d346d0dc4 /drivers/cpufreq/cpufreq.c | |
parent | [CPUFREQ] Fix NULL pointer dereference regression in conservative governor (diff) | |
download | linux-42c74b84c64633dd3badbfc2abd2ef1728b64b30.tar.xz linux-42c74b84c64633dd3badbfc2abd2ef1728b64b30.zip |
[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>
Diffstat (limited to '')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b90eda8b3440..120d236c0ffb 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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; } |