Commit a7201156 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] more-for_each_cpu-conversions fix

I screwed up this conversion - we should be iterating across online CPUs, not
possible ones.

Spotted by Joe Perches <joe@perches.com>

Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 674a396c
...@@ -1145,14 +1145,14 @@ static int __cpuinit powernowk8_init(void) ...@@ -1145,14 +1145,14 @@ static int __cpuinit powernowk8_init(void)
{ {
unsigned int i, supported_cpus = 0; unsigned int i, supported_cpus = 0;
for_each_cpu(i) { for_each_online_cpu(i) {
if (check_supported_cpu(i)) if (check_supported_cpu(i))
supported_cpus++; supported_cpus++;
} }
if (supported_cpus == num_online_cpus()) { if (supported_cpus == num_online_cpus()) {
printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron processors (" VERSION ")\n", printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron "
supported_cpus); "processors (" VERSION ")\n", supported_cpus);
return cpufreq_register_driver(&cpufreq_amd64_driver); return cpufreq_register_driver(&cpufreq_amd64_driver);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment