aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-12 18:42:01 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-12 18:42:01 -0400
commit4d5709a7b7d54fc5882d2943a14988a92d48c00a (patch)
tree1415777e91045e2c890b6960a597eb0e8c183442 /arch/x86/kernel/cpu/cpufreq/powernow-k8.c
parent57c5b9998ea05a90ebacaa13c45f985ffe09dbe9 (diff)
parent9eb59573d4b86f347e6cd04f47a4c2082009fa58 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Don't take semaphore in cpufreq_quick_get() [CPUFREQ] Support different families in fid/did to frequency conversion [CPUFREQ] cpufreq_stats: misc cpuinit section annotations [CPUFREQ] implement !CONFIG_CPU_FREQ stub for cpufreq_unregister_notifier() [CPUFREQ] mark hotplug notifier callback as __cpuinit [CPUFREQ] Only check for transition latency on problematic governors (kconfig fix) [CPUFREQ] allow ondemand and conservative cpufreq governors to be used as default [CPUFREQ] move policy's governor initialisation out of low-level drivers into cpufreq core [CPUFREQ] Longhaul - Add support for PM133 northbridge [CPUFREQ] x86: use num_online_nodes to get physical cpus numbers for
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/powernow-k8.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 34ed53a06730..b273b69cfddf 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -76,7 +76,10 @@ static u32 find_khz_freq_from_fid(u32 fid)
76/* Return a frequency in MHz, given an input fid and did */ 76/* Return a frequency in MHz, given an input fid and did */
77static u32 find_freq_from_fiddid(u32 fid, u32 did) 77static u32 find_freq_from_fiddid(u32 fid, u32 did)
78{ 78{
79 return 100 * (fid + 0x10) >> did; 79 if (current_cpu_data.x86 == 0x10)
80 return 100 * (fid + 0x10) >> did;
81 else
82 return 100 * (fid + 0x8) >> did;
80} 83}
81 84
82static u32 find_khz_freq_from_fiddid(u32 fid, u32 did) 85static u32 find_khz_freq_from_fiddid(u32 fid, u32 did)
@@ -1208,7 +1211,6 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1208 /* run on any CPU again */ 1211 /* run on any CPU again */
1209 set_cpus_allowed(current, oldmask); 1212 set_cpus_allowed(current, oldmask);
1210 1213
1211 pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
1212 if (cpu_family == CPU_HW_PSTATE) 1214 if (cpu_family == CPU_HW_PSTATE)
1213 pol->cpus = cpumask_of_cpu(pol->cpu); 1215 pol->cpus = cpumask_of_cpu(pol->cpu);
1214 else 1216 else
@@ -1325,21 +1327,16 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
1325static int __cpuinit powernowk8_init(void) 1327static int __cpuinit powernowk8_init(void)
1326{ 1328{
1327 unsigned int i, supported_cpus = 0; 1329 unsigned int i, supported_cpus = 0;
1328 unsigned int booted_cores = 1;
1329 1330
1330 for_each_online_cpu(i) { 1331 for_each_online_cpu(i) {
1331 if (check_supported_cpu(i)) 1332 if (check_supported_cpu(i))
1332 supported_cpus++; 1333 supported_cpus++;
1333 } 1334 }
1334 1335
1335#ifdef CONFIG_SMP
1336 booted_cores = cpu_data[0].booted_cores;
1337#endif
1338
1339 if (supported_cpus == num_online_cpus()) { 1336 if (supported_cpus == num_online_cpus()) {
1340 printk(KERN_INFO PFX "Found %d %s " 1337 printk(KERN_INFO PFX "Found %d %s "
1341 "processors (%d cpu cores) (" VERSION ")\n", 1338 "processors (%d cpu cores) (" VERSION ")\n",
1342 supported_cpus/booted_cores, 1339 num_online_nodes(),
1343 boot_cpu_data.x86_model_id, supported_cpus); 1340 boot_cpu_data.x86_model_id, supported_cpus);
1344 return cpufreq_register_driver(&cpufreq_amd64_driver); 1341 return cpufreq_register_driver(&cpufreq_amd64_driver);
1345 } 1342 }