diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:42:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:42:01 -0400 |
commit | 4d5709a7b7d54fc5882d2943a14988a92d48c00a (patch) | |
tree | 1415777e91045e2c890b6960a597eb0e8c183442 /arch/x86/kernel/cpu | |
parent | 57c5b9998ea05a90ebacaa13c45f985ffe09dbe9 (diff) | |
parent | 9eb59573d4b86f347e6cd04f47a4c2082009fa58 (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')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/e_powersaver.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/elanfreq.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longhaul.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k6.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 13 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/sc520_freq.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | 1 |
14 files changed, 9 insertions, 22 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index b6434a7ef8b2..ffd01e5dcb52 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -646,7 +646,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
646 | policy->cpuinfo.transition_latency = | 646 | policy->cpuinfo.transition_latency = |
647 | perf->states[i].transition_latency * 1000; | 647 | perf->states[i].transition_latency * 1000; |
648 | } | 648 | } |
649 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
650 | 649 | ||
651 | data->max_freq = perf->states[0].core_frequency * 1000; | 650 | data->max_freq = perf->states[0].core_frequency * 1000; |
652 | /* table init */ | 651 | /* table init */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c index 66acd5039918..32f0bda3fc95 100644 --- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -363,7 +363,6 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
363 | policy->cur = nforce2_get(policy->cpu); | 363 | policy->cur = nforce2_get(policy->cpu); |
364 | policy->min = policy->cpuinfo.min_freq; | 364 | policy->min = policy->cpuinfo.min_freq; |
365 | policy->max = policy->cpuinfo.max_freq; | 365 | policy->max = policy->cpuinfo.max_freq; |
366 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
367 | 366 | ||
368 | return 0; | 367 | return 0; |
369 | } | 368 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c index f43d98e11cc7..c11baaf9f2b4 100644 --- a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c +++ b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c | |||
@@ -253,7 +253,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
253 | f_table[k].frequency = CPUFREQ_TABLE_END; | 253 | f_table[k].frequency = CPUFREQ_TABLE_END; |
254 | } | 254 | } |
255 | 255 | ||
256 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
257 | policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ | 256 | policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ |
258 | policy->cur = fsb * current_multiplier; | 257 | policy->cur = fsb * current_multiplier; |
259 | 258 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c index f317276afa7a..1e7ae7dafcf6 100644 --- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c | |||
@@ -219,7 +219,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | /* cpuinfo and default policy values */ | 221 | /* cpuinfo and default policy values */ |
222 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
223 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 222 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
224 | policy->cur = elanfreq_get_cpu_frequency(0); | 223 | policy->cur = elanfreq_get_cpu_frequency(0); |
225 | 224 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index 461dabc4e495..ed2bda127c44 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -420,7 +420,6 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) | |||
420 | policy->min = maxfreq / POLICY_MIN_DIV; | 420 | policy->min = maxfreq / POLICY_MIN_DIV; |
421 | policy->max = maxfreq; | 421 | policy->max = maxfreq; |
422 | policy->cur = curfreq; | 422 | policy->cur = curfreq; |
423 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
424 | policy->cpuinfo.min_freq = maxfreq / max_duration; | 423 | policy->cpuinfo.min_freq = maxfreq / max_duration; |
425 | policy->cpuinfo.max_freq = maxfreq; | 424 | policy->cpuinfo.max_freq = maxfreq; |
426 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 425 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index f0cce3c2dc3a..5045f5d583c8 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -710,6 +710,10 @@ static int enable_arbiter_disable(void) | |||
710 | reg = 0x78; | 710 | reg = 0x78; |
711 | dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, | 711 | dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, |
712 | NULL); | 712 | NULL); |
713 | /* Find PM133/VT8605 host bridge */ | ||
714 | if (dev == NULL) | ||
715 | dev = pci_get_device(PCI_VENDOR_ID_VIA, | ||
716 | PCI_DEVICE_ID_VIA_8605_0, NULL); | ||
713 | /* Find CLE266 host bridge */ | 717 | /* Find CLE266 host bridge */ |
714 | if (dev == NULL) { | 718 | if (dev == NULL) { |
715 | reg = 0x76; | 719 | reg = 0x76; |
@@ -918,7 +922,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
918 | if ((longhaul_version != TYPE_LONGHAUL_V1) && (scale_voltage != 0)) | 922 | if ((longhaul_version != TYPE_LONGHAUL_V1) && (scale_voltage != 0)) |
919 | longhaul_setup_voltagescaling(); | 923 | longhaul_setup_voltagescaling(); |
920 | 924 | ||
921 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
922 | policy->cpuinfo.transition_latency = 200000; /* nsec */ | 925 | policy->cpuinfo.transition_latency = 200000; /* nsec */ |
923 | policy->cur = calc_speed(longhaul_get_cpu_mult()); | 926 | policy->cur = calc_speed(longhaul_get_cpu_mult()); |
924 | 927 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 4c76b511e194..8eb414b906d2 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -229,7 +229,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
229 | cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu); | 229 | cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu); |
230 | 230 | ||
231 | /* cpuinfo and default policy values */ | 231 | /* cpuinfo and default policy values */ |
232 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
233 | policy->cpuinfo.transition_latency = 1000000; /* assumed */ | 232 | policy->cpuinfo.transition_latency = 1000000; /* assumed */ |
234 | policy->cur = stock_freq; | 233 | policy->cur = stock_freq; |
235 | 234 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index f89524051e4a..6d0285339317 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c | |||
@@ -160,7 +160,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) | |||
160 | } | 160 | } |
161 | 161 | ||
162 | /* cpuinfo and default policy values */ | 162 | /* cpuinfo and default policy values */ |
163 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
164 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 163 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
165 | policy->cur = busfreq * max_multiplier; | 164 | policy->cur = busfreq * max_multiplier; |
166 | 165 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index ca3e1d341889..7decd6a50ffa 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -637,8 +637,6 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy) | |||
637 | printk (KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n", | 637 | printk (KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n", |
638 | minimum_speed/1000, maximum_speed/1000); | 638 | minimum_speed/1000, maximum_speed/1000); |
639 | 639 | ||
640 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
641 | |||
642 | policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency); | 640 | policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency); |
643 | 641 | ||
644 | policy->cur = powernow_get(0); | 642 | policy->cur = powernow_get(0); |
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 */ |
77 | static u32 find_freq_from_fiddid(u32 fid, u32 did) | 77 | static 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 | ||
82 | static u32 find_khz_freq_from_fiddid(u32 fid, u32 did) | 85 | static 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 = { | |||
1325 | static int __cpuinit powernowk8_init(void) | 1327 | static 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 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c index b8fb4b521c62..d9f3e90a7ae0 100644 --- a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c +++ b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c | |||
@@ -111,7 +111,6 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy) | |||
111 | return -ENODEV; | 111 | return -ENODEV; |
112 | 112 | ||
113 | /* cpuinfo and default policy values */ | 113 | /* cpuinfo and default policy values */ |
114 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
115 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ | 114 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ |
116 | policy->cur = sc520_freq_get_cpu_frequency(0); | 115 | policy->cur = sc520_freq_get_cpu_frequency(0); |
117 | 116 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 6c5dc2c85aeb..811d47438546 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -393,7 +393,6 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
393 | 393 | ||
394 | freq = get_cur_freq(policy->cpu); | 394 | freq = get_cur_freq(policy->cpu); |
395 | 395 | ||
396 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
397 | policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ | 396 | policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ |
398 | policy->cur = freq; | 397 | policy->cur = freq; |
399 | 398 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index a5b2346faf1f..36685e8f7be1 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -348,7 +348,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
348 | (speed / 1000)); | 348 | (speed / 1000)); |
349 | 349 | ||
350 | /* cpuinfo and default policy values */ | 350 | /* cpuinfo and default policy values */ |
351 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
352 | policy->cur = speed; | 351 | policy->cur = speed; |
353 | 352 | ||
354 | result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); | 353 | result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index e1c509aa3054..f2b5a621d27b 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -290,7 +290,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
290 | (speed / 1000)); | 290 | (speed / 1000)); |
291 | 291 | ||
292 | /* cpuinfo and default policy values */ | 292 | /* cpuinfo and default policy values */ |
293 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
294 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 293 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
295 | policy->cur = speed; | 294 | policy->cur = speed; |
296 | 295 | ||