* [PATCH] x86: use num_online_nodes to get physical cpus numbers for powernow_k8
@ 2007-08-23 1:44 Yinghai Lu
0 siblings, 0 replies; only message in thread
From: Yinghai Lu @ 2007-08-23 1:44 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen, Dave Jones, Mark Langsdorf
Cc: Linux Kernel Mailing List
[PATCH] x86: use num_online_nodes to get physical cpus numbers for powernow_k8
For opteron based system, don't assume all physical cpus have the same booted cpus even same cores. esp for downcore case.
Signed-off-by: Yinghai Lu <yinghai.sun.com>
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 34ed53a..372df6e 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1325,21 +1325,16 @@ 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/booted_cores,
+ num_online_nodes(),
boot_cpu_data.x86_model_id, supported_cpus);
return cpufreq_register_driver(&cpufreq_amd64_driver);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-23 1:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23 1:44 [PATCH] x86: use num_online_nodes to get physical cpus numbers for powernow_k8 Yinghai Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®