From: Andrew Morton Make it compile on UP. What's that divide in there for? Looks odd. Cc: Dave Jones Signed-off-by: Andrew Morton --- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -puN arch/i386/kernel/cpu/cpufreq/powernow-k8.c~git-cpufreq-fix arch/i386/kernel/cpu/cpufreq/powernow-k8.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c~git-cpufreq-fix +++ a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -1322,16 +1322,21 @@ static struct cpufreq_driver cpufreq_amd static int __cpuinit powernowk8_init(void) { unsigned int i, supported_cpus = 0; + unsigned int booted_cores = 1; for_each_online_cpu(i) { if (check_supported_cpu(i)) supported_cpus++; } +#ifdef CONFIG_SMP + booted_cores = cpu_data[0].booted_cores; +#endif + if (supported_cpus == num_online_cpus()) { printk(KERN_INFO PFX "Found %d %s " "processors (%d cpu cores) (" VERSION ")\n", - supported_cpus/cpu_data[0].booted_cores, + supported_cpus/booted_cores, boot_cpu_data.x86_model_id, supported_cpus); return cpufreq_register_driver(&cpufreq_amd64_driver); } _