From: Andrew Morton Date: Fri, 24 Mar 2006 11:15:07 +0000 (-0800) Subject: [PATCH] more-for_each_cpu-conversions fix X-Git-Tag: v3.12-rc1~37805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a72011567812cbd93788cc5facda160a3cba5905;p=kernel%2Fkernel-generic.git [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 Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 3d5110b..798da7c 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -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); }