Skip to content

Commit

Permalink
[PATCH] more-for_each_cpu-conversions fix
Browse files Browse the repository at this point in the history
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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 24, 2006
1 parent 674a396 commit a720115
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/i386/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,14 +1145,14 @@ static int __cpuinit powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;

for_each_cpu(i) {
for_each_online_cpu(i) {
if (check_supported_cpu(i))
supported_cpus++;
}

if (supported_cpus == num_online_cpus()) {
printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron processors (" VERSION ")\n",
supported_cpus);
printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron "
"processors (" VERSION ")\n", supported_cpus);
return cpufreq_register_driver(&cpufreq_amd64_driver);
}

Expand Down

0 comments on commit a720115

Please sign in to comment.