diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 18:57:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 18:57:29 -0400 |
commit | f8223b17550c427ac249124ff7f25722221f4591 (patch) | |
tree | 741c45fec1c747cb7866f016865822b44105d6df /arch/x86/kernel/cpu | |
parent | 98a38a5d60a6e79eaad7f4a9b68cc1bd306ac5c0 (diff) | |
parent | 1a8e1463a49aaa452da1cefe184a00d4df47f1ef (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] remove redundant sprintf from request_module call.
[CPUFREQ] cpufreq_stats.c: Fixed brace coding style issue
[CPUFREQ] Fix memory leak in cpufreq_stat
[CPUFREQ] cpufreq.h: Fix some checkpatch.pl coding style issues.
[CPUFREQ] use dynamic debug instead of custom infrastructure
[CPUFREQ] CPU hotplug, re-create sysfs directory and symlinks
[CPUFREQ] Fix _OSC UUID in pcc-cpufreq
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 45 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longhaul.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longrun.c | 17 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | 51 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 33 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 100 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/sc520_freq.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 23 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | 28 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | 43 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | 41 |
15 files changed, 197 insertions, 240 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index a2baafb2fe6d..4e04e1274388 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -47,9 +47,6 @@ | |||
47 | #include <asm/cpufeature.h> | 47 | #include <asm/cpufeature.h> |
48 | #include "mperf.h" | 48 | #include "mperf.h" |
49 | 49 | ||
50 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
51 | "acpi-cpufreq", msg) | ||
52 | |||
53 | MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); | 50 | MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); |
54 | MODULE_DESCRIPTION("ACPI Processor P-States Driver"); | 51 | MODULE_DESCRIPTION("ACPI Processor P-States Driver"); |
55 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
@@ -233,7 +230,7 @@ static u32 get_cur_val(const struct cpumask *mask) | |||
233 | cmd.mask = mask; | 230 | cmd.mask = mask; |
234 | drv_read(&cmd); | 231 | drv_read(&cmd); |
235 | 232 | ||
236 | dprintk("get_cur_val = %u\n", cmd.val); | 233 | pr_debug("get_cur_val = %u\n", cmd.val); |
237 | 234 | ||
238 | return cmd.val; | 235 | return cmd.val; |
239 | } | 236 | } |
@@ -244,7 +241,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | |||
244 | unsigned int freq; | 241 | unsigned int freq; |
245 | unsigned int cached_freq; | 242 | unsigned int cached_freq; |
246 | 243 | ||
247 | dprintk("get_cur_freq_on_cpu (%d)\n", cpu); | 244 | pr_debug("get_cur_freq_on_cpu (%d)\n", cpu); |
248 | 245 | ||
249 | if (unlikely(data == NULL || | 246 | if (unlikely(data == NULL || |
250 | data->acpi_data == NULL || data->freq_table == NULL)) { | 247 | data->acpi_data == NULL || data->freq_table == NULL)) { |
@@ -261,7 +258,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | |||
261 | data->resume = 1; | 258 | data->resume = 1; |
262 | } | 259 | } |
263 | 260 | ||
264 | dprintk("cur freq = %u\n", freq); | 261 | pr_debug("cur freq = %u\n", freq); |
265 | 262 | ||
266 | return freq; | 263 | return freq; |
267 | } | 264 | } |
@@ -293,7 +290,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
293 | unsigned int i; | 290 | unsigned int i; |
294 | int result = 0; | 291 | int result = 0; |
295 | 292 | ||
296 | dprintk("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu); | 293 | pr_debug("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu); |
297 | 294 | ||
298 | if (unlikely(data == NULL || | 295 | if (unlikely(data == NULL || |
299 | data->acpi_data == NULL || data->freq_table == NULL)) { | 296 | data->acpi_data == NULL || data->freq_table == NULL)) { |
@@ -313,11 +310,11 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
313 | next_perf_state = data->freq_table[next_state].index; | 310 | next_perf_state = data->freq_table[next_state].index; |
314 | if (perf->state == next_perf_state) { | 311 | if (perf->state == next_perf_state) { |
315 | if (unlikely(data->resume)) { | 312 | if (unlikely(data->resume)) { |
316 | dprintk("Called after resume, resetting to P%d\n", | 313 | pr_debug("Called after resume, resetting to P%d\n", |
317 | next_perf_state); | 314 | next_perf_state); |
318 | data->resume = 0; | 315 | data->resume = 0; |
319 | } else { | 316 | } else { |
320 | dprintk("Already at target state (P%d)\n", | 317 | pr_debug("Already at target state (P%d)\n", |
321 | next_perf_state); | 318 | next_perf_state); |
322 | goto out; | 319 | goto out; |
323 | } | 320 | } |
@@ -357,7 +354,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
357 | 354 | ||
358 | if (acpi_pstate_strict) { | 355 | if (acpi_pstate_strict) { |
359 | if (!check_freqs(cmd.mask, freqs.new, data)) { | 356 | if (!check_freqs(cmd.mask, freqs.new, data)) { |
360 | dprintk("acpi_cpufreq_target failed (%d)\n", | 357 | pr_debug("acpi_cpufreq_target failed (%d)\n", |
361 | policy->cpu); | 358 | policy->cpu); |
362 | result = -EAGAIN; | 359 | result = -EAGAIN; |
363 | goto out; | 360 | goto out; |
@@ -378,7 +375,7 @@ static int acpi_cpufreq_verify(struct cpufreq_policy *policy) | |||
378 | { | 375 | { |
379 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); | 376 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
380 | 377 | ||
381 | dprintk("acpi_cpufreq_verify\n"); | 378 | pr_debug("acpi_cpufreq_verify\n"); |
382 | 379 | ||
383 | return cpufreq_frequency_table_verify(policy, data->freq_table); | 380 | return cpufreq_frequency_table_verify(policy, data->freq_table); |
384 | } | 381 | } |
@@ -433,11 +430,11 @@ static void free_acpi_perf_data(void) | |||
433 | static int __init acpi_cpufreq_early_init(void) | 430 | static int __init acpi_cpufreq_early_init(void) |
434 | { | 431 | { |
435 | unsigned int i; | 432 | unsigned int i; |
436 | dprintk("acpi_cpufreq_early_init\n"); | 433 | pr_debug("acpi_cpufreq_early_init\n"); |
437 | 434 | ||
438 | acpi_perf_data = alloc_percpu(struct acpi_processor_performance); | 435 | acpi_perf_data = alloc_percpu(struct acpi_processor_performance); |
439 | if (!acpi_perf_data) { | 436 | if (!acpi_perf_data) { |
440 | dprintk("Memory allocation error for acpi_perf_data.\n"); | 437 | pr_debug("Memory allocation error for acpi_perf_data.\n"); |
441 | return -ENOMEM; | 438 | return -ENOMEM; |
442 | } | 439 | } |
443 | for_each_possible_cpu(i) { | 440 | for_each_possible_cpu(i) { |
@@ -519,7 +516,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
519 | static int blacklisted; | 516 | static int blacklisted; |
520 | #endif | 517 | #endif |
521 | 518 | ||
522 | dprintk("acpi_cpufreq_cpu_init\n"); | 519 | pr_debug("acpi_cpufreq_cpu_init\n"); |
523 | 520 | ||
524 | #ifdef CONFIG_SMP | 521 | #ifdef CONFIG_SMP |
525 | if (blacklisted) | 522 | if (blacklisted) |
@@ -566,7 +563,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
566 | 563 | ||
567 | /* capability check */ | 564 | /* capability check */ |
568 | if (perf->state_count <= 1) { | 565 | if (perf->state_count <= 1) { |
569 | dprintk("No P-States\n"); | 566 | pr_debug("No P-States\n"); |
570 | result = -ENODEV; | 567 | result = -ENODEV; |
571 | goto err_unreg; | 568 | goto err_unreg; |
572 | } | 569 | } |
@@ -578,11 +575,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
578 | 575 | ||
579 | switch (perf->control_register.space_id) { | 576 | switch (perf->control_register.space_id) { |
580 | case ACPI_ADR_SPACE_SYSTEM_IO: | 577 | case ACPI_ADR_SPACE_SYSTEM_IO: |
581 | dprintk("SYSTEM IO addr space\n"); | 578 | pr_debug("SYSTEM IO addr space\n"); |
582 | data->cpu_feature = SYSTEM_IO_CAPABLE; | 579 | data->cpu_feature = SYSTEM_IO_CAPABLE; |
583 | break; | 580 | break; |
584 | case ACPI_ADR_SPACE_FIXED_HARDWARE: | 581 | case ACPI_ADR_SPACE_FIXED_HARDWARE: |
585 | dprintk("HARDWARE addr space\n"); | 582 | pr_debug("HARDWARE addr space\n"); |
586 | if (!check_est_cpu(cpu)) { | 583 | if (!check_est_cpu(cpu)) { |
587 | result = -ENODEV; | 584 | result = -ENODEV; |
588 | goto err_unreg; | 585 | goto err_unreg; |
@@ -590,7 +587,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
590 | data->cpu_feature = SYSTEM_INTEL_MSR_CAPABLE; | 587 | data->cpu_feature = SYSTEM_INTEL_MSR_CAPABLE; |
591 | break; | 588 | break; |
592 | default: | 589 | default: |
593 | dprintk("Unknown addr space %d\n", | 590 | pr_debug("Unknown addr space %d\n", |
594 | (u32) (perf->control_register.space_id)); | 591 | (u32) (perf->control_register.space_id)); |
595 | result = -ENODEV; | 592 | result = -ENODEV; |
596 | goto err_unreg; | 593 | goto err_unreg; |
@@ -661,9 +658,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
661 | if (cpu_has(c, X86_FEATURE_APERFMPERF)) | 658 | if (cpu_has(c, X86_FEATURE_APERFMPERF)) |
662 | acpi_cpufreq_driver.getavg = cpufreq_get_measured_perf; | 659 | acpi_cpufreq_driver.getavg = cpufreq_get_measured_perf; |
663 | 660 | ||
664 | dprintk("CPU%u - ACPI performance management activated.\n", cpu); | 661 | pr_debug("CPU%u - ACPI performance management activated.\n", cpu); |
665 | for (i = 0; i < perf->state_count; i++) | 662 | for (i = 0; i < perf->state_count; i++) |
666 | dprintk(" %cP%d: %d MHz, %d mW, %d uS\n", | 663 | pr_debug(" %cP%d: %d MHz, %d mW, %d uS\n", |
667 | (i == perf->state ? '*' : ' '), i, | 664 | (i == perf->state ? '*' : ' '), i, |
668 | (u32) perf->states[i].core_frequency, | 665 | (u32) perf->states[i].core_frequency, |
669 | (u32) perf->states[i].power, | 666 | (u32) perf->states[i].power, |
@@ -694,7 +691,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | |||
694 | { | 691 | { |
695 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); | 692 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
696 | 693 | ||
697 | dprintk("acpi_cpufreq_cpu_exit\n"); | 694 | pr_debug("acpi_cpufreq_cpu_exit\n"); |
698 | 695 | ||
699 | if (data) { | 696 | if (data) { |
700 | cpufreq_frequency_table_put_attr(policy->cpu); | 697 | cpufreq_frequency_table_put_attr(policy->cpu); |
@@ -712,7 +709,7 @@ static int acpi_cpufreq_resume(struct cpufreq_policy *policy) | |||
712 | { | 709 | { |
713 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); | 710 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
714 | 711 | ||
715 | dprintk("acpi_cpufreq_resume\n"); | 712 | pr_debug("acpi_cpufreq_resume\n"); |
716 | 713 | ||
717 | data->resume = 1; | 714 | data->resume = 1; |
718 | 715 | ||
@@ -743,7 +740,7 @@ static int __init acpi_cpufreq_init(void) | |||
743 | if (acpi_disabled) | 740 | if (acpi_disabled) |
744 | return 0; | 741 | return 0; |
745 | 742 | ||
746 | dprintk("acpi_cpufreq_init\n"); | 743 | pr_debug("acpi_cpufreq_init\n"); |
747 | 744 | ||
748 | ret = acpi_cpufreq_early_init(); | 745 | ret = acpi_cpufreq_early_init(); |
749 | if (ret) | 746 | if (ret) |
@@ -758,7 +755,7 @@ static int __init acpi_cpufreq_init(void) | |||
758 | 755 | ||
759 | static void __exit acpi_cpufreq_exit(void) | 756 | static void __exit acpi_cpufreq_exit(void) |
760 | { | 757 | { |
761 | dprintk("acpi_cpufreq_exit\n"); | 758 | pr_debug("acpi_cpufreq_exit\n"); |
762 | 759 | ||
763 | cpufreq_unregister_driver(&acpi_cpufreq_driver); | 760 | cpufreq_unregister_driver(&acpi_cpufreq_driver); |
764 | 761 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c index 141abebc4516..7bac808804f3 100644 --- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -57,8 +57,6 @@ MODULE_PARM_DESC(min_fsb, | |||
57 | "Minimum FSB to use, if not defined: current FSB - 50"); | 57 | "Minimum FSB to use, if not defined: current FSB - 50"); |
58 | 58 | ||
59 | #define PFX "cpufreq-nforce2: " | 59 | #define PFX "cpufreq-nforce2: " |
60 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
61 | "cpufreq-nforce2", msg) | ||
62 | 60 | ||
63 | /** | 61 | /** |
64 | * nforce2_calc_fsb - calculate FSB | 62 | * nforce2_calc_fsb - calculate FSB |
@@ -270,7 +268,7 @@ static int nforce2_target(struct cpufreq_policy *policy, | |||
270 | if (freqs.old == freqs.new) | 268 | if (freqs.old == freqs.new) |
271 | return 0; | 269 | return 0; |
272 | 270 | ||
273 | dprintk("Old CPU frequency %d kHz, new %d kHz\n", | 271 | pr_debug("Old CPU frequency %d kHz, new %d kHz\n", |
274 | freqs.old, freqs.new); | 272 | freqs.old, freqs.new); |
275 | 273 | ||
276 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 274 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
@@ -282,7 +280,7 @@ static int nforce2_target(struct cpufreq_policy *policy, | |||
282 | printk(KERN_ERR PFX "Changing FSB to %d failed\n", | 280 | printk(KERN_ERR PFX "Changing FSB to %d failed\n", |
283 | target_fsb); | 281 | target_fsb); |
284 | else | 282 | else |
285 | dprintk("Changed FSB successfully to %d\n", | 283 | pr_debug("Changed FSB successfully to %d\n", |
286 | target_fsb); | 284 | target_fsb); |
287 | 285 | ||
288 | /* Enable IRQs */ | 286 | /* Enable IRQs */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index 32974cf84232..ffe1f2c92ed3 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -142,9 +142,6 @@ module_param(max_duration, int, 0444); | |||
142 | #define POLICY_MIN_DIV 20 | 142 | #define POLICY_MIN_DIV 20 |
143 | 143 | ||
144 | 144 | ||
145 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
146 | "gx-suspmod", msg) | ||
147 | |||
148 | /** | 145 | /** |
149 | * we can detect a core multipiler from dir0_lsb | 146 | * we can detect a core multipiler from dir0_lsb |
150 | * from GX1 datasheet p.56, | 147 | * from GX1 datasheet p.56, |
@@ -191,7 +188,7 @@ static __init struct pci_dev *gx_detect_chipset(void) | |||
191 | /* check if CPU is a MediaGX or a Geode. */ | 188 | /* check if CPU is a MediaGX or a Geode. */ |
192 | if ((boot_cpu_data.x86_vendor != X86_VENDOR_NSC) && | 189 | if ((boot_cpu_data.x86_vendor != X86_VENDOR_NSC) && |
193 | (boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) { | 190 | (boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) { |
194 | dprintk("error: no MediaGX/Geode processor found!\n"); | 191 | pr_debug("error: no MediaGX/Geode processor found!\n"); |
195 | return NULL; | 192 | return NULL; |
196 | } | 193 | } |
197 | 194 | ||
@@ -201,7 +198,7 @@ static __init struct pci_dev *gx_detect_chipset(void) | |||
201 | return gx_pci; | 198 | return gx_pci; |
202 | } | 199 | } |
203 | 200 | ||
204 | dprintk("error: no supported chipset found!\n"); | 201 | pr_debug("error: no supported chipset found!\n"); |
205 | return NULL; | 202 | return NULL; |
206 | } | 203 | } |
207 | 204 | ||
@@ -305,14 +302,14 @@ static void gx_set_cpuspeed(unsigned int khz) | |||
305 | break; | 302 | break; |
306 | default: | 303 | default: |
307 | local_irq_restore(flags); | 304 | local_irq_restore(flags); |
308 | dprintk("fatal: try to set unknown chipset.\n"); | 305 | pr_debug("fatal: try to set unknown chipset.\n"); |
309 | return; | 306 | return; |
310 | } | 307 | } |
311 | } else { | 308 | } else { |
312 | suscfg = gx_params->pci_suscfg & ~(SUSMOD); | 309 | suscfg = gx_params->pci_suscfg & ~(SUSMOD); |
313 | gx_params->off_duration = 0; | 310 | gx_params->off_duration = 0; |
314 | gx_params->on_duration = 0; | 311 | gx_params->on_duration = 0; |
315 | dprintk("suspend modulation disabled: cpu runs 100%% speed.\n"); | 312 | pr_debug("suspend modulation disabled: cpu runs 100%% speed.\n"); |
316 | } | 313 | } |
317 | 314 | ||
318 | gx_write_byte(PCI_MODOFF, gx_params->off_duration); | 315 | gx_write_byte(PCI_MODOFF, gx_params->off_duration); |
@@ -327,9 +324,9 @@ static void gx_set_cpuspeed(unsigned int khz) | |||
327 | 324 | ||
328 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 325 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
329 | 326 | ||
330 | dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", | 327 | pr_debug("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", |
331 | gx_params->on_duration * 32, gx_params->off_duration * 32); | 328 | gx_params->on_duration * 32, gx_params->off_duration * 32); |
332 | dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); | 329 | pr_debug("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); |
333 | } | 330 | } |
334 | 331 | ||
335 | /**************************************************************** | 332 | /**************************************************************** |
@@ -428,8 +425,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) | |||
428 | stock_freq = maxfreq; | 425 | stock_freq = maxfreq; |
429 | curfreq = gx_get_cpuspeed(0); | 426 | curfreq = gx_get_cpuspeed(0); |
430 | 427 | ||
431 | dprintk("cpu max frequency is %d.\n", maxfreq); | 428 | pr_debug("cpu max frequency is %d.\n", maxfreq); |
432 | dprintk("cpu current frequency is %dkHz.\n", curfreq); | 429 | pr_debug("cpu current frequency is %dkHz.\n", curfreq); |
433 | 430 | ||
434 | /* setup basic struct for cpufreq API */ | 431 | /* setup basic struct for cpufreq API */ |
435 | policy->cpu = 0; | 432 | policy->cpu = 0; |
@@ -475,7 +472,7 @@ static int __init cpufreq_gx_init(void) | |||
475 | if (max_duration > 0xff) | 472 | if (max_duration > 0xff) |
476 | max_duration = 0xff; | 473 | max_duration = 0xff; |
477 | 474 | ||
478 | dprintk("geode suspend modulation available.\n"); | 475 | pr_debug("geode suspend modulation available.\n"); |
479 | 476 | ||
480 | params = kzalloc(sizeof(struct gxfreq_params), GFP_KERNEL); | 477 | params = kzalloc(sizeof(struct gxfreq_params), GFP_KERNEL); |
481 | if (params == NULL) | 478 | if (params == NULL) |
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index cf48cdd6907d..f47d26e2a135 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -77,9 +77,6 @@ static int scale_voltage; | |||
77 | static int disable_acpi_c3; | 77 | static int disable_acpi_c3; |
78 | static int revid_errata; | 78 | static int revid_errata; |
79 | 79 | ||
80 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
81 | "longhaul", msg) | ||
82 | |||
83 | 80 | ||
84 | /* Clock ratios multiplied by 10 */ | 81 | /* Clock ratios multiplied by 10 */ |
85 | static int mults[32]; | 82 | static int mults[32]; |
@@ -87,7 +84,6 @@ static int eblcr[32]; | |||
87 | static int longhaul_version; | 84 | static int longhaul_version; |
88 | static struct cpufreq_frequency_table *longhaul_table; | 85 | static struct cpufreq_frequency_table *longhaul_table; |
89 | 86 | ||
90 | #ifdef CONFIG_CPU_FREQ_DEBUG | ||
91 | static char speedbuffer[8]; | 87 | static char speedbuffer[8]; |
92 | 88 | ||
93 | static char *print_speed(int speed) | 89 | static char *print_speed(int speed) |
@@ -106,7 +102,6 @@ static char *print_speed(int speed) | |||
106 | 102 | ||
107 | return speedbuffer; | 103 | return speedbuffer; |
108 | } | 104 | } |
109 | #endif | ||
110 | 105 | ||
111 | 106 | ||
112 | static unsigned int calc_speed(int mult) | 107 | static unsigned int calc_speed(int mult) |
@@ -275,7 +270,7 @@ static void longhaul_setstate(unsigned int table_index) | |||
275 | 270 | ||
276 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 271 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
277 | 272 | ||
278 | dprintk("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", | 273 | pr_debug("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", |
279 | fsb, mult/10, mult%10, print_speed(speed/1000)); | 274 | fsb, mult/10, mult%10, print_speed(speed/1000)); |
280 | retry_loop: | 275 | retry_loop: |
281 | preempt_disable(); | 276 | preempt_disable(); |
@@ -460,12 +455,12 @@ static int __cpuinit longhaul_get_ranges(void) | |||
460 | break; | 455 | break; |
461 | } | 456 | } |
462 | 457 | ||
463 | dprintk("MinMult:%d.%dx MaxMult:%d.%dx\n", | 458 | pr_debug("MinMult:%d.%dx MaxMult:%d.%dx\n", |
464 | minmult/10, minmult%10, maxmult/10, maxmult%10); | 459 | minmult/10, minmult%10, maxmult/10, maxmult%10); |
465 | 460 | ||
466 | highest_speed = calc_speed(maxmult); | 461 | highest_speed = calc_speed(maxmult); |
467 | lowest_speed = calc_speed(minmult); | 462 | lowest_speed = calc_speed(minmult); |
468 | dprintk("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, | 463 | pr_debug("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, |
469 | print_speed(lowest_speed/1000), | 464 | print_speed(lowest_speed/1000), |
470 | print_speed(highest_speed/1000)); | 465 | print_speed(highest_speed/1000)); |
471 | 466 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index d9f51367666b..34ea359b370e 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -15,9 +15,6 @@ | |||
15 | #include <asm/msr.h> | 15 | #include <asm/msr.h> |
16 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
17 | 17 | ||
18 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
19 | "longrun", msg) | ||
20 | |||
21 | static struct cpufreq_driver longrun_driver; | 18 | static struct cpufreq_driver longrun_driver; |
22 | 19 | ||
23 | /** | 20 | /** |
@@ -40,14 +37,14 @@ static void __cpuinit longrun_get_policy(struct cpufreq_policy *policy) | |||
40 | u32 msr_lo, msr_hi; | 37 | u32 msr_lo, msr_hi; |
41 | 38 | ||
42 | rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); | 39 | rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); |
43 | dprintk("longrun flags are %x - %x\n", msr_lo, msr_hi); | 40 | pr_debug("longrun flags are %x - %x\n", msr_lo, msr_hi); |
44 | if (msr_lo & 0x01) | 41 | if (msr_lo & 0x01) |
45 | policy->policy = CPUFREQ_POLICY_PERFORMANCE; | 42 | policy->policy = CPUFREQ_POLICY_PERFORMANCE; |
46 | else | 43 | else |
47 | policy->policy = CPUFREQ_POLICY_POWERSAVE; | 44 | policy->policy = CPUFREQ_POLICY_POWERSAVE; |
48 | 45 | ||
49 | rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); | 46 | rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); |
50 | dprintk("longrun ctrl is %x - %x\n", msr_lo, msr_hi); | 47 | pr_debug("longrun ctrl is %x - %x\n", msr_lo, msr_hi); |
51 | msr_lo &= 0x0000007F; | 48 | msr_lo &= 0x0000007F; |
52 | msr_hi &= 0x0000007F; | 49 | msr_hi &= 0x0000007F; |
53 | 50 | ||
@@ -150,7 +147,7 @@ static unsigned int longrun_get(unsigned int cpu) | |||
150 | return 0; | 147 | return 0; |
151 | 148 | ||
152 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); | 149 | cpuid(0x80860007, &eax, &ebx, &ecx, &edx); |
153 | dprintk("cpuid eax is %u\n", eax); | 150 | pr_debug("cpuid eax is %u\n", eax); |
154 | 151 | ||
155 | return eax * 1000; | 152 | return eax * 1000; |
156 | } | 153 | } |
@@ -196,7 +193,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, | |||
196 | rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); | 193 | rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); |
197 | *high_freq = msr_lo * 1000; /* to kHz */ | 194 | *high_freq = msr_lo * 1000; /* to kHz */ |
198 | 195 | ||
199 | dprintk("longrun table interface told %u - %u kHz\n", | 196 | pr_debug("longrun table interface told %u - %u kHz\n", |
200 | *low_freq, *high_freq); | 197 | *low_freq, *high_freq); |
201 | 198 | ||
202 | if (*low_freq > *high_freq) | 199 | if (*low_freq > *high_freq) |
@@ -207,7 +204,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, | |||
207 | /* set the upper border to the value determined during TSC init */ | 204 | /* set the upper border to the value determined during TSC init */ |
208 | *high_freq = (cpu_khz / 1000); | 205 | *high_freq = (cpu_khz / 1000); |
209 | *high_freq = *high_freq * 1000; | 206 | *high_freq = *high_freq * 1000; |
210 | dprintk("high frequency is %u kHz\n", *high_freq); | 207 | pr_debug("high frequency is %u kHz\n", *high_freq); |
211 | 208 | ||
212 | /* get current borders */ | 209 | /* get current borders */ |
213 | rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); | 210 | rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); |
@@ -233,7 +230,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, | |||
233 | /* restore values */ | 230 | /* restore values */ |
234 | wrmsr(MSR_TMTA_LONGRUN_CTRL, save_lo, save_hi); | 231 | wrmsr(MSR_TMTA_LONGRUN_CTRL, save_lo, save_hi); |
235 | } | 232 | } |
236 | dprintk("percentage is %u %%, freq is %u MHz\n", ecx, eax); | 233 | pr_debug("percentage is %u %%, freq is %u MHz\n", ecx, eax); |
237 | 234 | ||
238 | /* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) | 235 | /* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) |
239 | * eqals | 236 | * eqals |
@@ -249,7 +246,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, | |||
249 | edx = ((eax - ebx) * 100) / (100 - ecx); | 246 | edx = ((eax - ebx) * 100) / (100 - ecx); |
250 | *low_freq = edx * 1000; /* back to kHz */ | 247 | *low_freq = edx * 1000; /* back to kHz */ |
251 | 248 | ||
252 | dprintk("low frequency is %u kHz\n", *low_freq); | 249 | pr_debug("low frequency is %u kHz\n", *low_freq); |
253 | 250 | ||
254 | if (*low_freq > *high_freq) | 251 | if (*low_freq > *high_freq) |
255 | *low_freq = *high_freq; | 252 | *low_freq = *high_freq; |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 52c93648e492..6be3e0760c26 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -35,8 +35,6 @@ | |||
35 | #include "speedstep-lib.h" | 35 | #include "speedstep-lib.h" |
36 | 36 | ||
37 | #define PFX "p4-clockmod: " | 37 | #define PFX "p4-clockmod: " |
38 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
39 | "p4-clockmod", msg) | ||
40 | 38 | ||
41 | /* | 39 | /* |
42 | * Duty Cycle (3bits), note DC_DISABLE is not specified in | 40 | * Duty Cycle (3bits), note DC_DISABLE is not specified in |
@@ -66,7 +64,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate) | |||
66 | rdmsr_on_cpu(cpu, MSR_IA32_THERM_STATUS, &l, &h); | 64 | rdmsr_on_cpu(cpu, MSR_IA32_THERM_STATUS, &l, &h); |
67 | 65 | ||
68 | if (l & 0x01) | 66 | if (l & 0x01) |
69 | dprintk("CPU#%d currently thermal throttled\n", cpu); | 67 | pr_debug("CPU#%d currently thermal throttled\n", cpu); |
70 | 68 | ||
71 | if (has_N44_O17_errata[cpu] && | 69 | if (has_N44_O17_errata[cpu] && |
72 | (newstate == DC_25PT || newstate == DC_DFLT)) | 70 | (newstate == DC_25PT || newstate == DC_DFLT)) |
@@ -74,10 +72,10 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate) | |||
74 | 72 | ||
75 | rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, &l, &h); | 73 | rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, &l, &h); |
76 | if (newstate == DC_DISABLE) { | 74 | if (newstate == DC_DISABLE) { |
77 | dprintk("CPU#%d disabling modulation\n", cpu); | 75 | pr_debug("CPU#%d disabling modulation\n", cpu); |
78 | wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, l & ~(1<<4), h); | 76 | wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, l & ~(1<<4), h); |
79 | } else { | 77 | } else { |
80 | dprintk("CPU#%d setting duty cycle to %d%%\n", | 78 | pr_debug("CPU#%d setting duty cycle to %d%%\n", |
81 | cpu, ((125 * newstate) / 10)); | 79 | cpu, ((125 * newstate) / 10)); |
82 | /* bits 63 - 5 : reserved | 80 | /* bits 63 - 5 : reserved |
83 | * bit 4 : enable/disable | 81 | * bit 4 : enable/disable |
@@ -217,7 +215,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
217 | case 0x0f11: | 215 | case 0x0f11: |
218 | case 0x0f12: | 216 | case 0x0f12: |
219 | has_N44_O17_errata[policy->cpu] = 1; | 217 | has_N44_O17_errata[policy->cpu] = 1; |
220 | dprintk("has errata -- disabling low frequencies\n"); | 218 | pr_debug("has errata -- disabling low frequencies\n"); |
221 | } | 219 | } |
222 | 220 | ||
223 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D && | 221 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D && |
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index 755a31e0f5b0..7b0603eb0129 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | #include <acpi/processor.h> | 40 | #include <acpi/processor.h> |
41 | 41 | ||
42 | #define PCC_VERSION "1.00.00" | 42 | #define PCC_VERSION "1.10.00" |
43 | #define POLL_LOOPS 300 | 43 | #define POLL_LOOPS 300 |
44 | 44 | ||
45 | #define CMD_COMPLETE 0x1 | 45 | #define CMD_COMPLETE 0x1 |
@@ -48,9 +48,6 @@ | |||
48 | 48 | ||
49 | #define BUF_SZ 4 | 49 | #define BUF_SZ 4 |
50 | 50 | ||
51 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
52 | "pcc-cpufreq", msg) | ||
53 | |||
54 | struct pcc_register_resource { | 51 | struct pcc_register_resource { |
55 | u8 descriptor; | 52 | u8 descriptor; |
56 | u16 length; | 53 | u16 length; |
@@ -102,7 +99,7 @@ static struct acpi_generic_address doorbell; | |||
102 | static u64 doorbell_preserve; | 99 | static u64 doorbell_preserve; |
103 | static u64 doorbell_write; | 100 | static u64 doorbell_write; |
104 | 101 | ||
105 | static u8 OSC_UUID[16] = {0x63, 0x9B, 0x2C, 0x9F, 0x70, 0x91, 0x49, 0x1f, | 102 | static u8 OSC_UUID[16] = {0x9F, 0x2C, 0x9B, 0x63, 0x91, 0x70, 0x1f, 0x49, |
106 | 0xBB, 0x4F, 0xA5, 0x98, 0x2F, 0xA1, 0xB5, 0x46}; | 103 | 0xBB, 0x4F, 0xA5, 0x98, 0x2F, 0xA1, 0xB5, 0x46}; |
107 | 104 | ||
108 | struct pcc_cpu { | 105 | struct pcc_cpu { |
@@ -152,7 +149,7 @@ static unsigned int pcc_get_freq(unsigned int cpu) | |||
152 | 149 | ||
153 | spin_lock(&pcc_lock); | 150 | spin_lock(&pcc_lock); |
154 | 151 | ||
155 | dprintk("get: get_freq for CPU %d\n", cpu); | 152 | pr_debug("get: get_freq for CPU %d\n", cpu); |
156 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); | 153 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); |
157 | 154 | ||
158 | input_buffer = 0x1; | 155 | input_buffer = 0x1; |
@@ -170,7 +167,7 @@ static unsigned int pcc_get_freq(unsigned int cpu) | |||
170 | 167 | ||
171 | status = ioread16(&pcch_hdr->status); | 168 | status = ioread16(&pcch_hdr->status); |
172 | if (status != CMD_COMPLETE) { | 169 | if (status != CMD_COMPLETE) { |
173 | dprintk("get: FAILED: for CPU %d, status is %d\n", | 170 | pr_debug("get: FAILED: for CPU %d, status is %d\n", |
174 | cpu, status); | 171 | cpu, status); |
175 | goto cmd_incomplete; | 172 | goto cmd_incomplete; |
176 | } | 173 | } |
@@ -178,14 +175,14 @@ static unsigned int pcc_get_freq(unsigned int cpu) | |||
178 | curr_freq = (((ioread32(&pcch_hdr->nominal) * (output_buffer & 0xff)) | 175 | curr_freq = (((ioread32(&pcch_hdr->nominal) * (output_buffer & 0xff)) |
179 | / 100) * 1000); | 176 | / 100) * 1000); |
180 | 177 | ||
181 | dprintk("get: SUCCESS: (virtual) output_offset for cpu %d is " | 178 | pr_debug("get: SUCCESS: (virtual) output_offset for cpu %d is " |
182 | "0x%x, contains a value of: 0x%x. Speed is: %d MHz\n", | 179 | "0x%p, contains a value of: 0x%x. Speed is: %d MHz\n", |
183 | cpu, (pcch_virt_addr + pcc_cpu_data->output_offset), | 180 | cpu, (pcch_virt_addr + pcc_cpu_data->output_offset), |
184 | output_buffer, curr_freq); | 181 | output_buffer, curr_freq); |
185 | 182 | ||
186 | freq_limit = (output_buffer >> 8) & 0xff; | 183 | freq_limit = (output_buffer >> 8) & 0xff; |
187 | if (freq_limit != 0xff) { | 184 | if (freq_limit != 0xff) { |
188 | dprintk("get: frequency for cpu %d is being temporarily" | 185 | pr_debug("get: frequency for cpu %d is being temporarily" |
189 | " capped at %d\n", cpu, curr_freq); | 186 | " capped at %d\n", cpu, curr_freq); |
190 | } | 187 | } |
191 | 188 | ||
@@ -212,8 +209,8 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, | |||
212 | cpu = policy->cpu; | 209 | cpu = policy->cpu; |
213 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); | 210 | pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); |
214 | 211 | ||
215 | dprintk("target: CPU %d should go to target freq: %d " | 212 | pr_debug("target: CPU %d should go to target freq: %d " |
216 | "(virtual) input_offset is 0x%x\n", | 213 | "(virtual) input_offset is 0x%p\n", |
217 | cpu, target_freq, | 214 | cpu, target_freq, |
218 | (pcch_virt_addr + pcc_cpu_data->input_offset)); | 215 | (pcch_virt_addr + pcc_cpu_data->input_offset)); |
219 | 216 | ||
@@ -234,14 +231,14 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy, | |||
234 | 231 | ||
235 | status = ioread16(&pcch_hdr->status); | 232 | status = ioread16(&pcch_hdr->status); |
236 | if (status != CMD_COMPLETE) { | 233 | if (status != CMD_COMPLETE) { |
237 | dprintk("target: FAILED for cpu %d, with status: 0x%x\n", | 234 | pr_debug("target: FAILED for cpu %d, with status: 0x%x\n", |
238 | cpu, status); | 235 | cpu, status); |
239 | goto cmd_incomplete; | 236 | goto cmd_incomplete; |
240 | } | 237 | } |
241 | iowrite16(0, &pcch_hdr->status); | 238 | iowrite16(0, &pcch_hdr->status); |
242 | 239 | ||
243 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 240 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
244 | dprintk("target: was SUCCESSFUL for cpu %d\n", cpu); | 241 | pr_debug("target: was SUCCESSFUL for cpu %d\n", cpu); |
245 | spin_unlock(&pcc_lock); | 242 | spin_unlock(&pcc_lock); |
246 | 243 | ||
247 | return 0; | 244 | return 0; |
@@ -293,7 +290,7 @@ static int pcc_get_offset(int cpu) | |||
293 | memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ); | 290 | memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ); |
294 | memset_io((pcch_virt_addr + pcc_cpu_data->output_offset), 0, BUF_SZ); | 291 | memset_io((pcch_virt_addr + pcc_cpu_data->output_offset), 0, BUF_SZ); |
295 | 292 | ||
296 | dprintk("pcc_get_offset: for CPU %d: pcc_cpu_data " | 293 | pr_debug("pcc_get_offset: for CPU %d: pcc_cpu_data " |
297 | "input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n", | 294 | "input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n", |
298 | cpu, pcc_cpu_data->input_offset, pcc_cpu_data->output_offset); | 295 | cpu, pcc_cpu_data->input_offset, pcc_cpu_data->output_offset); |
299 | out_free: | 296 | out_free: |
@@ -410,7 +407,7 @@ static int __init pcc_cpufreq_probe(void) | |||
410 | if (ACPI_SUCCESS(status)) { | 407 | if (ACPI_SUCCESS(status)) { |
411 | ret = pcc_cpufreq_do_osc(&osc_handle); | 408 | ret = pcc_cpufreq_do_osc(&osc_handle); |
412 | if (ret) | 409 | if (ret) |
413 | dprintk("probe: _OSC evaluation did not succeed\n"); | 410 | pr_debug("probe: _OSC evaluation did not succeed\n"); |
414 | /* Firmware's use of _OSC is optional */ | 411 | /* Firmware's use of _OSC is optional */ |
415 | ret = 0; | 412 | ret = 0; |
416 | } | 413 | } |
@@ -433,7 +430,7 @@ static int __init pcc_cpufreq_probe(void) | |||
433 | 430 | ||
434 | mem_resource = (struct pcc_memory_resource *)member->buffer.pointer; | 431 | mem_resource = (struct pcc_memory_resource *)member->buffer.pointer; |
435 | 432 | ||
436 | dprintk("probe: mem_resource descriptor: 0x%x," | 433 | pr_debug("probe: mem_resource descriptor: 0x%x," |
437 | " length: %d, space_id: %d, resource_usage: %d," | 434 | " length: %d, space_id: %d, resource_usage: %d," |
438 | " type_specific: %d, granularity: 0x%llx," | 435 | " type_specific: %d, granularity: 0x%llx," |
439 | " minimum: 0x%llx, maximum: 0x%llx," | 436 | " minimum: 0x%llx, maximum: 0x%llx," |
@@ -453,13 +450,13 @@ static int __init pcc_cpufreq_probe(void) | |||
453 | pcch_virt_addr = ioremap_nocache(mem_resource->minimum, | 450 | pcch_virt_addr = ioremap_nocache(mem_resource->minimum, |
454 | mem_resource->address_length); | 451 | mem_resource->address_length); |
455 | if (pcch_virt_addr == NULL) { | 452 | if (pcch_virt_addr == NULL) { |
456 | dprintk("probe: could not map shared mem region\n"); | 453 | pr_debug("probe: could not map shared mem region\n"); |
457 | goto out_free; | 454 | goto out_free; |
458 | } | 455 | } |
459 | pcch_hdr = pcch_virt_addr; | 456 | pcch_hdr = pcch_virt_addr; |
460 | 457 | ||
461 | dprintk("probe: PCCH header (virtual) addr: 0x%p\n", pcch_hdr); | 458 | pr_debug("probe: PCCH header (virtual) addr: 0x%p\n", pcch_hdr); |
462 | dprintk("probe: PCCH header is at physical address: 0x%llx," | 459 | pr_debug("probe: PCCH header is at physical address: 0x%llx," |
463 | " signature: 0x%x, length: %d bytes, major: %d, minor: %d," | 460 | " signature: 0x%x, length: %d bytes, major: %d, minor: %d," |
464 | " supported features: 0x%x, command field: 0x%x," | 461 | " supported features: 0x%x, command field: 0x%x," |
465 | " status field: 0x%x, nominal latency: %d us\n", | 462 | " status field: 0x%x, nominal latency: %d us\n", |
@@ -469,7 +466,7 @@ static int __init pcc_cpufreq_probe(void) | |||
469 | ioread16(&pcch_hdr->command), ioread16(&pcch_hdr->status), | 466 | ioread16(&pcch_hdr->command), ioread16(&pcch_hdr->status), |
470 | ioread32(&pcch_hdr->latency)); | 467 | ioread32(&pcch_hdr->latency)); |
471 | 468 | ||
472 | dprintk("probe: min time between commands: %d us," | 469 | pr_debug("probe: min time between commands: %d us," |
473 | " max time between commands: %d us," | 470 | " max time between commands: %d us," |
474 | " nominal CPU frequency: %d MHz," | 471 | " nominal CPU frequency: %d MHz," |
475 | " minimum CPU frequency: %d MHz," | 472 | " minimum CPU frequency: %d MHz," |
@@ -494,7 +491,7 @@ static int __init pcc_cpufreq_probe(void) | |||
494 | doorbell.access_width = 64; | 491 | doorbell.access_width = 64; |
495 | doorbell.address = reg_resource->address; | 492 | doorbell.address = reg_resource->address; |
496 | 493 | ||
497 | dprintk("probe: doorbell: space_id is %d, bit_width is %d, " | 494 | pr_debug("probe: doorbell: space_id is %d, bit_width is %d, " |
498 | "bit_offset is %d, access_width is %d, address is 0x%llx\n", | 495 | "bit_offset is %d, access_width is %d, address is 0x%llx\n", |
499 | doorbell.space_id, doorbell.bit_width, doorbell.bit_offset, | 496 | doorbell.space_id, doorbell.bit_width, doorbell.bit_offset, |
500 | doorbell.access_width, reg_resource->address); | 497 | doorbell.access_width, reg_resource->address); |
@@ -515,7 +512,7 @@ static int __init pcc_cpufreq_probe(void) | |||
515 | 512 | ||
516 | doorbell_write = member->integer.value; | 513 | doorbell_write = member->integer.value; |
517 | 514 | ||
518 | dprintk("probe: doorbell_preserve: 0x%llx," | 515 | pr_debug("probe: doorbell_preserve: 0x%llx," |
519 | " doorbell_write: 0x%llx\n", | 516 | " doorbell_write: 0x%llx\n", |
520 | doorbell_preserve, doorbell_write); | 517 | doorbell_preserve, doorbell_write); |
521 | 518 | ||
@@ -550,7 +547,7 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
550 | 547 | ||
551 | result = pcc_get_offset(cpu); | 548 | result = pcc_get_offset(cpu); |
552 | if (result) { | 549 | if (result) { |
553 | dprintk("init: PCCP evaluation failed\n"); | 550 | pr_debug("init: PCCP evaluation failed\n"); |
554 | goto out; | 551 | goto out; |
555 | } | 552 | } |
556 | 553 | ||
@@ -561,12 +558,12 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
561 | policy->cur = pcc_get_freq(cpu); | 558 | policy->cur = pcc_get_freq(cpu); |
562 | 559 | ||
563 | if (!policy->cur) { | 560 | if (!policy->cur) { |
564 | dprintk("init: Unable to get current CPU frequency\n"); | 561 | pr_debug("init: Unable to get current CPU frequency\n"); |
565 | result = -EINVAL; | 562 | result = -EINVAL; |
566 | goto out; | 563 | goto out; |
567 | } | 564 | } |
568 | 565 | ||
569 | dprintk("init: policy->max is %d, policy->min is %d\n", | 566 | pr_debug("init: policy->max is %d, policy->min is %d\n", |
570 | policy->max, policy->min); | 567 | policy->max, policy->min); |
571 | out: | 568 | out: |
572 | return result; | 569 | return result; |
@@ -597,7 +594,7 @@ static int __init pcc_cpufreq_init(void) | |||
597 | 594 | ||
598 | ret = pcc_cpufreq_probe(); | 595 | ret = pcc_cpufreq_probe(); |
599 | if (ret) { | 596 | if (ret) { |
600 | dprintk("pcc_cpufreq_init: PCCH evaluation failed\n"); | 597 | pr_debug("pcc_cpufreq_init: PCCH evaluation failed\n"); |
601 | return ret; | 598 | return ret; |
602 | } | 599 | } |
603 | 600 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index 4a45fd6e41ba..d71d9f372359 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -68,7 +68,6 @@ union powernow_acpi_control_t { | |||
68 | }; | 68 | }; |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #ifdef CONFIG_CPU_FREQ_DEBUG | ||
72 | /* divide by 1000 to get VCore voltage in V. */ | 71 | /* divide by 1000 to get VCore voltage in V. */ |
73 | static const int mobile_vid_table[32] = { | 72 | static const int mobile_vid_table[32] = { |
74 | 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, | 73 | 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, |
@@ -76,7 +75,6 @@ static const int mobile_vid_table[32] = { | |||
76 | 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, | 75 | 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, |
77 | 1075, 1050, 1025, 1000, 975, 950, 925, 0, | 76 | 1075, 1050, 1025, 1000, 975, 950, 925, 0, |
78 | }; | 77 | }; |
79 | #endif | ||
80 | 78 | ||
81 | /* divide by 10 to get FID. */ | 79 | /* divide by 10 to get FID. */ |
82 | static const int fid_codes[32] = { | 80 | static const int fid_codes[32] = { |
@@ -103,9 +101,6 @@ static unsigned int fsb; | |||
103 | static unsigned int latency; | 101 | static unsigned int latency; |
104 | static char have_a0; | 102 | static char have_a0; |
105 | 103 | ||
106 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
107 | "powernow-k7", msg) | ||
108 | |||
109 | static int check_fsb(unsigned int fsbspeed) | 104 | static int check_fsb(unsigned int fsbspeed) |
110 | { | 105 | { |
111 | int delta; | 106 | int delta; |
@@ -209,7 +204,7 @@ static int get_ranges(unsigned char *pst) | |||
209 | vid = *pst++; | 204 | vid = *pst++; |
210 | powernow_table[j].index |= (vid << 8); /* upper 8 bits */ | 205 | powernow_table[j].index |= (vid << 8); /* upper 8 bits */ |
211 | 206 | ||
212 | dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " | 207 | pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " |
213 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, | 208 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, |
214 | fid_codes[fid] % 10, speed/1000, vid, | 209 | fid_codes[fid] % 10, speed/1000, vid, |
215 | mobile_vid_table[vid]/1000, | 210 | mobile_vid_table[vid]/1000, |
@@ -367,7 +362,7 @@ static int powernow_acpi_init(void) | |||
367 | unsigned int speed, speed_mhz; | 362 | unsigned int speed, speed_mhz; |
368 | 363 | ||
369 | pc.val = (unsigned long) state->control; | 364 | pc.val = (unsigned long) state->control; |
370 | dprintk("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", | 365 | pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", |
371 | i, | 366 | i, |
372 | (u32) state->core_frequency, | 367 | (u32) state->core_frequency, |
373 | (u32) state->power, | 368 | (u32) state->power, |
@@ -401,7 +396,7 @@ static int powernow_acpi_init(void) | |||
401 | invalidate_entry(i); | 396 | invalidate_entry(i); |
402 | } | 397 | } |
403 | 398 | ||
404 | dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " | 399 | pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " |
405 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, | 400 | "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, |
406 | fid_codes[fid] % 10, speed_mhz, vid, | 401 | fid_codes[fid] % 10, speed_mhz, vid, |
407 | mobile_vid_table[vid]/1000, | 402 | mobile_vid_table[vid]/1000, |
@@ -409,7 +404,7 @@ static int powernow_acpi_init(void) | |||
409 | 404 | ||
410 | if (state->core_frequency != speed_mhz) { | 405 | if (state->core_frequency != speed_mhz) { |
411 | state->core_frequency = speed_mhz; | 406 | state->core_frequency = speed_mhz; |
412 | dprintk(" Corrected ACPI frequency to %d\n", | 407 | pr_debug(" Corrected ACPI frequency to %d\n", |
413 | speed_mhz); | 408 | speed_mhz); |
414 | } | 409 | } |
415 | 410 | ||
@@ -453,8 +448,8 @@ static int powernow_acpi_init(void) | |||
453 | 448 | ||
454 | static void print_pst_entry(struct pst_s *pst, unsigned int j) | 449 | static void print_pst_entry(struct pst_s *pst, unsigned int j) |
455 | { | 450 | { |
456 | dprintk("PST:%d (@%p)\n", j, pst); | 451 | pr_debug("PST:%d (@%p)\n", j, pst); |
457 | dprintk(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", | 452 | pr_debug(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", |
458 | pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); | 453 | pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); |
459 | } | 454 | } |
460 | 455 | ||
@@ -474,20 +469,20 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
474 | p = phys_to_virt(i); | 469 | p = phys_to_virt(i); |
475 | 470 | ||
476 | if (memcmp(p, "AMDK7PNOW!", 10) == 0) { | 471 | if (memcmp(p, "AMDK7PNOW!", 10) == 0) { |
477 | dprintk("Found PSB header at %p\n", p); | 472 | pr_debug("Found PSB header at %p\n", p); |
478 | psb = (struct psb_s *) p; | 473 | psb = (struct psb_s *) p; |
479 | dprintk("Table version: 0x%x\n", psb->tableversion); | 474 | pr_debug("Table version: 0x%x\n", psb->tableversion); |
480 | if (psb->tableversion != 0x12) { | 475 | if (psb->tableversion != 0x12) { |
481 | printk(KERN_INFO PFX "Sorry, only v1.2 tables" | 476 | printk(KERN_INFO PFX "Sorry, only v1.2 tables" |
482 | " supported right now\n"); | 477 | " supported right now\n"); |
483 | return -ENODEV; | 478 | return -ENODEV; |
484 | } | 479 | } |
485 | 480 | ||
486 | dprintk("Flags: 0x%x\n", psb->flags); | 481 | pr_debug("Flags: 0x%x\n", psb->flags); |
487 | if ((psb->flags & 1) == 0) | 482 | if ((psb->flags & 1) == 0) |
488 | dprintk("Mobile voltage regulator\n"); | 483 | pr_debug("Mobile voltage regulator\n"); |
489 | else | 484 | else |
490 | dprintk("Desktop voltage regulator\n"); | 485 | pr_debug("Desktop voltage regulator\n"); |
491 | 486 | ||
492 | latency = psb->settlingtime; | 487 | latency = psb->settlingtime; |
493 | if (latency < 100) { | 488 | if (latency < 100) { |
@@ -497,9 +492,9 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
497 | "Correcting.\n", latency); | 492 | "Correcting.\n", latency); |
498 | latency = 100; | 493 | latency = 100; |
499 | } | 494 | } |
500 | dprintk("Settling Time: %d microseconds.\n", | 495 | pr_debug("Settling Time: %d microseconds.\n", |
501 | psb->settlingtime); | 496 | psb->settlingtime); |
502 | dprintk("Has %d PST tables. (Only dumping ones " | 497 | pr_debug("Has %d PST tables. (Only dumping ones " |
503 | "relevant to this CPU).\n", | 498 | "relevant to this CPU).\n", |
504 | psb->numpst); | 499 | psb->numpst); |
505 | 500 | ||
@@ -650,7 +645,7 @@ static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy) | |||
650 | printk(KERN_WARNING PFX "can not determine bus frequency\n"); | 645 | printk(KERN_WARNING PFX "can not determine bus frequency\n"); |
651 | return -EINVAL; | 646 | return -EINVAL; |
652 | } | 647 | } |
653 | dprintk("FSB: %3dMHz\n", fsb/1000); | 648 | pr_debug("FSB: %3dMHz\n", fsb/1000); |
654 | 649 | ||
655 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { | 650 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { |
656 | printk(KERN_INFO PFX "PSB/PST known to be broken. " | 651 | printk(KERN_INFO PFX "PSB/PST known to be broken. " |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 2368e38327b3..83479b6fb9a1 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -139,7 +139,7 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data) | |||
139 | } | 139 | } |
140 | do { | 140 | do { |
141 | if (i++ > 10000) { | 141 | if (i++ > 10000) { |
142 | dprintk("detected change pending stuck\n"); | 142 | pr_debug("detected change pending stuck\n"); |
143 | return 1; | 143 | return 1; |
144 | } | 144 | } |
145 | rdmsr(MSR_FIDVID_STATUS, lo, hi); | 145 | rdmsr(MSR_FIDVID_STATUS, lo, hi); |
@@ -176,7 +176,7 @@ static void fidvid_msr_init(void) | |||
176 | fid = lo & MSR_S_LO_CURRENT_FID; | 176 | fid = lo & MSR_S_LO_CURRENT_FID; |
177 | lo = fid | (vid << MSR_C_LO_VID_SHIFT); | 177 | lo = fid | (vid << MSR_C_LO_VID_SHIFT); |
178 | hi = MSR_C_HI_STP_GNT_BENIGN; | 178 | hi = MSR_C_HI_STP_GNT_BENIGN; |
179 | dprintk("cpu%d, init lo 0x%x, hi 0x%x\n", smp_processor_id(), lo, hi); | 179 | pr_debug("cpu%d, init lo 0x%x, hi 0x%x\n", smp_processor_id(), lo, hi); |
180 | wrmsr(MSR_FIDVID_CTL, lo, hi); | 180 | wrmsr(MSR_FIDVID_CTL, lo, hi); |
181 | } | 181 | } |
182 | 182 | ||
@@ -196,7 +196,7 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid) | |||
196 | lo |= (data->currvid << MSR_C_LO_VID_SHIFT); | 196 | lo |= (data->currvid << MSR_C_LO_VID_SHIFT); |
197 | lo |= MSR_C_LO_INIT_FID_VID; | 197 | lo |= MSR_C_LO_INIT_FID_VID; |
198 | 198 | ||
199 | dprintk("writing fid 0x%x, lo 0x%x, hi 0x%x\n", | 199 | pr_debug("writing fid 0x%x, lo 0x%x, hi 0x%x\n", |
200 | fid, lo, data->plllock * PLL_LOCK_CONVERSION); | 200 | fid, lo, data->plllock * PLL_LOCK_CONVERSION); |
201 | 201 | ||
202 | do { | 202 | do { |
@@ -244,7 +244,7 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid) | |||
244 | lo |= (vid << MSR_C_LO_VID_SHIFT); | 244 | lo |= (vid << MSR_C_LO_VID_SHIFT); |
245 | lo |= MSR_C_LO_INIT_FID_VID; | 245 | lo |= MSR_C_LO_INIT_FID_VID; |
246 | 246 | ||
247 | dprintk("writing vid 0x%x, lo 0x%x, hi 0x%x\n", | 247 | pr_debug("writing vid 0x%x, lo 0x%x, hi 0x%x\n", |
248 | vid, lo, STOP_GRANT_5NS); | 248 | vid, lo, STOP_GRANT_5NS); |
249 | 249 | ||
250 | do { | 250 | do { |
@@ -325,7 +325,7 @@ static int transition_fid_vid(struct powernow_k8_data *data, | |||
325 | return 1; | 325 | return 1; |
326 | } | 326 | } |
327 | 327 | ||
328 | dprintk("transitioned (cpu%d): new fid 0x%x, vid 0x%x\n", | 328 | pr_debug("transitioned (cpu%d): new fid 0x%x, vid 0x%x\n", |
329 | smp_processor_id(), data->currfid, data->currvid); | 329 | smp_processor_id(), data->currfid, data->currvid); |
330 | 330 | ||
331 | return 0; | 331 | return 0; |
@@ -339,7 +339,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, | |||
339 | u32 savefid = data->currfid; | 339 | u32 savefid = data->currfid; |
340 | u32 maxvid, lo, rvomult = 1; | 340 | u32 maxvid, lo, rvomult = 1; |
341 | 341 | ||
342 | dprintk("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, " | 342 | pr_debug("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, " |
343 | "reqvid 0x%x, rvo 0x%x\n", | 343 | "reqvid 0x%x, rvo 0x%x\n", |
344 | smp_processor_id(), | 344 | smp_processor_id(), |
345 | data->currfid, data->currvid, reqvid, data->rvo); | 345 | data->currfid, data->currvid, reqvid, data->rvo); |
@@ -349,12 +349,12 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, | |||
349 | rvosteps *= rvomult; | 349 | rvosteps *= rvomult; |
350 | rdmsr(MSR_FIDVID_STATUS, lo, maxvid); | 350 | rdmsr(MSR_FIDVID_STATUS, lo, maxvid); |
351 | maxvid = 0x1f & (maxvid >> 16); | 351 | maxvid = 0x1f & (maxvid >> 16); |
352 | dprintk("ph1 maxvid=0x%x\n", maxvid); | 352 | pr_debug("ph1 maxvid=0x%x\n", maxvid); |
353 | if (reqvid < maxvid) /* lower numbers are higher voltages */ | 353 | if (reqvid < maxvid) /* lower numbers are higher voltages */ |
354 | reqvid = maxvid; | 354 | reqvid = maxvid; |
355 | 355 | ||
356 | while (data->currvid > reqvid) { | 356 | while (data->currvid > reqvid) { |
357 | dprintk("ph1: curr 0x%x, req vid 0x%x\n", | 357 | pr_debug("ph1: curr 0x%x, req vid 0x%x\n", |
358 | data->currvid, reqvid); | 358 | data->currvid, reqvid); |
359 | if (decrease_vid_code_by_step(data, reqvid, data->vidmvs)) | 359 | if (decrease_vid_code_by_step(data, reqvid, data->vidmvs)) |
360 | return 1; | 360 | return 1; |
@@ -365,7 +365,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, | |||
365 | if (data->currvid == maxvid) { | 365 | if (data->currvid == maxvid) { |
366 | rvosteps = 0; | 366 | rvosteps = 0; |
367 | } else { | 367 | } else { |
368 | dprintk("ph1: changing vid for rvo, req 0x%x\n", | 368 | pr_debug("ph1: changing vid for rvo, req 0x%x\n", |
369 | data->currvid - 1); | 369 | data->currvid - 1); |
370 | if (decrease_vid_code_by_step(data, data->currvid-1, 1)) | 370 | if (decrease_vid_code_by_step(data, data->currvid-1, 1)) |
371 | return 1; | 371 | return 1; |
@@ -382,7 +382,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, | |||
382 | return 1; | 382 | return 1; |
383 | } | 383 | } |
384 | 384 | ||
385 | dprintk("ph1 complete, currfid 0x%x, currvid 0x%x\n", | 385 | pr_debug("ph1 complete, currfid 0x%x, currvid 0x%x\n", |
386 | data->currfid, data->currvid); | 386 | data->currfid, data->currvid); |
387 | 387 | ||
388 | return 0; | 388 | return 0; |
@@ -400,7 +400,7 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) | |||
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | dprintk("ph2 (cpu%d): starting, currfid 0x%x, currvid 0x%x, " | 403 | pr_debug("ph2 (cpu%d): starting, currfid 0x%x, currvid 0x%x, " |
404 | "reqfid 0x%x\n", | 404 | "reqfid 0x%x\n", |
405 | smp_processor_id(), | 405 | smp_processor_id(), |
406 | data->currfid, data->currvid, reqfid); | 406 | data->currfid, data->currvid, reqfid); |
@@ -457,7 +457,7 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) | |||
457 | return 1; | 457 | return 1; |
458 | } | 458 | } |
459 | 459 | ||
460 | dprintk("ph2 complete, currfid 0x%x, currvid 0x%x\n", | 460 | pr_debug("ph2 complete, currfid 0x%x, currvid 0x%x\n", |
461 | data->currfid, data->currvid); | 461 | data->currfid, data->currvid); |
462 | 462 | ||
463 | return 0; | 463 | return 0; |
@@ -470,7 +470,7 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, | |||
470 | u32 savefid = data->currfid; | 470 | u32 savefid = data->currfid; |
471 | u32 savereqvid = reqvid; | 471 | u32 savereqvid = reqvid; |
472 | 472 | ||
473 | dprintk("ph3 (cpu%d): starting, currfid 0x%x, currvid 0x%x\n", | 473 | pr_debug("ph3 (cpu%d): starting, currfid 0x%x, currvid 0x%x\n", |
474 | smp_processor_id(), | 474 | smp_processor_id(), |
475 | data->currfid, data->currvid); | 475 | data->currfid, data->currvid); |
476 | 476 | ||
@@ -498,17 +498,17 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, | |||
498 | return 1; | 498 | return 1; |
499 | 499 | ||
500 | if (savereqvid != data->currvid) { | 500 | if (savereqvid != data->currvid) { |
501 | dprintk("ph3 failed, currvid 0x%x\n", data->currvid); | 501 | pr_debug("ph3 failed, currvid 0x%x\n", data->currvid); |
502 | return 1; | 502 | return 1; |
503 | } | 503 | } |
504 | 504 | ||
505 | if (savefid != data->currfid) { | 505 | if (savefid != data->currfid) { |
506 | dprintk("ph3 failed, currfid changed 0x%x\n", | 506 | pr_debug("ph3 failed, currfid changed 0x%x\n", |
507 | data->currfid); | 507 | data->currfid); |
508 | return 1; | 508 | return 1; |
509 | } | 509 | } |
510 | 510 | ||
511 | dprintk("ph3 complete, currfid 0x%x, currvid 0x%x\n", | 511 | pr_debug("ph3 complete, currfid 0x%x, currvid 0x%x\n", |
512 | data->currfid, data->currvid); | 512 | data->currfid, data->currvid); |
513 | 513 | ||
514 | return 0; | 514 | return 0; |
@@ -707,7 +707,7 @@ static int fill_powernow_table(struct powernow_k8_data *data, | |||
707 | return -EIO; | 707 | return -EIO; |
708 | } | 708 | } |
709 | 709 | ||
710 | dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid); | 710 | pr_debug("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid); |
711 | data->powernow_table = powernow_table; | 711 | data->powernow_table = powernow_table; |
712 | if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) | 712 | if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) |
713 | print_basics(data); | 713 | print_basics(data); |
@@ -717,7 +717,7 @@ static int fill_powernow_table(struct powernow_k8_data *data, | |||
717 | (pst[j].vid == data->currvid)) | 717 | (pst[j].vid == data->currvid)) |
718 | return 0; | 718 | return 0; |
719 | 719 | ||
720 | dprintk("currfid/vid do not match PST, ignoring\n"); | 720 | pr_debug("currfid/vid do not match PST, ignoring\n"); |
721 | return 0; | 721 | return 0; |
722 | } | 722 | } |
723 | 723 | ||
@@ -739,36 +739,36 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
739 | if (memcmp(psb, PSB_ID_STRING, PSB_ID_STRING_LEN) != 0) | 739 | if (memcmp(psb, PSB_ID_STRING, PSB_ID_STRING_LEN) != 0) |
740 | continue; | 740 | continue; |
741 | 741 | ||
742 | dprintk("found PSB header at 0x%p\n", psb); | 742 | pr_debug("found PSB header at 0x%p\n", psb); |
743 | 743 | ||
744 | dprintk("table vers: 0x%x\n", psb->tableversion); | 744 | pr_debug("table vers: 0x%x\n", psb->tableversion); |
745 | if (psb->tableversion != PSB_VERSION_1_4) { | 745 | if (psb->tableversion != PSB_VERSION_1_4) { |
746 | printk(KERN_ERR FW_BUG PFX "PSB table is not v1.4\n"); | 746 | printk(KERN_ERR FW_BUG PFX "PSB table is not v1.4\n"); |
747 | return -ENODEV; | 747 | return -ENODEV; |
748 | } | 748 | } |
749 | 749 | ||
750 | dprintk("flags: 0x%x\n", psb->flags1); | 750 | pr_debug("flags: 0x%x\n", psb->flags1); |
751 | if (psb->flags1) { | 751 | if (psb->flags1) { |
752 | printk(KERN_ERR FW_BUG PFX "unknown flags\n"); | 752 | printk(KERN_ERR FW_BUG PFX "unknown flags\n"); |
753 | return -ENODEV; | 753 | return -ENODEV; |
754 | } | 754 | } |
755 | 755 | ||
756 | data->vstable = psb->vstable; | 756 | data->vstable = psb->vstable; |
757 | dprintk("voltage stabilization time: %d(*20us)\n", | 757 | pr_debug("voltage stabilization time: %d(*20us)\n", |
758 | data->vstable); | 758 | data->vstable); |
759 | 759 | ||
760 | dprintk("flags2: 0x%x\n", psb->flags2); | 760 | pr_debug("flags2: 0x%x\n", psb->flags2); |
761 | data->rvo = psb->flags2 & 3; | 761 | data->rvo = psb->flags2 & 3; |
762 | data->irt = ((psb->flags2) >> 2) & 3; | 762 | data->irt = ((psb->flags2) >> 2) & 3; |
763 | mvs = ((psb->flags2) >> 4) & 3; | 763 | mvs = ((psb->flags2) >> 4) & 3; |
764 | data->vidmvs = 1 << mvs; | 764 | data->vidmvs = 1 << mvs; |
765 | data->batps = ((psb->flags2) >> 6) & 3; | 765 | data->batps = ((psb->flags2) >> 6) & 3; |
766 | 766 | ||
767 | dprintk("ramp voltage offset: %d\n", data->rvo); | 767 | pr_debug("ramp voltage offset: %d\n", data->rvo); |
768 | dprintk("isochronous relief time: %d\n", data->irt); | 768 | pr_debug("isochronous relief time: %d\n", data->irt); |
769 | dprintk("maximum voltage step: %d - 0x%x\n", mvs, data->vidmvs); | 769 | pr_debug("maximum voltage step: %d - 0x%x\n", mvs, data->vidmvs); |
770 | 770 | ||
771 | dprintk("numpst: 0x%x\n", psb->num_tables); | 771 | pr_debug("numpst: 0x%x\n", psb->num_tables); |
772 | cpst = psb->num_tables; | 772 | cpst = psb->num_tables; |
773 | if ((psb->cpuid == 0x00000fc0) || | 773 | if ((psb->cpuid == 0x00000fc0) || |
774 | (psb->cpuid == 0x00000fe0)) { | 774 | (psb->cpuid == 0x00000fe0)) { |
@@ -783,13 +783,13 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
783 | } | 783 | } |
784 | 784 | ||
785 | data->plllock = psb->plllocktime; | 785 | data->plllock = psb->plllocktime; |
786 | dprintk("plllocktime: 0x%x (units 1us)\n", psb->plllocktime); | 786 | pr_debug("plllocktime: 0x%x (units 1us)\n", psb->plllocktime); |
787 | dprintk("maxfid: 0x%x\n", psb->maxfid); | 787 | pr_debug("maxfid: 0x%x\n", psb->maxfid); |
788 | dprintk("maxvid: 0x%x\n", psb->maxvid); | 788 | pr_debug("maxvid: 0x%x\n", psb->maxvid); |
789 | maxvid = psb->maxvid; | 789 | maxvid = psb->maxvid; |
790 | 790 | ||
791 | data->numps = psb->numps; | 791 | data->numps = psb->numps; |
792 | dprintk("numpstates: 0x%x\n", data->numps); | 792 | pr_debug("numpstates: 0x%x\n", data->numps); |
793 | return fill_powernow_table(data, | 793 | return fill_powernow_table(data, |
794 | (struct pst_s *)(psb+1), maxvid); | 794 | (struct pst_s *)(psb+1), maxvid); |
795 | } | 795 | } |
@@ -834,13 +834,13 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
834 | u64 control, status; | 834 | u64 control, status; |
835 | 835 | ||
836 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { | 836 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { |
837 | dprintk("register performance failed: bad ACPI data\n"); | 837 | pr_debug("register performance failed: bad ACPI data\n"); |
838 | return -EIO; | 838 | return -EIO; |
839 | } | 839 | } |
840 | 840 | ||
841 | /* verify the data contained in the ACPI structures */ | 841 | /* verify the data contained in the ACPI structures */ |
842 | if (data->acpi_data.state_count <= 1) { | 842 | if (data->acpi_data.state_count <= 1) { |
843 | dprintk("No ACPI P-States\n"); | 843 | pr_debug("No ACPI P-States\n"); |
844 | goto err_out; | 844 | goto err_out; |
845 | } | 845 | } |
846 | 846 | ||
@@ -849,7 +849,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
849 | 849 | ||
850 | if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || | 850 | if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || |
851 | (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | 851 | (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { |
852 | dprintk("Invalid control/status registers (%x - %x)\n", | 852 | pr_debug("Invalid control/status registers (%llx - %llx)\n", |
853 | control, status); | 853 | control, status); |
854 | goto err_out; | 854 | goto err_out; |
855 | } | 855 | } |
@@ -858,7 +858,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
858 | powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) | 858 | powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) |
859 | * (data->acpi_data.state_count + 1)), GFP_KERNEL); | 859 | * (data->acpi_data.state_count + 1)), GFP_KERNEL); |
860 | if (!powernow_table) { | 860 | if (!powernow_table) { |
861 | dprintk("powernow_table memory alloc failure\n"); | 861 | pr_debug("powernow_table memory alloc failure\n"); |
862 | goto err_out; | 862 | goto err_out; |
863 | } | 863 | } |
864 | 864 | ||
@@ -928,7 +928,7 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, | |||
928 | } | 928 | } |
929 | rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); | 929 | rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); |
930 | if (!(hi & HW_PSTATE_VALID_MASK)) { | 930 | if (!(hi & HW_PSTATE_VALID_MASK)) { |
931 | dprintk("invalid pstate %d, ignoring\n", index); | 931 | pr_debug("invalid pstate %d, ignoring\n", index); |
932 | invalidate_entry(powernow_table, i); | 932 | invalidate_entry(powernow_table, i); |
933 | continue; | 933 | continue; |
934 | } | 934 | } |
@@ -968,7 +968,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, | |||
968 | vid = (control >> VID_SHIFT) & VID_MASK; | 968 | vid = (control >> VID_SHIFT) & VID_MASK; |
969 | } | 969 | } |
970 | 970 | ||
971 | dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); | 971 | pr_debug(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); |
972 | 972 | ||
973 | index = fid | (vid<<8); | 973 | index = fid | (vid<<8); |
974 | powernow_table[i].index = index; | 974 | powernow_table[i].index = index; |
@@ -978,7 +978,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, | |||
978 | 978 | ||
979 | /* verify frequency is OK */ | 979 | /* verify frequency is OK */ |
980 | if ((freq > (MAX_FREQ * 1000)) || (freq < (MIN_FREQ * 1000))) { | 980 | if ((freq > (MAX_FREQ * 1000)) || (freq < (MIN_FREQ * 1000))) { |
981 | dprintk("invalid freq %u kHz, ignoring\n", freq); | 981 | pr_debug("invalid freq %u kHz, ignoring\n", freq); |
982 | invalidate_entry(powernow_table, i); | 982 | invalidate_entry(powernow_table, i); |
983 | continue; | 983 | continue; |
984 | } | 984 | } |
@@ -986,7 +986,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, | |||
986 | /* verify voltage is OK - | 986 | /* verify voltage is OK - |
987 | * BIOSs are using "off" to indicate invalid */ | 987 | * BIOSs are using "off" to indicate invalid */ |
988 | if (vid == VID_OFF) { | 988 | if (vid == VID_OFF) { |
989 | dprintk("invalid vid %u, ignoring\n", vid); | 989 | pr_debug("invalid vid %u, ignoring\n", vid); |
990 | invalidate_entry(powernow_table, i); | 990 | invalidate_entry(powernow_table, i); |
991 | continue; | 991 | continue; |
992 | } | 992 | } |
@@ -1047,7 +1047,7 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, | |||
1047 | int res, i; | 1047 | int res, i; |
1048 | struct cpufreq_freqs freqs; | 1048 | struct cpufreq_freqs freqs; |
1049 | 1049 | ||
1050 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); | 1050 | pr_debug("cpu %d transition to index %u\n", smp_processor_id(), index); |
1051 | 1051 | ||
1052 | /* fid/vid correctness check for k8 */ | 1052 | /* fid/vid correctness check for k8 */ |
1053 | /* fid are the lower 8 bits of the index we stored into | 1053 | /* fid are the lower 8 bits of the index we stored into |
@@ -1057,18 +1057,18 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, | |||
1057 | fid = data->powernow_table[index].index & 0xFF; | 1057 | fid = data->powernow_table[index].index & 0xFF; |
1058 | vid = (data->powernow_table[index].index & 0xFF00) >> 8; | 1058 | vid = (data->powernow_table[index].index & 0xFF00) >> 8; |
1059 | 1059 | ||
1060 | dprintk("table matched fid 0x%x, giving vid 0x%x\n", fid, vid); | 1060 | pr_debug("table matched fid 0x%x, giving vid 0x%x\n", fid, vid); |
1061 | 1061 | ||
1062 | if (query_current_values_with_pending_wait(data)) | 1062 | if (query_current_values_with_pending_wait(data)) |
1063 | return 1; | 1063 | return 1; |
1064 | 1064 | ||
1065 | if ((data->currvid == vid) && (data->currfid == fid)) { | 1065 | if ((data->currvid == vid) && (data->currfid == fid)) { |
1066 | dprintk("target matches current values (fid 0x%x, vid 0x%x)\n", | 1066 | pr_debug("target matches current values (fid 0x%x, vid 0x%x)\n", |
1067 | fid, vid); | 1067 | fid, vid); |
1068 | return 0; | 1068 | return 0; |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | dprintk("cpu %d, changing to fid 0x%x, vid 0x%x\n", | 1071 | pr_debug("cpu %d, changing to fid 0x%x, vid 0x%x\n", |
1072 | smp_processor_id(), fid, vid); | 1072 | smp_processor_id(), fid, vid); |
1073 | freqs.old = find_khz_freq_from_fid(data->currfid); | 1073 | freqs.old = find_khz_freq_from_fid(data->currfid); |
1074 | freqs.new = find_khz_freq_from_fid(fid); | 1074 | freqs.new = find_khz_freq_from_fid(fid); |
@@ -1096,7 +1096,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, | |||
1096 | int res, i; | 1096 | int res, i; |
1097 | struct cpufreq_freqs freqs; | 1097 | struct cpufreq_freqs freqs; |
1098 | 1098 | ||
1099 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); | 1099 | pr_debug("cpu %d transition to index %u\n", smp_processor_id(), index); |
1100 | 1100 | ||
1101 | /* get MSR index for hardware pstate transition */ | 1101 | /* get MSR index for hardware pstate transition */ |
1102 | pstate = index & HW_PSTATE_MASK; | 1102 | pstate = index & HW_PSTATE_MASK; |
@@ -1156,14 +1156,14 @@ static int powernowk8_target(struct cpufreq_policy *pol, | |||
1156 | goto err_out; | 1156 | goto err_out; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | dprintk("targ: cpu %d, %d kHz, min %d, max %d, relation %d\n", | 1159 | pr_debug("targ: cpu %d, %d kHz, min %d, max %d, relation %d\n", |
1160 | pol->cpu, targfreq, pol->min, pol->max, relation); | 1160 | pol->cpu, targfreq, pol->min, pol->max, relation); |
1161 | 1161 | ||
1162 | if (query_current_values_with_pending_wait(data)) | 1162 | if (query_current_values_with_pending_wait(data)) |
1163 | goto err_out; | 1163 | goto err_out; |
1164 | 1164 | ||
1165 | if (cpu_family != CPU_HW_PSTATE) { | 1165 | if (cpu_family != CPU_HW_PSTATE) { |
1166 | dprintk("targ: curr fid 0x%x, vid 0x%x\n", | 1166 | pr_debug("targ: curr fid 0x%x, vid 0x%x\n", |
1167 | data->currfid, data->currvid); | 1167 | data->currfid, data->currvid); |
1168 | 1168 | ||
1169 | if ((checkvid != data->currvid) || | 1169 | if ((checkvid != data->currvid) || |
@@ -1319,7 +1319,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1319 | data->currpstate); | 1319 | data->currpstate); |
1320 | else | 1320 | else |
1321 | pol->cur = find_khz_freq_from_fid(data->currfid); | 1321 | pol->cur = find_khz_freq_from_fid(data->currfid); |
1322 | dprintk("policy current frequency %d kHz\n", pol->cur); | 1322 | pr_debug("policy current frequency %d kHz\n", pol->cur); |
1323 | 1323 | ||
1324 | /* min/max the cpu is capable of */ | 1324 | /* min/max the cpu is capable of */ |
1325 | if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { | 1325 | if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { |
@@ -1337,10 +1337,10 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1337 | cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); | 1337 | cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); |
1338 | 1338 | ||
1339 | if (cpu_family == CPU_HW_PSTATE) | 1339 | if (cpu_family == CPU_HW_PSTATE) |
1340 | dprintk("cpu_init done, current pstate 0x%x\n", | 1340 | pr_debug("cpu_init done, current pstate 0x%x\n", |
1341 | data->currpstate); | 1341 | data->currpstate); |
1342 | else | 1342 | else |
1343 | dprintk("cpu_init done, current fid 0x%x, vid 0x%x\n", | 1343 | pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n", |
1344 | data->currfid, data->currvid); | 1344 | data->currfid, data->currvid); |
1345 | 1345 | ||
1346 | per_cpu(powernow_data, pol->cpu) = data; | 1346 | per_cpu(powernow_data, pol->cpu) = data; |
@@ -1586,7 +1586,7 @@ static int __cpuinit powernowk8_init(void) | |||
1586 | /* driver entry point for term */ | 1586 | /* driver entry point for term */ |
1587 | static void __exit powernowk8_exit(void) | 1587 | static void __exit powernowk8_exit(void) |
1588 | { | 1588 | { |
1589 | dprintk("exit\n"); | 1589 | pr_debug("exit\n"); |
1590 | 1590 | ||
1591 | if (boot_cpu_has(X86_FEATURE_CPB)) { | 1591 | if (boot_cpu_has(X86_FEATURE_CPB)) { |
1592 | msrs_free(msrs); | 1592 | msrs_free(msrs); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h index df3529b1c02d..3744d26cdc2b 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -211,8 +211,6 @@ struct pst_s { | |||
211 | u8 vid; | 211 | u8 vid; |
212 | }; | 212 | }; |
213 | 213 | ||
214 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "powernow-k8", msg) | ||
215 | |||
216 | static int core_voltage_pre_transition(struct powernow_k8_data *data, | 214 | static int core_voltage_pre_transition(struct powernow_k8_data *data, |
217 | u32 reqvid, u32 regfid); | 215 | u32 reqvid, u32 regfid); |
218 | static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvid); | 216 | static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvid); |
diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c index 435a996a613a..1e205e6b1727 100644 --- a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c +++ b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c | |||
@@ -29,8 +29,6 @@ | |||
29 | 29 | ||
30 | static __u8 __iomem *cpuctl; | 30 | static __u8 __iomem *cpuctl; |
31 | 31 | ||
32 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
33 | "sc520_freq", msg) | ||
34 | #define PFX "sc520_freq: " | 32 | #define PFX "sc520_freq: " |
35 | 33 | ||
36 | static struct cpufreq_frequency_table sc520_freq_table[] = { | 34 | static struct cpufreq_frequency_table sc520_freq_table[] = { |
@@ -66,7 +64,7 @@ static void sc520_freq_set_cpu_state(unsigned int state) | |||
66 | 64 | ||
67 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 65 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
68 | 66 | ||
69 | dprintk("attempting to set frequency to %i kHz\n", | 67 | pr_debug("attempting to set frequency to %i kHz\n", |
70 | sc520_freq_table[state].frequency); | 68 | sc520_freq_table[state].frequency); |
71 | 69 | ||
72 | local_irq_disable(); | 70 | local_irq_disable(); |
@@ -161,7 +159,7 @@ static int __init sc520_freq_init(void) | |||
161 | /* Test if we have the right hardware */ | 159 | /* Test if we have the right hardware */ |
162 | if (c->x86_vendor != X86_VENDOR_AMD || | 160 | if (c->x86_vendor != X86_VENDOR_AMD || |
163 | c->x86 != 4 || c->x86_model != 9) { | 161 | c->x86 != 4 || c->x86_model != 9) { |
164 | dprintk("no Elan SC520 processor found!\n"); | 162 | pr_debug("no Elan SC520 processor found!\n"); |
165 | return -ENODEV; | 163 | return -ENODEV; |
166 | } | 164 | } |
167 | cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); | 165 | cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 9b1ff37de46a..6ea3455def21 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -29,9 +29,6 @@ | |||
29 | #define PFX "speedstep-centrino: " | 29 | #define PFX "speedstep-centrino: " |
30 | #define MAINTAINER "cpufreq@vger.kernel.org" | 30 | #define MAINTAINER "cpufreq@vger.kernel.org" |
31 | 31 | ||
32 | #define dprintk(msg...) \ | ||
33 | cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) | ||
34 | |||
35 | #define INTEL_MSR_RANGE (0xffff) | 32 | #define INTEL_MSR_RANGE (0xffff) |
36 | 33 | ||
37 | struct cpu_id | 34 | struct cpu_id |
@@ -244,7 +241,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) | |||
244 | 241 | ||
245 | if (model->cpu_id == NULL) { | 242 | if (model->cpu_id == NULL) { |
246 | /* No match at all */ | 243 | /* No match at all */ |
247 | dprintk("no support for CPU model \"%s\": " | 244 | pr_debug("no support for CPU model \"%s\": " |
248 | "send /proc/cpuinfo to " MAINTAINER "\n", | 245 | "send /proc/cpuinfo to " MAINTAINER "\n", |
249 | cpu->x86_model_id); | 246 | cpu->x86_model_id); |
250 | return -ENOENT; | 247 | return -ENOENT; |
@@ -252,15 +249,15 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) | |||
252 | 249 | ||
253 | if (model->op_points == NULL) { | 250 | if (model->op_points == NULL) { |
254 | /* Matched a non-match */ | 251 | /* Matched a non-match */ |
255 | dprintk("no table support for CPU model \"%s\"\n", | 252 | pr_debug("no table support for CPU model \"%s\"\n", |
256 | cpu->x86_model_id); | 253 | cpu->x86_model_id); |
257 | dprintk("try using the acpi-cpufreq driver\n"); | 254 | pr_debug("try using the acpi-cpufreq driver\n"); |
258 | return -ENOENT; | 255 | return -ENOENT; |
259 | } | 256 | } |
260 | 257 | ||
261 | per_cpu(centrino_model, policy->cpu) = model; | 258 | per_cpu(centrino_model, policy->cpu) = model; |
262 | 259 | ||
263 | dprintk("found \"%s\": max frequency: %dkHz\n", | 260 | pr_debug("found \"%s\": max frequency: %dkHz\n", |
264 | model->model_name, model->max_freq); | 261 | model->model_name, model->max_freq); |
265 | 262 | ||
266 | return 0; | 263 | return 0; |
@@ -369,7 +366,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
369 | per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; | 366 | per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; |
370 | 367 | ||
371 | if (!per_cpu(centrino_cpu, policy->cpu)) { | 368 | if (!per_cpu(centrino_cpu, policy->cpu)) { |
372 | dprintk("found unsupported CPU with " | 369 | pr_debug("found unsupported CPU with " |
373 | "Enhanced SpeedStep: send /proc/cpuinfo to " | 370 | "Enhanced SpeedStep: send /proc/cpuinfo to " |
374 | MAINTAINER "\n"); | 371 | MAINTAINER "\n"); |
375 | return -ENODEV; | 372 | return -ENODEV; |
@@ -385,7 +382,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
385 | 382 | ||
386 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { | 383 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
387 | l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; | 384 | l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; |
388 | dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); | 385 | pr_debug("trying to enable Enhanced SpeedStep (%x)\n", l); |
389 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); | 386 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); |
390 | 387 | ||
391 | /* check to see if it stuck */ | 388 | /* check to see if it stuck */ |
@@ -402,7 +399,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
402 | /* 10uS transition latency */ | 399 | /* 10uS transition latency */ |
403 | policy->cur = freq; | 400 | policy->cur = freq; |
404 | 401 | ||
405 | dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); | 402 | pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur); |
406 | 403 | ||
407 | ret = cpufreq_frequency_table_cpuinfo(policy, | 404 | ret = cpufreq_frequency_table_cpuinfo(policy, |
408 | per_cpu(centrino_model, policy->cpu)->op_points); | 405 | per_cpu(centrino_model, policy->cpu)->op_points); |
@@ -498,7 +495,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
498 | good_cpu = j; | 495 | good_cpu = j; |
499 | 496 | ||
500 | if (good_cpu >= nr_cpu_ids) { | 497 | if (good_cpu >= nr_cpu_ids) { |
501 | dprintk("couldn't limit to CPUs in this domain\n"); | 498 | pr_debug("couldn't limit to CPUs in this domain\n"); |
502 | retval = -EAGAIN; | 499 | retval = -EAGAIN; |
503 | if (first_cpu) { | 500 | if (first_cpu) { |
504 | /* We haven't started the transition yet. */ | 501 | /* We haven't started the transition yet. */ |
@@ -512,7 +509,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
512 | if (first_cpu) { | 509 | if (first_cpu) { |
513 | rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); | 510 | rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); |
514 | if (msr == (oldmsr & 0xffff)) { | 511 | if (msr == (oldmsr & 0xffff)) { |
515 | dprintk("no change needed - msr was and needs " | 512 | pr_debug("no change needed - msr was and needs " |
516 | "to be %x\n", oldmsr); | 513 | "to be %x\n", oldmsr); |
517 | retval = 0; | 514 | retval = 0; |
518 | goto out; | 515 | goto out; |
@@ -521,7 +518,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
521 | freqs.old = extract_clock(oldmsr, cpu, 0); | 518 | freqs.old = extract_clock(oldmsr, cpu, 0); |
522 | freqs.new = extract_clock(msr, cpu, 0); | 519 | freqs.new = extract_clock(msr, cpu, 0); |
523 | 520 | ||
524 | dprintk("target=%dkHz old=%d new=%d msr=%04x\n", | 521 | pr_debug("target=%dkHz old=%d new=%d msr=%04x\n", |
525 | target_freq, freqs.old, freqs.new, msr); | 522 | target_freq, freqs.old, freqs.new, msr); |
526 | 523 | ||
527 | for_each_cpu(k, policy->cpus) { | 524 | for_each_cpu(k, policy->cpus) { |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 561758e95180..a748ce782fee 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -53,10 +53,6 @@ static struct cpufreq_frequency_table speedstep_freqs[] = { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | 55 | ||
56 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
57 | "speedstep-ich", msg) | ||
58 | |||
59 | |||
60 | /** | 56 | /** |
61 | * speedstep_find_register - read the PMBASE address | 57 | * speedstep_find_register - read the PMBASE address |
62 | * | 58 | * |
@@ -80,7 +76,7 @@ static int speedstep_find_register(void) | |||
80 | return -ENODEV; | 76 | return -ENODEV; |
81 | } | 77 | } |
82 | 78 | ||
83 | dprintk("pmbase is 0x%x\n", pmbase); | 79 | pr_debug("pmbase is 0x%x\n", pmbase); |
84 | return 0; | 80 | return 0; |
85 | } | 81 | } |
86 | 82 | ||
@@ -106,13 +102,13 @@ static void speedstep_set_state(unsigned int state) | |||
106 | /* read state */ | 102 | /* read state */ |
107 | value = inb(pmbase + 0x50); | 103 | value = inb(pmbase + 0x50); |
108 | 104 | ||
109 | dprintk("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); | 105 | pr_debug("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); |
110 | 106 | ||
111 | /* write new state */ | 107 | /* write new state */ |
112 | value &= 0xFE; | 108 | value &= 0xFE; |
113 | value |= state; | 109 | value |= state; |
114 | 110 | ||
115 | dprintk("writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase); | 111 | pr_debug("writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase); |
116 | 112 | ||
117 | /* Disable bus master arbitration */ | 113 | /* Disable bus master arbitration */ |
118 | pm2_blk = inb(pmbase + 0x20); | 114 | pm2_blk = inb(pmbase + 0x20); |
@@ -132,10 +128,10 @@ static void speedstep_set_state(unsigned int state) | |||
132 | /* Enable IRQs */ | 128 | /* Enable IRQs */ |
133 | local_irq_restore(flags); | 129 | local_irq_restore(flags); |
134 | 130 | ||
135 | dprintk("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); | 131 | pr_debug("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); |
136 | 132 | ||
137 | if (state == (value & 0x1)) | 133 | if (state == (value & 0x1)) |
138 | dprintk("change to %u MHz succeeded\n", | 134 | pr_debug("change to %u MHz succeeded\n", |
139 | speedstep_get_frequency(speedstep_processor) / 1000); | 135 | speedstep_get_frequency(speedstep_processor) / 1000); |
140 | else | 136 | else |
141 | printk(KERN_ERR "cpufreq: change failed - I/O error\n"); | 137 | printk(KERN_ERR "cpufreq: change failed - I/O error\n"); |
@@ -165,7 +161,7 @@ static int speedstep_activate(void) | |||
165 | pci_read_config_word(speedstep_chipset_dev, 0x00A0, &value); | 161 | pci_read_config_word(speedstep_chipset_dev, 0x00A0, &value); |
166 | if (!(value & 0x08)) { | 162 | if (!(value & 0x08)) { |
167 | value |= 0x08; | 163 | value |= 0x08; |
168 | dprintk("activating SpeedStep (TM) registers\n"); | 164 | pr_debug("activating SpeedStep (TM) registers\n"); |
169 | pci_write_config_word(speedstep_chipset_dev, 0x00A0, value); | 165 | pci_write_config_word(speedstep_chipset_dev, 0x00A0, value); |
170 | } | 166 | } |
171 | 167 | ||
@@ -218,7 +214,7 @@ static unsigned int speedstep_detect_chipset(void) | |||
218 | return 2; /* 2-M */ | 214 | return 2; /* 2-M */ |
219 | 215 | ||
220 | if (hostbridge->revision < 5) { | 216 | if (hostbridge->revision < 5) { |
221 | dprintk("hostbridge does not support speedstep\n"); | 217 | pr_debug("hostbridge does not support speedstep\n"); |
222 | speedstep_chipset_dev = NULL; | 218 | speedstep_chipset_dev = NULL; |
223 | pci_dev_put(hostbridge); | 219 | pci_dev_put(hostbridge); |
224 | return 0; | 220 | return 0; |
@@ -246,7 +242,7 @@ static unsigned int speedstep_get(unsigned int cpu) | |||
246 | if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) | 242 | if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) |
247 | BUG(); | 243 | BUG(); |
248 | 244 | ||
249 | dprintk("detected %u kHz as current frequency\n", speed); | 245 | pr_debug("detected %u kHz as current frequency\n", speed); |
250 | return speed; | 246 | return speed; |
251 | } | 247 | } |
252 | 248 | ||
@@ -276,7 +272,7 @@ static int speedstep_target(struct cpufreq_policy *policy, | |||
276 | freqs.new = speedstep_freqs[newstate].frequency; | 272 | freqs.new = speedstep_freqs[newstate].frequency; |
277 | freqs.cpu = policy->cpu; | 273 | freqs.cpu = policy->cpu; |
278 | 274 | ||
279 | dprintk("transiting from %u to %u kHz\n", freqs.old, freqs.new); | 275 | pr_debug("transiting from %u to %u kHz\n", freqs.old, freqs.new); |
280 | 276 | ||
281 | /* no transition necessary */ | 277 | /* no transition necessary */ |
282 | if (freqs.old == freqs.new) | 278 | if (freqs.old == freqs.new) |
@@ -351,7 +347,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
351 | if (!speed) | 347 | if (!speed) |
352 | return -EIO; | 348 | return -EIO; |
353 | 349 | ||
354 | dprintk("currently at %s speed setting - %i MHz\n", | 350 | pr_debug("currently at %s speed setting - %i MHz\n", |
355 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) | 351 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) |
356 | ? "low" : "high", | 352 | ? "low" : "high", |
357 | (speed / 1000)); | 353 | (speed / 1000)); |
@@ -405,14 +401,14 @@ static int __init speedstep_init(void) | |||
405 | /* detect processor */ | 401 | /* detect processor */ |
406 | speedstep_processor = speedstep_detect_processor(); | 402 | speedstep_processor = speedstep_detect_processor(); |
407 | if (!speedstep_processor) { | 403 | if (!speedstep_processor) { |
408 | dprintk("Intel(R) SpeedStep(TM) capable processor " | 404 | pr_debug("Intel(R) SpeedStep(TM) capable processor " |
409 | "not found\n"); | 405 | "not found\n"); |
410 | return -ENODEV; | 406 | return -ENODEV; |
411 | } | 407 | } |
412 | 408 | ||
413 | /* detect chipset */ | 409 | /* detect chipset */ |
414 | if (!speedstep_detect_chipset()) { | 410 | if (!speedstep_detect_chipset()) { |
415 | dprintk("Intel(R) SpeedStep(TM) for this chipset not " | 411 | pr_debug("Intel(R) SpeedStep(TM) for this chipset not " |
416 | "(yet) available.\n"); | 412 | "(yet) available.\n"); |
417 | return -ENODEV; | 413 | return -ENODEV; |
418 | } | 414 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index a94ec6be69fa..8af2d2fd9d51 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -18,9 +18,6 @@ | |||
18 | #include <asm/tsc.h> | 18 | #include <asm/tsc.h> |
19 | #include "speedstep-lib.h" | 19 | #include "speedstep-lib.h" |
20 | 20 | ||
21 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
22 | "speedstep-lib", msg) | ||
23 | |||
24 | #define PFX "speedstep-lib: " | 21 | #define PFX "speedstep-lib: " |
25 | 22 | ||
26 | #ifdef CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK | 23 | #ifdef CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK |
@@ -75,7 +72,7 @@ static unsigned int pentium3_get_frequency(enum speedstep_processor processor) | |||
75 | 72 | ||
76 | /* read MSR 0x2a - we only need the low 32 bits */ | 73 | /* read MSR 0x2a - we only need the low 32 bits */ |
77 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 74 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
78 | dprintk("P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); | 75 | pr_debug("P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); |
79 | msr_tmp = msr_lo; | 76 | msr_tmp = msr_lo; |
80 | 77 | ||
81 | /* decode the FSB */ | 78 | /* decode the FSB */ |
@@ -89,7 +86,7 @@ static unsigned int pentium3_get_frequency(enum speedstep_processor processor) | |||
89 | 86 | ||
90 | /* decode the multiplier */ | 87 | /* decode the multiplier */ |
91 | if (processor == SPEEDSTEP_CPU_PIII_C_EARLY) { | 88 | if (processor == SPEEDSTEP_CPU_PIII_C_EARLY) { |
92 | dprintk("workaround for early PIIIs\n"); | 89 | pr_debug("workaround for early PIIIs\n"); |
93 | msr_lo &= 0x03c00000; | 90 | msr_lo &= 0x03c00000; |
94 | } else | 91 | } else |
95 | msr_lo &= 0x0bc00000; | 92 | msr_lo &= 0x0bc00000; |
@@ -100,7 +97,7 @@ static unsigned int pentium3_get_frequency(enum speedstep_processor processor) | |||
100 | j++; | 97 | j++; |
101 | } | 98 | } |
102 | 99 | ||
103 | dprintk("speed is %u\n", | 100 | pr_debug("speed is %u\n", |
104 | (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100)); | 101 | (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100)); |
105 | 102 | ||
106 | return msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100; | 103 | return msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100; |
@@ -112,7 +109,7 @@ static unsigned int pentiumM_get_frequency(void) | |||
112 | u32 msr_lo, msr_tmp; | 109 | u32 msr_lo, msr_tmp; |
113 | 110 | ||
114 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 111 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
115 | dprintk("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); | 112 | pr_debug("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); |
116 | 113 | ||
117 | /* see table B-2 of 24547212.pdf */ | 114 | /* see table B-2 of 24547212.pdf */ |
118 | if (msr_lo & 0x00040000) { | 115 | if (msr_lo & 0x00040000) { |
@@ -122,7 +119,7 @@ static unsigned int pentiumM_get_frequency(void) | |||
122 | } | 119 | } |
123 | 120 | ||
124 | msr_tmp = (msr_lo >> 22) & 0x1f; | 121 | msr_tmp = (msr_lo >> 22) & 0x1f; |
125 | dprintk("bits 22-26 are 0x%x, speed is %u\n", | 122 | pr_debug("bits 22-26 are 0x%x, speed is %u\n", |
126 | msr_tmp, (msr_tmp * 100 * 1000)); | 123 | msr_tmp, (msr_tmp * 100 * 1000)); |
127 | 124 | ||
128 | return msr_tmp * 100 * 1000; | 125 | return msr_tmp * 100 * 1000; |
@@ -160,11 +157,11 @@ static unsigned int pentium_core_get_frequency(void) | |||
160 | } | 157 | } |
161 | 158 | ||
162 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 159 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
163 | dprintk("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", | 160 | pr_debug("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", |
164 | msr_lo, msr_tmp); | 161 | msr_lo, msr_tmp); |
165 | 162 | ||
166 | msr_tmp = (msr_lo >> 22) & 0x1f; | 163 | msr_tmp = (msr_lo >> 22) & 0x1f; |
167 | dprintk("bits 22-26 are 0x%x, speed is %u\n", | 164 | pr_debug("bits 22-26 are 0x%x, speed is %u\n", |
168 | msr_tmp, (msr_tmp * fsb)); | 165 | msr_tmp, (msr_tmp * fsb)); |
169 | 166 | ||
170 | ret = (msr_tmp * fsb); | 167 | ret = (msr_tmp * fsb); |
@@ -190,7 +187,7 @@ static unsigned int pentium4_get_frequency(void) | |||
190 | 187 | ||
191 | rdmsr(0x2c, msr_lo, msr_hi); | 188 | rdmsr(0x2c, msr_lo, msr_hi); |
192 | 189 | ||
193 | dprintk("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); | 190 | pr_debug("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); |
194 | 191 | ||
195 | /* decode the FSB: see IA-32 Intel (C) Architecture Software | 192 | /* decode the FSB: see IA-32 Intel (C) Architecture Software |
196 | * Developer's Manual, Volume 3: System Prgramming Guide, | 193 | * Developer's Manual, Volume 3: System Prgramming Guide, |
@@ -217,7 +214,7 @@ static unsigned int pentium4_get_frequency(void) | |||
217 | /* Multiplier. */ | 214 | /* Multiplier. */ |
218 | mult = msr_lo >> 24; | 215 | mult = msr_lo >> 24; |
219 | 216 | ||
220 | dprintk("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", | 217 | pr_debug("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", |
221 | fsb, mult, (fsb * mult)); | 218 | fsb, mult, (fsb * mult)); |
222 | 219 | ||
223 | ret = (fsb * mult); | 220 | ret = (fsb * mult); |
@@ -257,7 +254,7 @@ unsigned int speedstep_detect_processor(void) | |||
257 | struct cpuinfo_x86 *c = &cpu_data(0); | 254 | struct cpuinfo_x86 *c = &cpu_data(0); |
258 | u32 ebx, msr_lo, msr_hi; | 255 | u32 ebx, msr_lo, msr_hi; |
259 | 256 | ||
260 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); | 257 | pr_debug("x86: %x, model: %x\n", c->x86, c->x86_model); |
261 | 258 | ||
262 | if ((c->x86_vendor != X86_VENDOR_INTEL) || | 259 | if ((c->x86_vendor != X86_VENDOR_INTEL) || |
263 | ((c->x86 != 6) && (c->x86 != 0xF))) | 260 | ((c->x86 != 6) && (c->x86 != 0xF))) |
@@ -272,7 +269,7 @@ unsigned int speedstep_detect_processor(void) | |||
272 | ebx = cpuid_ebx(0x00000001); | 269 | ebx = cpuid_ebx(0x00000001); |
273 | ebx &= 0x000000FF; | 270 | ebx &= 0x000000FF; |
274 | 271 | ||
275 | dprintk("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); | 272 | pr_debug("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); |
276 | 273 | ||
277 | switch (c->x86_mask) { | 274 | switch (c->x86_mask) { |
278 | case 4: | 275 | case 4: |
@@ -327,7 +324,7 @@ unsigned int speedstep_detect_processor(void) | |||
327 | /* cpuid_ebx(1) is 0x04 for desktop PIII, | 324 | /* cpuid_ebx(1) is 0x04 for desktop PIII, |
328 | * 0x06 for mobile PIII-M */ | 325 | * 0x06 for mobile PIII-M */ |
329 | ebx = cpuid_ebx(0x00000001); | 326 | ebx = cpuid_ebx(0x00000001); |
330 | dprintk("ebx is %x\n", ebx); | 327 | pr_debug("ebx is %x\n", ebx); |
331 | 328 | ||
332 | ebx &= 0x000000FF; | 329 | ebx &= 0x000000FF; |
333 | 330 | ||
@@ -344,7 +341,7 @@ unsigned int speedstep_detect_processor(void) | |||
344 | /* all mobile PIII Coppermines have FSB 100 MHz | 341 | /* all mobile PIII Coppermines have FSB 100 MHz |
345 | * ==> sort out a few desktop PIIIs. */ | 342 | * ==> sort out a few desktop PIIIs. */ |
346 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi); | 343 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi); |
347 | dprintk("Coppermine: MSR_IA32_EBL_CR_POWERON is 0x%x, 0x%x\n", | 344 | pr_debug("Coppermine: MSR_IA32_EBL_CR_POWERON is 0x%x, 0x%x\n", |
348 | msr_lo, msr_hi); | 345 | msr_lo, msr_hi); |
349 | msr_lo &= 0x00c0000; | 346 | msr_lo &= 0x00c0000; |
350 | if (msr_lo != 0x0080000) | 347 | if (msr_lo != 0x0080000) |
@@ -357,12 +354,12 @@ unsigned int speedstep_detect_processor(void) | |||
357 | * bit 56 or 57 is set | 354 | * bit 56 or 57 is set |
358 | */ | 355 | */ |
359 | rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi); | 356 | rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi); |
360 | dprintk("Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", | 357 | pr_debug("Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", |
361 | msr_lo, msr_hi); | 358 | msr_lo, msr_hi); |
362 | if ((msr_hi & (1<<18)) && | 359 | if ((msr_hi & (1<<18)) && |
363 | (relaxed_check ? 1 : (msr_hi & (3<<24)))) { | 360 | (relaxed_check ? 1 : (msr_hi & (3<<24)))) { |
364 | if (c->x86_mask == 0x01) { | 361 | if (c->x86_mask == 0x01) { |
365 | dprintk("early PIII version\n"); | 362 | pr_debug("early PIII version\n"); |
366 | return SPEEDSTEP_CPU_PIII_C_EARLY; | 363 | return SPEEDSTEP_CPU_PIII_C_EARLY; |
367 | } else | 364 | } else |
368 | return SPEEDSTEP_CPU_PIII_C; | 365 | return SPEEDSTEP_CPU_PIII_C; |
@@ -393,14 +390,14 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
393 | if ((!processor) || (!low_speed) || (!high_speed) || (!set_state)) | 390 | if ((!processor) || (!low_speed) || (!high_speed) || (!set_state)) |
394 | return -EINVAL; | 391 | return -EINVAL; |
395 | 392 | ||
396 | dprintk("trying to determine both speeds\n"); | 393 | pr_debug("trying to determine both speeds\n"); |
397 | 394 | ||
398 | /* get current speed */ | 395 | /* get current speed */ |
399 | prev_speed = speedstep_get_frequency(processor); | 396 | prev_speed = speedstep_get_frequency(processor); |
400 | if (!prev_speed) | 397 | if (!prev_speed) |
401 | return -EIO; | 398 | return -EIO; |
402 | 399 | ||
403 | dprintk("previous speed is %u\n", prev_speed); | 400 | pr_debug("previous speed is %u\n", prev_speed); |
404 | 401 | ||
405 | local_irq_save(flags); | 402 | local_irq_save(flags); |
406 | 403 | ||
@@ -412,7 +409,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
412 | goto out; | 409 | goto out; |
413 | } | 410 | } |
414 | 411 | ||
415 | dprintk("low speed is %u\n", *low_speed); | 412 | pr_debug("low speed is %u\n", *low_speed); |
416 | 413 | ||
417 | /* start latency measurement */ | 414 | /* start latency measurement */ |
418 | if (transition_latency) | 415 | if (transition_latency) |
@@ -431,7 +428,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
431 | goto out; | 428 | goto out; |
432 | } | 429 | } |
433 | 430 | ||
434 | dprintk("high speed is %u\n", *high_speed); | 431 | pr_debug("high speed is %u\n", *high_speed); |
435 | 432 | ||
436 | if (*low_speed == *high_speed) { | 433 | if (*low_speed == *high_speed) { |
437 | ret = -ENODEV; | 434 | ret = -ENODEV; |
@@ -445,7 +442,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
445 | if (transition_latency) { | 442 | if (transition_latency) { |
446 | *transition_latency = (tv2.tv_sec - tv1.tv_sec) * USEC_PER_SEC + | 443 | *transition_latency = (tv2.tv_sec - tv1.tv_sec) * USEC_PER_SEC + |
447 | tv2.tv_usec - tv1.tv_usec; | 444 | tv2.tv_usec - tv1.tv_usec; |
448 | dprintk("transition latency is %u uSec\n", *transition_latency); | 445 | pr_debug("transition latency is %u uSec\n", *transition_latency); |
449 | 446 | ||
450 | /* convert uSec to nSec and add 20% for safety reasons */ | 447 | /* convert uSec to nSec and add 20% for safety reasons */ |
451 | *transition_latency *= 1200; | 448 | *transition_latency *= 1200; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index 91bc25b67bc1..c76ead3490bf 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -55,9 +55,6 @@ static struct cpufreq_frequency_table speedstep_freqs[] = { | |||
55 | * of DMA activity going on? */ | 55 | * of DMA activity going on? */ |
56 | #define SMI_TRIES 5 | 56 | #define SMI_TRIES 5 |
57 | 57 | ||
58 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ | ||
59 | "speedstep-smi", msg) | ||
60 | |||
61 | /** | 58 | /** |
62 | * speedstep_smi_ownership | 59 | * speedstep_smi_ownership |
63 | */ | 60 | */ |
@@ -70,7 +67,7 @@ static int speedstep_smi_ownership(void) | |||
70 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); | 67 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); |
71 | magic = virt_to_phys(magic_data); | 68 | magic = virt_to_phys(magic_data); |
72 | 69 | ||
73 | dprintk("trying to obtain ownership with command %x at port %x\n", | 70 | pr_debug("trying to obtain ownership with command %x at port %x\n", |
74 | command, smi_port); | 71 | command, smi_port); |
75 | 72 | ||
76 | __asm__ __volatile__( | 73 | __asm__ __volatile__( |
@@ -85,7 +82,7 @@ static int speedstep_smi_ownership(void) | |||
85 | : "memory" | 82 | : "memory" |
86 | ); | 83 | ); |
87 | 84 | ||
88 | dprintk("result is %x\n", result); | 85 | pr_debug("result is %x\n", result); |
89 | 86 | ||
90 | return result; | 87 | return result; |
91 | } | 88 | } |
@@ -106,13 +103,13 @@ static int speedstep_smi_get_freqs(unsigned int *low, unsigned int *high) | |||
106 | u32 function = GET_SPEEDSTEP_FREQS; | 103 | u32 function = GET_SPEEDSTEP_FREQS; |
107 | 104 | ||
108 | if (!(ist_info.event & 0xFFFF)) { | 105 | if (!(ist_info.event & 0xFFFF)) { |
109 | dprintk("bug #1422 -- can't read freqs from BIOS\n"); | 106 | pr_debug("bug #1422 -- can't read freqs from BIOS\n"); |
110 | return -ENODEV; | 107 | return -ENODEV; |
111 | } | 108 | } |
112 | 109 | ||
113 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); | 110 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); |
114 | 111 | ||
115 | dprintk("trying to determine frequencies with command %x at port %x\n", | 112 | pr_debug("trying to determine frequencies with command %x at port %x\n", |
116 | command, smi_port); | 113 | command, smi_port); |
117 | 114 | ||
118 | __asm__ __volatile__( | 115 | __asm__ __volatile__( |
@@ -129,7 +126,7 @@ static int speedstep_smi_get_freqs(unsigned int *low, unsigned int *high) | |||
129 | "d" (smi_port), "S" (0), "D" (0) | 126 | "d" (smi_port), "S" (0), "D" (0) |
130 | ); | 127 | ); |
131 | 128 | ||
132 | dprintk("result %x, low_freq %u, high_freq %u\n", | 129 | pr_debug("result %x, low_freq %u, high_freq %u\n", |
133 | result, low_mhz, high_mhz); | 130 | result, low_mhz, high_mhz); |
134 | 131 | ||
135 | /* abort if results are obviously incorrect... */ | 132 | /* abort if results are obviously incorrect... */ |
@@ -154,7 +151,7 @@ static int speedstep_get_state(void) | |||
154 | 151 | ||
155 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); | 152 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); |
156 | 153 | ||
157 | dprintk("trying to determine current setting with command %x " | 154 | pr_debug("trying to determine current setting with command %x " |
158 | "at port %x\n", command, smi_port); | 155 | "at port %x\n", command, smi_port); |
159 | 156 | ||
160 | __asm__ __volatile__( | 157 | __asm__ __volatile__( |
@@ -168,7 +165,7 @@ static int speedstep_get_state(void) | |||
168 | "d" (smi_port), "S" (0), "D" (0) | 165 | "d" (smi_port), "S" (0), "D" (0) |
169 | ); | 166 | ); |
170 | 167 | ||
171 | dprintk("state is %x, result is %x\n", state, result); | 168 | pr_debug("state is %x, result is %x\n", state, result); |
172 | 169 | ||
173 | return state & 1; | 170 | return state & 1; |
174 | } | 171 | } |
@@ -194,13 +191,13 @@ static void speedstep_set_state(unsigned int state) | |||
194 | 191 | ||
195 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); | 192 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); |
196 | 193 | ||
197 | dprintk("trying to set frequency to state %u " | 194 | pr_debug("trying to set frequency to state %u " |
198 | "with command %x at port %x\n", | 195 | "with command %x at port %x\n", |
199 | state, command, smi_port); | 196 | state, command, smi_port); |
200 | 197 | ||
201 | do { | 198 | do { |
202 | if (retry) { | 199 | if (retry) { |
203 | dprintk("retry %u, previous result %u, waiting...\n", | 200 | pr_debug("retry %u, previous result %u, waiting...\n", |
204 | retry, result); | 201 | retry, result); |
205 | mdelay(retry * 50); | 202 | mdelay(retry * 50); |
206 | } | 203 | } |
@@ -221,7 +218,7 @@ static void speedstep_set_state(unsigned int state) | |||
221 | local_irq_restore(flags); | 218 | local_irq_restore(flags); |
222 | 219 | ||
223 | if (new_state == state) | 220 | if (new_state == state) |
224 | dprintk("change to %u MHz succeeded after %u tries " | 221 | pr_debug("change to %u MHz succeeded after %u tries " |
225 | "with result %u\n", | 222 | "with result %u\n", |
226 | (speedstep_freqs[new_state].frequency / 1000), | 223 | (speedstep_freqs[new_state].frequency / 1000), |
227 | retry, result); | 224 | retry, result); |
@@ -292,7 +289,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
292 | 289 | ||
293 | result = speedstep_smi_ownership(); | 290 | result = speedstep_smi_ownership(); |
294 | if (result) { | 291 | if (result) { |
295 | dprintk("fails in acquiring ownership of a SMI interface.\n"); | 292 | pr_debug("fails in acquiring ownership of a SMI interface.\n"); |
296 | return -EINVAL; | 293 | return -EINVAL; |
297 | } | 294 | } |
298 | 295 | ||
@@ -304,7 +301,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
304 | if (result) { | 301 | if (result) { |
305 | /* fall back to speedstep_lib.c dection mechanism: | 302 | /* fall back to speedstep_lib.c dection mechanism: |
306 | * try both states out */ | 303 | * try both states out */ |
307 | dprintk("could not detect low and high frequencies " | 304 | pr_debug("could not detect low and high frequencies " |
308 | "by SMI call.\n"); | 305 | "by SMI call.\n"); |
309 | result = speedstep_get_freqs(speedstep_processor, | 306 | result = speedstep_get_freqs(speedstep_processor, |
310 | low, high, | 307 | low, high, |
@@ -312,18 +309,18 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
312 | &speedstep_set_state); | 309 | &speedstep_set_state); |
313 | 310 | ||
314 | if (result) { | 311 | if (result) { |
315 | dprintk("could not detect two different speeds" | 312 | pr_debug("could not detect two different speeds" |
316 | " -- aborting.\n"); | 313 | " -- aborting.\n"); |
317 | return result; | 314 | return result; |
318 | } else | 315 | } else |
319 | dprintk("workaround worked.\n"); | 316 | pr_debug("workaround worked.\n"); |
320 | } | 317 | } |
321 | 318 | ||
322 | /* get current speed setting */ | 319 | /* get current speed setting */ |
323 | state = speedstep_get_state(); | 320 | state = speedstep_get_state(); |
324 | speed = speedstep_freqs[state].frequency; | 321 | speed = speedstep_freqs[state].frequency; |
325 | 322 | ||
326 | dprintk("currently at %s speed setting - %i MHz\n", | 323 | pr_debug("currently at %s speed setting - %i MHz\n", |
327 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) | 324 | (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) |
328 | ? "low" : "high", | 325 | ? "low" : "high", |
329 | (speed / 1000)); | 326 | (speed / 1000)); |
@@ -360,7 +357,7 @@ static int speedstep_resume(struct cpufreq_policy *policy) | |||
360 | int result = speedstep_smi_ownership(); | 357 | int result = speedstep_smi_ownership(); |
361 | 358 | ||
362 | if (result) | 359 | if (result) |
363 | dprintk("fails in re-acquiring ownership of a SMI interface.\n"); | 360 | pr_debug("fails in re-acquiring ownership of a SMI interface.\n"); |
364 | 361 | ||
365 | return result; | 362 | return result; |
366 | } | 363 | } |
@@ -403,12 +400,12 @@ static int __init speedstep_init(void) | |||
403 | } | 400 | } |
404 | 401 | ||
405 | if (!speedstep_processor) { | 402 | if (!speedstep_processor) { |
406 | dprintk("No supported Intel CPU detected.\n"); | 403 | pr_debug("No supported Intel CPU detected.\n"); |
407 | return -ENODEV; | 404 | return -ENODEV; |
408 | } | 405 | } |
409 | 406 | ||
410 | dprintk("signature:0x%.8lx, command:0x%.8lx, " | 407 | pr_debug("signature:0x%.8ulx, command:0x%.8ulx, " |
411 | "event:0x%.8lx, perf_level:0x%.8lx.\n", | 408 | "event:0x%.8ulx, perf_level:0x%.8ulx.\n", |
412 | ist_info.signature, ist_info.command, | 409 | ist_info.signature, ist_info.command, |
413 | ist_info.event, ist_info.perf_level); | 410 | ist_info.event, ist_info.perf_level); |
414 | 411 | ||