[CPUFREQ] powernow-k8 compile fix.
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 9 Jul 2007 18:35:27 +0000 (11:35 -0700)
committerDave Jones <davej@redhat.com>
Fri, 13 Jul 2007 05:29:51 +0000 (01:29 -0400)
Make it compile on UP.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index 9773368..93192d7 100644 (file)
@@ -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);
        }