From: Andrew Morton Date: Mon, 9 Jul 2007 18:35:27 +0000 (-0700) Subject: [CPUFREQ] powernow-k8 compile fix. X-Git-Tag: v2.6.23-rc1~1076^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aac22d0a79f51d7bd93145be36322baaa4b423f8;p=linux-2.6 [CPUFREQ] powernow-k8 compile fix. Make it compile on UP. Signed-off-by: Andrew Morton Signed-off-by: Dave Jones --- diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 9773368341..93192d7e28 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -1322,16 +1322,21 @@ static struct cpufreq_driver cpufreq_amd64_driver = { 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); }