diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2011-03-27 09:04:46 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-05-04 11:50:57 -0400 |
commit | 2d06d8c49afdcc9bb35a85039fa50f0fe35bd40e (patch) | |
tree | d933a68fc71f6e2c3b95b744a87fa1d817bea3d6 /arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |
parent | 27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 (diff) |
[CPUFREQ] use dynamic debug instead of custom infrastructure
With dynamic debug having gained the capability to report debug messages
also during the boot process, it offers a far superior interface for
debug messages than the custom cpufreq infrastructure. As a first step,
remove the old cpufreq_debug_printk() function and replace it with a call
to the generic pr_debug() function.
How can dynamic debug be used on cpufreq? You need a kernel which has
CONFIG_DYNAMIC_DEBUG enabled.
To enabled debugging during runtime, mount debugfs and
$ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control
for debugging the complete "cpufreq" module. To achieve the same goal during
boot, append
ddebug_query="module cpufreq +p"
as a boot parameter to the kernel of your choice.
For more detailled instructions, please see
Documentation/dynamic-debug-howto.txt
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/powernow-k8.c')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 100 |
1 files changed, 50 insertions, 50 deletions
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); |