Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+331 -509
+1 -3
arch/arm/mach-davinci/cpufreq.c
··· 94 94 if (freqs.old == freqs.new) 95 95 return ret; 96 96 97 - cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, 98 - dev_driver_string(cpufreq.dev), 99 - "transition: %u --> %u\n", freqs.old, freqs.new); 97 + dev_dbg(&cpufreq.dev, "transition: %u --> %u\n", freqs.old, freqs.new); 100 98 101 99 ret = cpufreq_frequency_table_target(policy, pdata->freq_table, 102 100 freqs.new, relation, &idx);
-3
arch/blackfin/mach-common/dpmc.c
··· 19 19 20 20 #define DRIVER_NAME "bfin dpmc" 21 21 22 - #define dprintk(msg...) \ 23 - cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, DRIVER_NAME, msg) 24 - 25 22 struct bfin_dpmc_platform_data *pdata; 26 23 27 24 /**
+21 -23
arch/ia64/kernel/cpufreq/acpi-cpufreq.c
··· 23 23 #include <linux/acpi.h> 24 24 #include <acpi/processor.h> 25 25 26 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "acpi-cpufreq", msg) 27 - 28 26 MODULE_AUTHOR("Venkatesh Pallipadi"); 29 27 MODULE_DESCRIPTION("ACPI Processor P-States Driver"); 30 28 MODULE_LICENSE("GPL"); ··· 45 47 { 46 48 s64 retval; 47 49 48 - dprintk("processor_set_pstate\n"); 50 + pr_debug("processor_set_pstate\n"); 49 51 50 52 retval = ia64_pal_set_pstate((u64)value); 51 53 52 54 if (retval) { 53 - dprintk("Failed to set freq to 0x%x, with error 0x%lx\n", 55 + pr_debug("Failed to set freq to 0x%x, with error 0x%lx\n", 54 56 value, retval); 55 57 return -ENODEV; 56 58 } ··· 65 67 u64 pstate_index = 0; 66 68 s64 retval; 67 69 68 - dprintk("processor_get_pstate\n"); 70 + pr_debug("processor_get_pstate\n"); 69 71 70 72 retval = ia64_pal_get_pstate(&pstate_index, 71 73 PAL_GET_PSTATE_TYPE_INSTANT); 72 74 *value = (u32) pstate_index; 73 75 74 76 if (retval) 75 - dprintk("Failed to get current freq with " 77 + pr_debug("Failed to get current freq with " 76 78 "error 0x%lx, idx 0x%x\n", retval, *value); 77 79 78 80 return (int)retval; ··· 88 90 { 89 91 unsigned long i; 90 92 91 - dprintk("extract_clock\n"); 93 + pr_debug("extract_clock\n"); 92 94 93 95 for (i = 0; i < data->acpi_data.state_count; i++) { 94 96 if (value == data->acpi_data.states[i].status) ··· 108 110 cpumask_t saved_mask; 109 111 unsigned long clock_freq; 110 112 111 - dprintk("processor_get_freq\n"); 113 + pr_debug("processor_get_freq\n"); 112 114 113 115 saved_mask = current->cpus_allowed; 114 116 set_cpus_allowed_ptr(current, cpumask_of(cpu)); ··· 146 148 cpumask_t saved_mask; 147 149 int retval; 148 150 149 - dprintk("processor_set_freq\n"); 151 + pr_debug("processor_set_freq\n"); 150 152 151 153 saved_mask = current->cpus_allowed; 152 154 set_cpus_allowed_ptr(current, cpumask_of(cpu)); ··· 157 159 158 160 if (state == data->acpi_data.state) { 159 161 if (unlikely(data->resume)) { 160 - dprintk("Called after resume, resetting to P%d\n", state); 162 + pr_debug("Called after resume, resetting to P%d\n", state); 161 163 data->resume = 0; 162 164 } else { 163 - dprintk("Already at target state (P%d)\n", state); 165 + pr_debug("Already at target state (P%d)\n", state); 164 166 retval = 0; 165 167 goto migrate_end; 166 168 } 167 169 } 168 170 169 - dprintk("Transitioning from P%d to P%d\n", 171 + pr_debug("Transitioning from P%d to P%d\n", 170 172 data->acpi_data.state, state); 171 173 172 174 /* cpufreq frequency struct */ ··· 184 186 185 187 value = (u32) data->acpi_data.states[state].control; 186 188 187 - dprintk("Transitioning to state: 0x%08x\n", value); 189 + pr_debug("Transitioning to state: 0x%08x\n", value); 188 190 189 191 ret = processor_set_pstate(value); 190 192 if (ret) { ··· 217 219 { 218 220 struct cpufreq_acpi_io *data = acpi_io_data[cpu]; 219 221 220 - dprintk("acpi_cpufreq_get\n"); 222 + pr_debug("acpi_cpufreq_get\n"); 221 223 222 224 return processor_get_freq(data, cpu); 223 225 } ··· 233 235 unsigned int next_state = 0; 234 236 unsigned int result = 0; 235 237 236 - dprintk("acpi_cpufreq_setpolicy\n"); 238 + pr_debug("acpi_cpufreq_setpolicy\n"); 237 239 238 240 result = cpufreq_frequency_table_target(policy, 239 241 data->freq_table, target_freq, relation, &next_state); ··· 253 255 unsigned int result = 0; 254 256 struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; 255 257 256 - dprintk("acpi_cpufreq_verify\n"); 258 + pr_debug("acpi_cpufreq_verify\n"); 257 259 258 260 result = cpufreq_frequency_table_verify(policy, 259 261 data->freq_table); ··· 271 273 struct cpufreq_acpi_io *data; 272 274 unsigned int result = 0; 273 275 274 - dprintk("acpi_cpufreq_cpu_init\n"); 276 + pr_debug("acpi_cpufreq_cpu_init\n"); 275 277 276 278 data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); 277 279 if (!data) ··· 286 288 287 289 /* capability check */ 288 290 if (data->acpi_data.state_count <= 1) { 289 - dprintk("No P-States\n"); 291 + pr_debug("No P-States\n"); 290 292 result = -ENODEV; 291 293 goto err_unreg; 292 294 } ··· 295 297 ACPI_ADR_SPACE_FIXED_HARDWARE) || 296 298 (data->acpi_data.status_register.space_id != 297 299 ACPI_ADR_SPACE_FIXED_HARDWARE)) { 298 - dprintk("Unsupported address space [%d, %d]\n", 300 + pr_debug("Unsupported address space [%d, %d]\n", 299 301 (u32) (data->acpi_data.control_register.space_id), 300 302 (u32) (data->acpi_data.status_register.space_id)); 301 303 result = -ENODEV; ··· 346 348 "activated.\n", cpu); 347 349 348 350 for (i = 0; i < data->acpi_data.state_count; i++) 349 - dprintk(" %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n", 351 + pr_debug(" %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n", 350 352 (i == data->acpi_data.state?'*':' '), i, 351 353 (u32) data->acpi_data.states[i].core_frequency, 352 354 (u32) data->acpi_data.states[i].power, ··· 381 383 { 382 384 struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; 383 385 384 - dprintk("acpi_cpufreq_cpu_exit\n"); 386 + pr_debug("acpi_cpufreq_cpu_exit\n"); 385 387 386 388 if (data) { 387 389 cpufreq_frequency_table_put_attr(policy->cpu); ··· 416 418 static int __init 417 419 acpi_cpufreq_init (void) 418 420 { 419 - dprintk("acpi_cpufreq_init\n"); 421 + pr_debug("acpi_cpufreq_init\n"); 420 422 421 423 return cpufreq_register_driver(&acpi_cpufreq_driver); 422 424 } ··· 425 427 static void __exit 426 428 acpi_cpufreq_exit (void) 427 429 { 428 - dprintk("acpi_cpufreq_exit\n"); 430 + pr_debug("acpi_cpufreq_exit\n"); 429 431 430 432 cpufreq_unregister_driver(&acpi_cpufreq_driver); 431 433 return;
+21 -24
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
··· 47 47 #include <asm/cpufeature.h> 48 48 #include "mperf.h" 49 49 50 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 51 - "acpi-cpufreq", msg) 52 - 53 50 MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); 54 51 MODULE_DESCRIPTION("ACPI Processor P-States Driver"); 55 52 MODULE_LICENSE("GPL"); ··· 230 233 cmd.mask = mask; 231 234 drv_read(&cmd); 232 235 233 - dprintk("get_cur_val = %u\n", cmd.val); 236 + pr_debug("get_cur_val = %u\n", cmd.val); 234 237 235 238 return cmd.val; 236 239 } ··· 241 244 unsigned int freq; 242 245 unsigned int cached_freq; 243 246 244 - dprintk("get_cur_freq_on_cpu (%d)\n", cpu); 247 + pr_debug("get_cur_freq_on_cpu (%d)\n", cpu); 245 248 246 249 if (unlikely(data == NULL || 247 250 data->acpi_data == NULL || data->freq_table == NULL)) { ··· 258 261 data->resume = 1; 259 262 } 260 263 261 - dprintk("cur freq = %u\n", freq); 264 + pr_debug("cur freq = %u\n", freq); 262 265 263 266 return freq; 264 267 } ··· 290 293 unsigned int i; 291 294 int result = 0; 292 295 293 - dprintk("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu); 296 + pr_debug("acpi_cpufreq_target %d (%d)\n", target_freq, policy->cpu); 294 297 295 298 if (unlikely(data == NULL || 296 299 data->acpi_data == NULL || data->freq_table == NULL)) { ··· 310 313 next_perf_state = data->freq_table[next_state].index; 311 314 if (perf->state == next_perf_state) { 312 315 if (unlikely(data->resume)) { 313 - dprintk("Called after resume, resetting to P%d\n", 316 + pr_debug("Called after resume, resetting to P%d\n", 314 317 next_perf_state); 315 318 data->resume = 0; 316 319 } else { 317 - dprintk("Already at target state (P%d)\n", 320 + pr_debug("Already at target state (P%d)\n", 318 321 next_perf_state); 319 322 goto out; 320 323 } ··· 354 357 355 358 if (acpi_pstate_strict) { 356 359 if (!check_freqs(cmd.mask, freqs.new, data)) { 357 - dprintk("acpi_cpufreq_target failed (%d)\n", 360 + pr_debug("acpi_cpufreq_target failed (%d)\n", 358 361 policy->cpu); 359 362 result = -EAGAIN; 360 363 goto out; ··· 375 378 { 376 379 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); 377 380 378 - dprintk("acpi_cpufreq_verify\n"); 381 + pr_debug("acpi_cpufreq_verify\n"); 379 382 380 383 return cpufreq_frequency_table_verify(policy, data->freq_table); 381 384 } ··· 430 433 static int __init acpi_cpufreq_early_init(void) 431 434 { 432 435 unsigned int i; 433 - dprintk("acpi_cpufreq_early_init\n"); 436 + pr_debug("acpi_cpufreq_early_init\n"); 434 437 435 438 acpi_perf_data = alloc_percpu(struct acpi_processor_performance); 436 439 if (!acpi_perf_data) { 437 - dprintk("Memory allocation error for acpi_perf_data.\n"); 440 + pr_debug("Memory allocation error for acpi_perf_data.\n"); 438 441 return -ENOMEM; 439 442 } 440 443 for_each_possible_cpu(i) { ··· 516 519 static int blacklisted; 517 520 #endif 518 521 519 - dprintk("acpi_cpufreq_cpu_init\n"); 522 + pr_debug("acpi_cpufreq_cpu_init\n"); 520 523 521 524 #ifdef CONFIG_SMP 522 525 if (blacklisted) ··· 563 566 564 567 /* capability check */ 565 568 if (perf->state_count <= 1) { 566 - dprintk("No P-States\n"); 569 + pr_debug("No P-States\n"); 567 570 result = -ENODEV; 568 571 goto err_unreg; 569 572 } ··· 575 578 576 579 switch (perf->control_register.space_id) { 577 580 case ACPI_ADR_SPACE_SYSTEM_IO: 578 - dprintk("SYSTEM IO addr space\n"); 581 + pr_debug("SYSTEM IO addr space\n"); 579 582 data->cpu_feature = SYSTEM_IO_CAPABLE; 580 583 break; 581 584 case ACPI_ADR_SPACE_FIXED_HARDWARE: 582 - dprintk("HARDWARE addr space\n"); 585 + pr_debug("HARDWARE addr space\n"); 583 586 if (!check_est_cpu(cpu)) { 584 587 result = -ENODEV; 585 588 goto err_unreg; ··· 587 590 data->cpu_feature = SYSTEM_INTEL_MSR_CAPABLE; 588 591 break; 589 592 default: 590 - dprintk("Unknown addr space %d\n", 593 + pr_debug("Unknown addr space %d\n", 591 594 (u32) (perf->control_register.space_id)); 592 595 result = -ENODEV; 593 596 goto err_unreg; ··· 658 661 if (cpu_has(c, X86_FEATURE_APERFMPERF)) 659 662 acpi_cpufreq_driver.getavg = cpufreq_get_measured_perf; 660 663 661 - dprintk("CPU%u - ACPI performance management activated.\n", cpu); 664 + pr_debug("CPU%u - ACPI performance management activated.\n", cpu); 662 665 for (i = 0; i < perf->state_count; i++) 663 - dprintk(" %cP%d: %d MHz, %d mW, %d uS\n", 666 + pr_debug(" %cP%d: %d MHz, %d mW, %d uS\n", 664 667 (i == perf->state ? '*' : ' '), i, 665 668 (u32) perf->states[i].core_frequency, 666 669 (u32) perf->states[i].power, ··· 691 694 { 692 695 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); 693 696 694 - dprintk("acpi_cpufreq_cpu_exit\n"); 697 + pr_debug("acpi_cpufreq_cpu_exit\n"); 695 698 696 699 if (data) { 697 700 cpufreq_frequency_table_put_attr(policy->cpu); ··· 709 712 { 710 713 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); 711 714 712 - dprintk("acpi_cpufreq_resume\n"); 715 + pr_debug("acpi_cpufreq_resume\n"); 713 716 714 717 data->resume = 1; 715 718 ··· 740 743 if (acpi_disabled) 741 744 return 0; 742 745 743 - dprintk("acpi_cpufreq_init\n"); 746 + pr_debug("acpi_cpufreq_init\n"); 744 747 745 748 ret = acpi_cpufreq_early_init(); 746 749 if (ret) ··· 755 758 756 759 static void __exit acpi_cpufreq_exit(void) 757 760 { 758 - dprintk("acpi_cpufreq_exit\n"); 761 + pr_debug("acpi_cpufreq_exit\n"); 759 762 760 763 cpufreq_unregister_driver(&acpi_cpufreq_driver); 761 764
+2 -4
arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c
··· 57 57 "Minimum FSB to use, if not defined: current FSB - 50"); 58 58 59 59 #define PFX "cpufreq-nforce2: " 60 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 61 - "cpufreq-nforce2", msg) 62 60 63 61 /** 64 62 * nforce2_calc_fsb - calculate FSB ··· 268 270 if (freqs.old == freqs.new) 269 271 return 0; 270 272 271 - dprintk("Old CPU frequency %d kHz, new %d kHz\n", 273 + pr_debug("Old CPU frequency %d kHz, new %d kHz\n", 272 274 freqs.old, freqs.new); 273 275 274 276 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ··· 280 282 printk(KERN_ERR PFX "Changing FSB to %d failed\n", 281 283 target_fsb); 282 284 else 283 - dprintk("Changed FSB successfully to %d\n", 285 + pr_debug("Changed FSB successfully to %d\n", 284 286 target_fsb); 285 287 286 288 /* Enable IRQs */
+9 -12
arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
··· 142 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 146 * we can detect a core multipiler from dir0_lsb 150 147 * from GX1 datasheet p.56, ··· 188 191 /* check if CPU is a MediaGX or a Geode. */ 189 192 if ((boot_cpu_data.x86_vendor != X86_VENDOR_NSC) && 190 193 (boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) { 191 - dprintk("error: no MediaGX/Geode processor found!\n"); 194 + pr_debug("error: no MediaGX/Geode processor found!\n"); 192 195 return NULL; 193 196 } 194 197 ··· 198 201 return gx_pci; 199 202 } 200 203 201 - dprintk("error: no supported chipset found!\n"); 204 + pr_debug("error: no supported chipset found!\n"); 202 205 return NULL; 203 206 } 204 207 ··· 302 305 break; 303 306 default: 304 307 local_irq_restore(flags); 305 - dprintk("fatal: try to set unknown chipset.\n"); 308 + pr_debug("fatal: try to set unknown chipset.\n"); 306 309 return; 307 310 } 308 311 } else { 309 312 suscfg = gx_params->pci_suscfg & ~(SUSMOD); 310 313 gx_params->off_duration = 0; 311 314 gx_params->on_duration = 0; 312 - dprintk("suspend modulation disabled: cpu runs 100%% speed.\n"); 315 + pr_debug("suspend modulation disabled: cpu runs 100%% speed.\n"); 313 316 } 314 317 315 318 gx_write_byte(PCI_MODOFF, gx_params->off_duration); ··· 324 327 325 328 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 326 329 327 - dprintk("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", 330 + pr_debug("suspend modulation w/ duration of ON:%d us, OFF:%d us\n", 328 331 gx_params->on_duration * 32, gx_params->off_duration * 32); 329 - dprintk("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); 332 + pr_debug("suspend modulation w/ clock speed: %d kHz.\n", freqs.new); 330 333 } 331 334 332 335 /**************************************************************** ··· 425 428 stock_freq = maxfreq; 426 429 curfreq = gx_get_cpuspeed(0); 427 430 428 - dprintk("cpu max frequency is %d.\n", maxfreq); 429 - dprintk("cpu current frequency is %dkHz.\n", curfreq); 431 + pr_debug("cpu max frequency is %d.\n", maxfreq); 432 + pr_debug("cpu current frequency is %dkHz.\n", curfreq); 430 433 431 434 /* setup basic struct for cpufreq API */ 432 435 policy->cpu = 0; ··· 472 475 if (max_duration > 0xff) 473 476 max_duration = 0xff; 474 477 475 - dprintk("geode suspend modulation available.\n"); 478 + pr_debug("geode suspend modulation available.\n"); 476 479 477 480 params = kzalloc(sizeof(struct gxfreq_params), GFP_KERNEL); 478 481 if (params == NULL)
+3 -8
arch/x86/kernel/cpu/cpufreq/longhaul.c
··· 77 77 static int disable_acpi_c3; 78 78 static int revid_errata; 79 79 80 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 81 - "longhaul", msg) 82 - 83 80 84 81 /* Clock ratios multiplied by 10 */ 85 82 static int mults[32]; ··· 84 87 static int longhaul_version; 85 88 static struct cpufreq_frequency_table *longhaul_table; 86 89 87 - #ifdef CONFIG_CPU_FREQ_DEBUG 88 90 static char speedbuffer[8]; 89 91 90 92 static char *print_speed(int speed) ··· 102 106 103 107 return speedbuffer; 104 108 } 105 - #endif 106 109 107 110 108 111 static unsigned int calc_speed(int mult) ··· 270 275 271 276 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 272 277 273 - dprintk("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", 278 + pr_debug("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", 274 279 fsb, mult/10, mult%10, print_speed(speed/1000)); 275 280 retry_loop: 276 281 preempt_disable(); ··· 455 460 break; 456 461 } 457 462 458 - dprintk("MinMult:%d.%dx MaxMult:%d.%dx\n", 463 + pr_debug("MinMult:%d.%dx MaxMult:%d.%dx\n", 459 464 minmult/10, minmult%10, maxmult/10, maxmult%10); 460 465 461 466 highest_speed = calc_speed(maxmult); 462 467 lowest_speed = calc_speed(minmult); 463 - dprintk("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, 468 + pr_debug("FSB:%dMHz Lowest speed: %s Highest speed:%s\n", fsb, 464 469 print_speed(lowest_speed/1000), 465 470 print_speed(highest_speed/1000)); 466 471
+7 -10
arch/x86/kernel/cpu/cpufreq/longrun.c
··· 15 15 #include <asm/msr.h> 16 16 #include <asm/processor.h> 17 17 18 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 19 - "longrun", msg) 20 - 21 18 static struct cpufreq_driver longrun_driver; 22 19 23 20 /** ··· 37 40 u32 msr_lo, msr_hi; 38 41 39 42 rdmsr(MSR_TMTA_LONGRUN_FLAGS, msr_lo, msr_hi); 40 - dprintk("longrun flags are %x - %x\n", msr_lo, msr_hi); 43 + pr_debug("longrun flags are %x - %x\n", msr_lo, msr_hi); 41 44 if (msr_lo & 0x01) 42 45 policy->policy = CPUFREQ_POLICY_PERFORMANCE; 43 46 else 44 47 policy->policy = CPUFREQ_POLICY_POWERSAVE; 45 48 46 49 rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); 47 - dprintk("longrun ctrl is %x - %x\n", msr_lo, msr_hi); 50 + pr_debug("longrun ctrl is %x - %x\n", msr_lo, msr_hi); 48 51 msr_lo &= 0x0000007F; 49 52 msr_hi &= 0x0000007F; 50 53 ··· 147 150 return 0; 148 151 149 152 cpuid(0x80860007, &eax, &ebx, &ecx, &edx); 150 - dprintk("cpuid eax is %u\n", eax); 153 + pr_debug("cpuid eax is %u\n", eax); 151 154 152 155 return eax * 1000; 153 156 } ··· 193 196 rdmsr(MSR_TMTA_LRTI_VOLT_MHZ, msr_lo, msr_hi); 194 197 *high_freq = msr_lo * 1000; /* to kHz */ 195 198 196 - dprintk("longrun table interface told %u - %u kHz\n", 199 + pr_debug("longrun table interface told %u - %u kHz\n", 197 200 *low_freq, *high_freq); 198 201 199 202 if (*low_freq > *high_freq) ··· 204 207 /* set the upper border to the value determined during TSC init */ 205 208 *high_freq = (cpu_khz / 1000); 206 209 *high_freq = *high_freq * 1000; 207 - dprintk("high frequency is %u kHz\n", *high_freq); 210 + pr_debug("high frequency is %u kHz\n", *high_freq); 208 211 209 212 /* get current borders */ 210 213 rdmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); ··· 230 233 /* restore values */ 231 234 wrmsr(MSR_TMTA_LONGRUN_CTRL, save_lo, save_hi); 232 235 } 233 - dprintk("percentage is %u %%, freq is %u MHz\n", ecx, eax); 236 + pr_debug("percentage is %u %%, freq is %u MHz\n", ecx, eax); 234 237 235 238 /* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) 236 239 * eqals ··· 246 249 edx = ((eax - ebx) * 100) / (100 - ecx); 247 250 *low_freq = edx * 1000; /* back to kHz */ 248 251 249 - dprintk("low frequency is %u kHz\n", *low_freq); 252 + pr_debug("low frequency is %u kHz\n", *low_freq); 250 253 251 254 if (*low_freq > *high_freq) 252 255 *low_freq = *high_freq;
+4 -6
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
··· 35 35 #include "speedstep-lib.h" 36 36 37 37 #define PFX "p4-clockmod: " 38 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 39 - "p4-clockmod", msg) 40 38 41 39 /* 42 40 * Duty Cycle (3bits), note DC_DISABLE is not specified in ··· 64 66 rdmsr_on_cpu(cpu, MSR_IA32_THERM_STATUS, &l, &h); 65 67 66 68 if (l & 0x01) 67 - dprintk("CPU#%d currently thermal throttled\n", cpu); 69 + pr_debug("CPU#%d currently thermal throttled\n", cpu); 68 70 69 71 if (has_N44_O17_errata[cpu] && 70 72 (newstate == DC_25PT || newstate == DC_DFLT)) ··· 72 74 73 75 rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, &l, &h); 74 76 if (newstate == DC_DISABLE) { 75 - dprintk("CPU#%d disabling modulation\n", cpu); 77 + pr_debug("CPU#%d disabling modulation\n", cpu); 76 78 wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, l & ~(1<<4), h); 77 79 } else { 78 - dprintk("CPU#%d setting duty cycle to %d%%\n", 80 + pr_debug("CPU#%d setting duty cycle to %d%%\n", 79 81 cpu, ((125 * newstate) / 10)); 80 82 /* bits 63 - 5 : reserved 81 83 * bit 4 : enable/disable ··· 215 217 case 0x0f11: 216 218 case 0x0f12: 217 219 has_N44_O17_errata[policy->cpu] = 1; 218 - dprintk("has errata -- disabling low frequencies\n"); 220 + pr_debug("has errata -- disabling low frequencies\n"); 219 221 } 220 222 221 223 if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D &&
+24 -27
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
··· 39 39 40 40 #include <acpi/processor.h> 41 41 42 - #define PCC_VERSION "1.00.00" 42 + #define PCC_VERSION "1.10.00" 43 43 #define POLL_LOOPS 300 44 44 45 45 #define CMD_COMPLETE 0x1 ··· 47 47 #define CMD_SET_FREQ 0x1 48 48 49 49 #define BUF_SZ 4 50 - 51 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 52 - "pcc-cpufreq", msg) 53 50 54 51 struct pcc_register_resource { 55 52 u8 descriptor; ··· 99 102 static u64 doorbell_preserve; 100 103 static u64 doorbell_write; 101 104 102 - static u8 OSC_UUID[16] = {0x63, 0x9B, 0x2C, 0x9F, 0x70, 0x91, 0x49, 0x1f, 105 + static u8 OSC_UUID[16] = {0x9F, 0x2C, 0x9B, 0x63, 0x91, 0x70, 0x1f, 0x49, 103 106 0xBB, 0x4F, 0xA5, 0x98, 0x2F, 0xA1, 0xB5, 0x46}; 104 107 105 108 struct pcc_cpu { ··· 149 152 150 153 spin_lock(&pcc_lock); 151 154 152 - dprintk("get: get_freq for CPU %d\n", cpu); 155 + pr_debug("get: get_freq for CPU %d\n", cpu); 153 156 pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); 154 157 155 158 input_buffer = 0x1; ··· 167 170 168 171 status = ioread16(&pcch_hdr->status); 169 172 if (status != CMD_COMPLETE) { 170 - dprintk("get: FAILED: for CPU %d, status is %d\n", 173 + pr_debug("get: FAILED: for CPU %d, status is %d\n", 171 174 cpu, status); 172 175 goto cmd_incomplete; 173 176 } ··· 175 178 curr_freq = (((ioread32(&pcch_hdr->nominal) * (output_buffer & 0xff)) 176 179 / 100) * 1000); 177 180 178 - dprintk("get: SUCCESS: (virtual) output_offset for cpu %d is " 179 - "0x%x, contains a value of: 0x%x. Speed is: %d MHz\n", 181 + pr_debug("get: SUCCESS: (virtual) output_offset for cpu %d is " 182 + "0x%p, contains a value of: 0x%x. Speed is: %d MHz\n", 180 183 cpu, (pcch_virt_addr + pcc_cpu_data->output_offset), 181 184 output_buffer, curr_freq); 182 185 183 186 freq_limit = (output_buffer >> 8) & 0xff; 184 187 if (freq_limit != 0xff) { 185 - dprintk("get: frequency for cpu %d is being temporarily" 188 + pr_debug("get: frequency for cpu %d is being temporarily" 186 189 " capped at %d\n", cpu, curr_freq); 187 190 } 188 191 ··· 209 212 cpu = policy->cpu; 210 213 pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu); 211 214 212 - dprintk("target: CPU %d should go to target freq: %d " 213 - "(virtual) input_offset is 0x%x\n", 215 + pr_debug("target: CPU %d should go to target freq: %d " 216 + "(virtual) input_offset is 0x%p\n", 214 217 cpu, target_freq, 215 218 (pcch_virt_addr + pcc_cpu_data->input_offset)); 216 219 ··· 231 234 232 235 status = ioread16(&pcch_hdr->status); 233 236 if (status != CMD_COMPLETE) { 234 - dprintk("target: FAILED for cpu %d, with status: 0x%x\n", 237 + pr_debug("target: FAILED for cpu %d, with status: 0x%x\n", 235 238 cpu, status); 236 239 goto cmd_incomplete; 237 240 } 238 241 iowrite16(0, &pcch_hdr->status); 239 242 240 243 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 241 - dprintk("target: was SUCCESSFUL for cpu %d\n", cpu); 244 + pr_debug("target: was SUCCESSFUL for cpu %d\n", cpu); 242 245 spin_unlock(&pcc_lock); 243 246 244 247 return 0; ··· 290 293 memset_io((pcch_virt_addr + pcc_cpu_data->input_offset), 0, BUF_SZ); 291 294 memset_io((pcch_virt_addr + pcc_cpu_data->output_offset), 0, BUF_SZ); 292 295 293 - dprintk("pcc_get_offset: for CPU %d: pcc_cpu_data " 296 + pr_debug("pcc_get_offset: for CPU %d: pcc_cpu_data " 294 297 "input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n", 295 298 cpu, pcc_cpu_data->input_offset, pcc_cpu_data->output_offset); 296 299 out_free: ··· 407 410 if (ACPI_SUCCESS(status)) { 408 411 ret = pcc_cpufreq_do_osc(&osc_handle); 409 412 if (ret) 410 - dprintk("probe: _OSC evaluation did not succeed\n"); 413 + pr_debug("probe: _OSC evaluation did not succeed\n"); 411 414 /* Firmware's use of _OSC is optional */ 412 415 ret = 0; 413 416 } ··· 430 433 431 434 mem_resource = (struct pcc_memory_resource *)member->buffer.pointer; 432 435 433 - dprintk("probe: mem_resource descriptor: 0x%x," 436 + pr_debug("probe: mem_resource descriptor: 0x%x," 434 437 " length: %d, space_id: %d, resource_usage: %d," 435 438 " type_specific: %d, granularity: 0x%llx," 436 439 " minimum: 0x%llx, maximum: 0x%llx," ··· 450 453 pcch_virt_addr = ioremap_nocache(mem_resource->minimum, 451 454 mem_resource->address_length); 452 455 if (pcch_virt_addr == NULL) { 453 - dprintk("probe: could not map shared mem region\n"); 456 + pr_debug("probe: could not map shared mem region\n"); 454 457 goto out_free; 455 458 } 456 459 pcch_hdr = pcch_virt_addr; 457 460 458 - dprintk("probe: PCCH header (virtual) addr: 0x%p\n", pcch_hdr); 459 - dprintk("probe: PCCH header is at physical address: 0x%llx," 461 + pr_debug("probe: PCCH header (virtual) addr: 0x%p\n", pcch_hdr); 462 + pr_debug("probe: PCCH header is at physical address: 0x%llx," 460 463 " signature: 0x%x, length: %d bytes, major: %d, minor: %d," 461 464 " supported features: 0x%x, command field: 0x%x," 462 465 " status field: 0x%x, nominal latency: %d us\n", ··· 466 469 ioread16(&pcch_hdr->command), ioread16(&pcch_hdr->status), 467 470 ioread32(&pcch_hdr->latency)); 468 471 469 - dprintk("probe: min time between commands: %d us," 472 + pr_debug("probe: min time between commands: %d us," 470 473 " max time between commands: %d us," 471 474 " nominal CPU frequency: %d MHz," 472 475 " minimum CPU frequency: %d MHz," ··· 491 494 doorbell.access_width = 64; 492 495 doorbell.address = reg_resource->address; 493 496 494 - dprintk("probe: doorbell: space_id is %d, bit_width is %d, " 497 + pr_debug("probe: doorbell: space_id is %d, bit_width is %d, " 495 498 "bit_offset is %d, access_width is %d, address is 0x%llx\n", 496 499 doorbell.space_id, doorbell.bit_width, doorbell.bit_offset, 497 500 doorbell.access_width, reg_resource->address); ··· 512 515 513 516 doorbell_write = member->integer.value; 514 517 515 - dprintk("probe: doorbell_preserve: 0x%llx," 518 + pr_debug("probe: doorbell_preserve: 0x%llx," 516 519 " doorbell_write: 0x%llx\n", 517 520 doorbell_preserve, doorbell_write); 518 521 ··· 547 550 548 551 result = pcc_get_offset(cpu); 549 552 if (result) { 550 - dprintk("init: PCCP evaluation failed\n"); 553 + pr_debug("init: PCCP evaluation failed\n"); 551 554 goto out; 552 555 } 553 556 ··· 558 561 policy->cur = pcc_get_freq(cpu); 559 562 560 563 if (!policy->cur) { 561 - dprintk("init: Unable to get current CPU frequency\n"); 564 + pr_debug("init: Unable to get current CPU frequency\n"); 562 565 result = -EINVAL; 563 566 goto out; 564 567 } 565 568 566 - dprintk("init: policy->max is %d, policy->min is %d\n", 569 + pr_debug("init: policy->max is %d, policy->min is %d\n", 567 570 policy->max, policy->min); 568 571 out: 569 572 return result; ··· 594 597 595 598 ret = pcc_cpufreq_probe(); 596 599 if (ret) { 597 - dprintk("pcc_cpufreq_init: PCCH evaluation failed\n"); 600 + pr_debug("pcc_cpufreq_init: PCCH evaluation failed\n"); 598 601 return ret; 599 602 } 600 603
+14 -19
arch/x86/kernel/cpu/cpufreq/powernow-k7.c
··· 68 68 }; 69 69 #endif 70 70 71 - #ifdef CONFIG_CPU_FREQ_DEBUG 72 71 /* divide by 1000 to get VCore voltage in V. */ 73 72 static const int mobile_vid_table[32] = { 74 73 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, ··· 75 76 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, 76 77 1075, 1050, 1025, 1000, 975, 950, 925, 0, 77 78 }; 78 - #endif 79 79 80 80 /* divide by 10 to get FID. */ 81 81 static const int fid_codes[32] = { ··· 100 102 static unsigned int fsb; 101 103 static unsigned int latency; 102 104 static char have_a0; 103 - 104 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 105 - "powernow-k7", msg) 106 105 107 106 static int check_fsb(unsigned int fsbspeed) 108 107 { ··· 204 209 vid = *pst++; 205 210 powernow_table[j].index |= (vid << 8); /* upper 8 bits */ 206 211 207 - dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " 212 + pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " 208 213 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, 209 214 fid_codes[fid] % 10, speed/1000, vid, 210 215 mobile_vid_table[vid]/1000, ··· 362 367 unsigned int speed, speed_mhz; 363 368 364 369 pc.val = (unsigned long) state->control; 365 - dprintk("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", 370 + pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", 366 371 i, 367 372 (u32) state->core_frequency, 368 373 (u32) state->power, ··· 396 401 invalidate_entry(i); 397 402 } 398 403 399 - dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " 404 + pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " 400 405 "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, 401 406 fid_codes[fid] % 10, speed_mhz, vid, 402 407 mobile_vid_table[vid]/1000, ··· 404 409 405 410 if (state->core_frequency != speed_mhz) { 406 411 state->core_frequency = speed_mhz; 407 - dprintk(" Corrected ACPI frequency to %d\n", 412 + pr_debug(" Corrected ACPI frequency to %d\n", 408 413 speed_mhz); 409 414 } 410 415 ··· 448 453 449 454 static void print_pst_entry(struct pst_s *pst, unsigned int j) 450 455 { 451 - dprintk("PST:%d (@%p)\n", j, pst); 452 - dprintk(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", 456 + pr_debug("PST:%d (@%p)\n", j, pst); 457 + pr_debug(" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", 453 458 pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); 454 459 } 455 460 ··· 469 474 p = phys_to_virt(i); 470 475 471 476 if (memcmp(p, "AMDK7PNOW!", 10) == 0) { 472 - dprintk("Found PSB header at %p\n", p); 477 + pr_debug("Found PSB header at %p\n", p); 473 478 psb = (struct psb_s *) p; 474 - dprintk("Table version: 0x%x\n", psb->tableversion); 479 + pr_debug("Table version: 0x%x\n", psb->tableversion); 475 480 if (psb->tableversion != 0x12) { 476 481 printk(KERN_INFO PFX "Sorry, only v1.2 tables" 477 482 " supported right now\n"); 478 483 return -ENODEV; 479 484 } 480 485 481 - dprintk("Flags: 0x%x\n", psb->flags); 486 + pr_debug("Flags: 0x%x\n", psb->flags); 482 487 if ((psb->flags & 1) == 0) 483 - dprintk("Mobile voltage regulator\n"); 488 + pr_debug("Mobile voltage regulator\n"); 484 489 else 485 - dprintk("Desktop voltage regulator\n"); 490 + pr_debug("Desktop voltage regulator\n"); 486 491 487 492 latency = psb->settlingtime; 488 493 if (latency < 100) { ··· 492 497 "Correcting.\n", latency); 493 498 latency = 100; 494 499 } 495 - dprintk("Settling Time: %d microseconds.\n", 500 + pr_debug("Settling Time: %d microseconds.\n", 496 501 psb->settlingtime); 497 - dprintk("Has %d PST tables. (Only dumping ones " 502 + pr_debug("Has %d PST tables. (Only dumping ones " 498 503 "relevant to this CPU).\n", 499 504 psb->numpst); 500 505 ··· 645 650 printk(KERN_WARNING PFX "can not determine bus frequency\n"); 646 651 return -EINVAL; 647 652 } 648 - dprintk("FSB: %3dMHz\n", fsb/1000); 653 + pr_debug("FSB: %3dMHz\n", fsb/1000); 649 654 650 655 if (dmi_check_system(powernow_dmi_table) || acpi_force) { 651 656 printk(KERN_INFO PFX "PSB/PST known to be broken. "
+50 -50
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
··· 139 139 } 140 140 do { 141 141 if (i++ > 10000) { 142 - dprintk("detected change pending stuck\n"); 142 + pr_debug("detected change pending stuck\n"); 143 143 return 1; 144 144 } 145 145 rdmsr(MSR_FIDVID_STATUS, lo, hi); ··· 176 176 fid = lo & MSR_S_LO_CURRENT_FID; 177 177 lo = fid | (vid << MSR_C_LO_VID_SHIFT); 178 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 180 wrmsr(MSR_FIDVID_CTL, lo, hi); 181 181 } 182 182 ··· 196 196 lo |= (data->currvid << MSR_C_LO_VID_SHIFT); 197 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 200 fid, lo, data->plllock * PLL_LOCK_CONVERSION); 201 201 202 202 do { ··· 244 244 lo |= (vid << MSR_C_LO_VID_SHIFT); 245 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 248 vid, lo, STOP_GRANT_5NS); 249 249 250 250 do { ··· 325 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 329 smp_processor_id(), data->currfid, data->currvid); 330 330 331 331 return 0; ··· 339 339 u32 savefid = data->currfid; 340 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 343 "reqvid 0x%x, rvo 0x%x\n", 344 344 smp_processor_id(), 345 345 data->currfid, data->currvid, reqvid, data->rvo); ··· 349 349 rvosteps *= rvomult; 350 350 rdmsr(MSR_FIDVID_STATUS, lo, maxvid); 351 351 maxvid = 0x1f & (maxvid >> 16); 352 - dprintk("ph1 maxvid=0x%x\n", maxvid); 352 + pr_debug("ph1 maxvid=0x%x\n", maxvid); 353 353 if (reqvid < maxvid) /* lower numbers are higher voltages */ 354 354 reqvid = maxvid; 355 355 356 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 358 data->currvid, reqvid); 359 359 if (decrease_vid_code_by_step(data, reqvid, data->vidmvs)) 360 360 return 1; ··· 365 365 if (data->currvid == maxvid) { 366 366 rvosteps = 0; 367 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 369 data->currvid - 1); 370 370 if (decrease_vid_code_by_step(data, data->currvid-1, 1)) 371 371 return 1; ··· 382 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 386 data->currfid, data->currvid); 387 387 388 388 return 0; ··· 400 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 404 "reqfid 0x%x\n", 405 405 smp_processor_id(), 406 406 data->currfid, data->currvid, reqfid); ··· 457 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 461 data->currfid, data->currvid); 462 462 463 463 return 0; ··· 470 470 u32 savefid = data->currfid; 471 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 474 smp_processor_id(), 475 475 data->currfid, data->currvid); 476 476 ··· 498 498 return 1; 499 499 500 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 502 return 1; 503 503 } 504 504 505 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 507 data->currfid); 508 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 512 data->currfid, data->currvid); 513 513 514 514 return 0; ··· 707 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 711 data->powernow_table = powernow_table; 712 712 if (cpumask_first(cpu_core_mask(data->cpu)) == data->cpu) 713 713 print_basics(data); ··· 717 717 (pst[j].vid == data->currvid)) 718 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 721 return 0; 722 722 } 723 723 ··· 739 739 if (memcmp(psb, PSB_ID_STRING, PSB_ID_STRING_LEN) != 0) 740 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 745 if (psb->tableversion != PSB_VERSION_1_4) { 746 746 printk(KERN_ERR FW_BUG PFX "PSB table is not v1.4\n"); 747 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 751 if (psb->flags1) { 752 752 printk(KERN_ERR FW_BUG PFX "unknown flags\n"); 753 753 return -ENODEV; 754 754 } 755 755 756 756 data->vstable = psb->vstable; 757 - dprintk("voltage stabilization time: %d(*20us)\n", 757 + pr_debug("voltage stabilization time: %d(*20us)\n", 758 758 data->vstable); 759 759 760 - dprintk("flags2: 0x%x\n", psb->flags2); 760 + pr_debug("flags2: 0x%x\n", psb->flags2); 761 761 data->rvo = psb->flags2 & 3; 762 762 data->irt = ((psb->flags2) >> 2) & 3; 763 763 mvs = ((psb->flags2) >> 4) & 3; 764 764 data->vidmvs = 1 << mvs; 765 765 data->batps = ((psb->flags2) >> 6) & 3; 766 766 767 - dprintk("ramp voltage offset: %d\n", data->rvo); 768 - dprintk("isochronous relief time: %d\n", data->irt); 769 - dprintk("maximum voltage step: %d - 0x%x\n", mvs, data->vidmvs); 767 + pr_debug("ramp voltage offset: %d\n", data->rvo); 768 + pr_debug("isochronous relief time: %d\n", data->irt); 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 772 cpst = psb->num_tables; 773 773 if ((psb->cpuid == 0x00000fc0) || 774 774 (psb->cpuid == 0x00000fe0)) { ··· 783 783 } 784 784 785 785 data->plllock = psb->plllocktime; 786 - dprintk("plllocktime: 0x%x (units 1us)\n", psb->plllocktime); 787 - dprintk("maxfid: 0x%x\n", psb->maxfid); 788 - dprintk("maxvid: 0x%x\n", psb->maxvid); 786 + pr_debug("plllocktime: 0x%x (units 1us)\n", psb->plllocktime); 787 + pr_debug("maxfid: 0x%x\n", psb->maxfid); 788 + pr_debug("maxvid: 0x%x\n", psb->maxvid); 789 789 maxvid = psb->maxvid; 790 790 791 791 data->numps = psb->numps; 792 - dprintk("numpstates: 0x%x\n", data->numps); 792 + pr_debug("numpstates: 0x%x\n", data->numps); 793 793 return fill_powernow_table(data, 794 794 (struct pst_s *)(psb+1), maxvid); 795 795 } ··· 834 834 u64 control, status; 835 835 836 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 838 return -EIO; 839 839 } 840 840 841 841 /* verify the data contained in the ACPI structures */ 842 842 if (data->acpi_data.state_count <= 1) { 843 - dprintk("No ACPI P-States\n"); 843 + pr_debug("No ACPI P-States\n"); 844 844 goto err_out; 845 845 } 846 846 ··· 849 849 850 850 if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || 851 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 853 control, status); 854 854 goto err_out; 855 855 } ··· 858 858 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) 859 859 * (data->acpi_data.state_count + 1)), GFP_KERNEL); 860 860 if (!powernow_table) { 861 - dprintk("powernow_table memory alloc failure\n"); 861 + pr_debug("powernow_table memory alloc failure\n"); 862 862 goto err_out; 863 863 } 864 864 ··· 928 928 } 929 929 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); 930 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 932 invalidate_entry(powernow_table, i); 933 933 continue; 934 934 } ··· 968 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 973 index = fid | (vid<<8); 974 974 powernow_table[i].index = index; ··· 978 978 979 979 /* verify frequency is OK */ 980 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 982 invalidate_entry(powernow_table, i); 983 983 continue; 984 984 } ··· 986 986 /* verify voltage is OK - 987 987 * BIOSs are using "off" to indicate invalid */ 988 988 if (vid == VID_OFF) { 989 - dprintk("invalid vid %u, ignoring\n", vid); 989 + pr_debug("invalid vid %u, ignoring\n", vid); 990 990 invalidate_entry(powernow_table, i); 991 991 continue; 992 992 } ··· 1047 1047 int res, i; 1048 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 1052 /* fid/vid correctness check for k8 */ 1053 1053 /* fid are the lower 8 bits of the index we stored into ··· 1057 1057 fid = data->powernow_table[index].index & 0xFF; 1058 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 1062 if (query_current_values_with_pending_wait(data)) 1063 1063 return 1; 1064 1064 1065 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 1067 fid, vid); 1068 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 1072 smp_processor_id(), fid, vid); 1073 1073 freqs.old = find_khz_freq_from_fid(data->currfid); 1074 1074 freqs.new = find_khz_freq_from_fid(fid); ··· 1096 1096 int res, i; 1097 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 1101 /* get MSR index for hardware pstate transition */ 1102 1102 pstate = index & HW_PSTATE_MASK; ··· 1156 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 1160 pol->cpu, targfreq, pol->min, pol->max, relation); 1161 1161 1162 1162 if (query_current_values_with_pending_wait(data)) 1163 1163 goto err_out; 1164 1164 1165 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 1167 data->currfid, data->currvid); 1168 1168 1169 1169 if ((checkvid != data->currvid) || ··· 1319 1319 data->currpstate); 1320 1320 else 1321 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 1324 /* min/max the cpu is capable of */ 1325 1325 if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { ··· 1337 1337 cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); 1338 1338 1339 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 1341 data->currpstate); 1342 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 1344 data->currfid, data->currvid); 1345 1345 1346 1346 per_cpu(powernow_data, pol->cpu) = data; ··· 1586 1586 /* driver entry point for term */ 1587 1587 static void __exit powernowk8_exit(void) 1588 1588 { 1589 - dprintk("exit\n"); 1589 + pr_debug("exit\n"); 1590 1590 1591 1591 if (boot_cpu_has(X86_FEATURE_CPB)) { 1592 1592 msrs_free(msrs);
-2
arch/x86/kernel/cpu/cpufreq/powernow-k8.h
··· 211 211 u8 vid; 212 212 }; 213 213 214 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "powernow-k8", msg) 215 - 216 214 static int core_voltage_pre_transition(struct powernow_k8_data *data, 217 215 u32 reqvid, u32 regfid); 218 216 static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvid);
+2 -4
arch/x86/kernel/cpu/cpufreq/sc520_freq.c
··· 29 29 30 30 static __u8 __iomem *cpuctl; 31 31 32 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 33 - "sc520_freq", msg) 34 32 #define PFX "sc520_freq: " 35 33 36 34 static struct cpufreq_frequency_table sc520_freq_table[] = { ··· 64 66 65 67 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 66 68 67 - dprintk("attempting to set frequency to %i kHz\n", 69 + pr_debug("attempting to set frequency to %i kHz\n", 68 70 sc520_freq_table[state].frequency); 69 71 70 72 local_irq_disable(); ··· 159 161 /* Test if we have the right hardware */ 160 162 if (c->x86_vendor != X86_VENDOR_AMD || 161 163 c->x86 != 4 || c->x86_model != 9) { 162 - dprintk("no Elan SC520 processor found!\n"); 164 + pr_debug("no Elan SC520 processor found!\n"); 163 165 return -ENODEV; 164 166 } 165 167 cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1);
+10 -13
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
··· 29 29 #define PFX "speedstep-centrino: " 30 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 32 #define INTEL_MSR_RANGE (0xffff) 36 33 37 34 struct cpu_id ··· 241 244 242 245 if (model->cpu_id == NULL) { 243 246 /* No match at all */ 244 - dprintk("no support for CPU model \"%s\": " 247 + pr_debug("no support for CPU model \"%s\": " 245 248 "send /proc/cpuinfo to " MAINTAINER "\n", 246 249 cpu->x86_model_id); 247 250 return -ENOENT; ··· 249 252 250 253 if (model->op_points == NULL) { 251 254 /* Matched a non-match */ 252 - dprintk("no table support for CPU model \"%s\"\n", 255 + pr_debug("no table support for CPU model \"%s\"\n", 253 256 cpu->x86_model_id); 254 - dprintk("try using the acpi-cpufreq driver\n"); 257 + pr_debug("try using the acpi-cpufreq driver\n"); 255 258 return -ENOENT; 256 259 } 257 260 258 261 per_cpu(centrino_model, policy->cpu) = model; 259 262 260 - dprintk("found \"%s\": max frequency: %dkHz\n", 263 + pr_debug("found \"%s\": max frequency: %dkHz\n", 261 264 model->model_name, model->max_freq); 262 265 263 266 return 0; ··· 366 369 per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; 367 370 368 371 if (!per_cpu(centrino_cpu, policy->cpu)) { 369 - dprintk("found unsupported CPU with " 372 + pr_debug("found unsupported CPU with " 370 373 "Enhanced SpeedStep: send /proc/cpuinfo to " 371 374 MAINTAINER "\n"); 372 375 return -ENODEV; ··· 382 385 383 386 if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { 384 387 l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; 385 - dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); 388 + pr_debug("trying to enable Enhanced SpeedStep (%x)\n", l); 386 389 wrmsr(MSR_IA32_MISC_ENABLE, l, h); 387 390 388 391 /* check to see if it stuck */ ··· 399 402 /* 10uS transition latency */ 400 403 policy->cur = freq; 401 404 402 - dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); 405 + pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur); 403 406 404 407 ret = cpufreq_frequency_table_cpuinfo(policy, 405 408 per_cpu(centrino_model, policy->cpu)->op_points); ··· 495 498 good_cpu = j; 496 499 497 500 if (good_cpu >= nr_cpu_ids) { 498 - dprintk("couldn't limit to CPUs in this domain\n"); 501 + pr_debug("couldn't limit to CPUs in this domain\n"); 499 502 retval = -EAGAIN; 500 503 if (first_cpu) { 501 504 /* We haven't started the transition yet. */ ··· 509 512 if (first_cpu) { 510 513 rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); 511 514 if (msr == (oldmsr & 0xffff)) { 512 - dprintk("no change needed - msr was and needs " 515 + pr_debug("no change needed - msr was and needs " 513 516 "to be %x\n", oldmsr); 514 517 retval = 0; 515 518 goto out; ··· 518 521 freqs.old = extract_clock(oldmsr, cpu, 0); 519 522 freqs.new = extract_clock(msr, cpu, 0); 520 523 521 - dprintk("target=%dkHz old=%d new=%d msr=%04x\n", 524 + pr_debug("target=%dkHz old=%d new=%d msr=%04x\n", 522 525 target_freq, freqs.old, freqs.new, msr); 523 526 524 527 for_each_cpu(k, policy->cpus) {
+12 -16
arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
··· 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 57 * speedstep_find_register - read the PMBASE address 62 58 * ··· 76 80 return -ENODEV; 77 81 } 78 82 79 - dprintk("pmbase is 0x%x\n", pmbase); 83 + pr_debug("pmbase is 0x%x\n", pmbase); 80 84 return 0; 81 85 } 82 86 ··· 102 106 /* read state */ 103 107 value = inb(pmbase + 0x50); 104 108 105 - dprintk("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); 109 + pr_debug("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); 106 110 107 111 /* write new state */ 108 112 value &= 0xFE; 109 113 value |= state; 110 114 111 - dprintk("writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase); 115 + pr_debug("writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase); 112 116 113 117 /* Disable bus master arbitration */ 114 118 pm2_blk = inb(pmbase + 0x20); ··· 128 132 /* Enable IRQs */ 129 133 local_irq_restore(flags); 130 134 131 - dprintk("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); 135 + pr_debug("read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); 132 136 133 137 if (state == (value & 0x1)) 134 - dprintk("change to %u MHz succeeded\n", 138 + pr_debug("change to %u MHz succeeded\n", 135 139 speedstep_get_frequency(speedstep_processor) / 1000); 136 140 else 137 141 printk(KERN_ERR "cpufreq: change failed - I/O error\n"); ··· 161 165 pci_read_config_word(speedstep_chipset_dev, 0x00A0, &value); 162 166 if (!(value & 0x08)) { 163 167 value |= 0x08; 164 - dprintk("activating SpeedStep (TM) registers\n"); 168 + pr_debug("activating SpeedStep (TM) registers\n"); 165 169 pci_write_config_word(speedstep_chipset_dev, 0x00A0, value); 166 170 } 167 171 ··· 214 218 return 2; /* 2-M */ 215 219 216 220 if (hostbridge->revision < 5) { 217 - dprintk("hostbridge does not support speedstep\n"); 221 + pr_debug("hostbridge does not support speedstep\n"); 218 222 speedstep_chipset_dev = NULL; 219 223 pci_dev_put(hostbridge); 220 224 return 0; ··· 242 246 if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) 243 247 BUG(); 244 248 245 - dprintk("detected %u kHz as current frequency\n", speed); 249 + pr_debug("detected %u kHz as current frequency\n", speed); 246 250 return speed; 247 251 } 248 252 ··· 272 276 freqs.new = speedstep_freqs[newstate].frequency; 273 277 freqs.cpu = policy->cpu; 274 278 275 - dprintk("transiting from %u to %u kHz\n", freqs.old, freqs.new); 279 + pr_debug("transiting from %u to %u kHz\n", freqs.old, freqs.new); 276 280 277 281 /* no transition necessary */ 278 282 if (freqs.old == freqs.new) ··· 347 351 if (!speed) 348 352 return -EIO; 349 353 350 - dprintk("currently at %s speed setting - %i MHz\n", 354 + pr_debug("currently at %s speed setting - %i MHz\n", 351 355 (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) 352 356 ? "low" : "high", 353 357 (speed / 1000)); ··· 401 405 /* detect processor */ 402 406 speedstep_processor = speedstep_detect_processor(); 403 407 if (!speedstep_processor) { 404 - dprintk("Intel(R) SpeedStep(TM) capable processor " 408 + pr_debug("Intel(R) SpeedStep(TM) capable processor " 405 409 "not found\n"); 406 410 return -ENODEV; 407 411 } 408 412 409 413 /* detect chipset */ 410 414 if (!speedstep_detect_chipset()) { 411 - dprintk("Intel(R) SpeedStep(TM) for this chipset not " 415 + pr_debug("Intel(R) SpeedStep(TM) for this chipset not " 412 416 "(yet) available.\n"); 413 417 return -ENODEV; 414 418 }
+20 -23
arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
··· 18 18 #include <asm/tsc.h> 19 19 #include "speedstep-lib.h" 20 20 21 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ 22 - "speedstep-lib", msg) 23 - 24 21 #define PFX "speedstep-lib: " 25 22 26 23 #ifdef CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK ··· 72 75 73 76 /* read MSR 0x2a - we only need the low 32 bits */ 74 77 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); 75 - dprintk("P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); 78 + pr_debug("P3 - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); 76 79 msr_tmp = msr_lo; 77 80 78 81 /* decode the FSB */ ··· 86 89 87 90 /* decode the multiplier */ 88 91 if (processor == SPEEDSTEP_CPU_PIII_C_EARLY) { 89 - dprintk("workaround for early PIIIs\n"); 92 + pr_debug("workaround for early PIIIs\n"); 90 93 msr_lo &= 0x03c00000; 91 94 } else 92 95 msr_lo &= 0x0bc00000; ··· 97 100 j++; 98 101 } 99 102 100 - dprintk("speed is %u\n", 103 + pr_debug("speed is %u\n", 101 104 (msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100)); 102 105 103 106 return msr_decode_mult[j].ratio * msr_decode_fsb[i].value * 100; ··· 109 112 u32 msr_lo, msr_tmp; 110 113 111 114 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); 112 - dprintk("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); 115 + pr_debug("PM - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", msr_lo, msr_tmp); 113 116 114 117 /* see table B-2 of 24547212.pdf */ 115 118 if (msr_lo & 0x00040000) { ··· 119 122 } 120 123 121 124 msr_tmp = (msr_lo >> 22) & 0x1f; 122 - dprintk("bits 22-26 are 0x%x, speed is %u\n", 125 + pr_debug("bits 22-26 are 0x%x, speed is %u\n", 123 126 msr_tmp, (msr_tmp * 100 * 1000)); 124 127 125 128 return msr_tmp * 100 * 1000; ··· 157 160 } 158 161 159 162 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); 160 - dprintk("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", 163 + pr_debug("PCORE - MSR_IA32_EBL_CR_POWERON: 0x%x 0x%x\n", 161 164 msr_lo, msr_tmp); 162 165 163 166 msr_tmp = (msr_lo >> 22) & 0x1f; 164 - dprintk("bits 22-26 are 0x%x, speed is %u\n", 167 + pr_debug("bits 22-26 are 0x%x, speed is %u\n", 165 168 msr_tmp, (msr_tmp * fsb)); 166 169 167 170 ret = (msr_tmp * fsb); ··· 187 190 188 191 rdmsr(0x2c, msr_lo, msr_hi); 189 192 190 - dprintk("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); 193 + pr_debug("P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); 191 194 192 195 /* decode the FSB: see IA-32 Intel (C) Architecture Software 193 196 * Developer's Manual, Volume 3: System Prgramming Guide, ··· 214 217 /* Multiplier. */ 215 218 mult = msr_lo >> 24; 216 219 217 - dprintk("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", 220 + pr_debug("P4 - FSB %u kHz; Multiplier %u; Speed %u kHz\n", 218 221 fsb, mult, (fsb * mult)); 219 222 220 223 ret = (fsb * mult); ··· 254 257 struct cpuinfo_x86 *c = &cpu_data(0); 255 258 u32 ebx, msr_lo, msr_hi; 256 259 257 - dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); 260 + pr_debug("x86: %x, model: %x\n", c->x86, c->x86_model); 258 261 259 262 if ((c->x86_vendor != X86_VENDOR_INTEL) || 260 263 ((c->x86 != 6) && (c->x86 != 0xF))) ··· 269 272 ebx = cpuid_ebx(0x00000001); 270 273 ebx &= 0x000000FF; 271 274 272 - dprintk("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); 275 + pr_debug("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask); 273 276 274 277 switch (c->x86_mask) { 275 278 case 4: ··· 324 327 /* cpuid_ebx(1) is 0x04 for desktop PIII, 325 328 * 0x06 for mobile PIII-M */ 326 329 ebx = cpuid_ebx(0x00000001); 327 - dprintk("ebx is %x\n", ebx); 330 + pr_debug("ebx is %x\n", ebx); 328 331 329 332 ebx &= 0x000000FF; 330 333 ··· 341 344 /* all mobile PIII Coppermines have FSB 100 MHz 342 345 * ==> sort out a few desktop PIIIs. */ 343 346 rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_hi); 344 - dprintk("Coppermine: MSR_IA32_EBL_CR_POWERON is 0x%x, 0x%x\n", 347 + pr_debug("Coppermine: MSR_IA32_EBL_CR_POWERON is 0x%x, 0x%x\n", 345 348 msr_lo, msr_hi); 346 349 msr_lo &= 0x00c0000; 347 350 if (msr_lo != 0x0080000) ··· 354 357 * bit 56 or 57 is set 355 358 */ 356 359 rdmsr(MSR_IA32_PLATFORM_ID, msr_lo, msr_hi); 357 - dprintk("Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", 360 + pr_debug("Coppermine: MSR_IA32_PLATFORM ID is 0x%x, 0x%x\n", 358 361 msr_lo, msr_hi); 359 362 if ((msr_hi & (1<<18)) && 360 363 (relaxed_check ? 1 : (msr_hi & (3<<24)))) { 361 364 if (c->x86_mask == 0x01) { 362 - dprintk("early PIII version\n"); 365 + pr_debug("early PIII version\n"); 363 366 return SPEEDSTEP_CPU_PIII_C_EARLY; 364 367 } else 365 368 return SPEEDSTEP_CPU_PIII_C; ··· 390 393 if ((!processor) || (!low_speed) || (!high_speed) || (!set_state)) 391 394 return -EINVAL; 392 395 393 - dprintk("trying to determine both speeds\n"); 396 + pr_debug("trying to determine both speeds\n"); 394 397 395 398 /* get current speed */ 396 399 prev_speed = speedstep_get_frequency(processor); 397 400 if (!prev_speed) 398 401 return -EIO; 399 402 400 - dprintk("previous speed is %u\n", prev_speed); 403 + pr_debug("previous speed is %u\n", prev_speed); 401 404 402 405 local_irq_save(flags); 403 406 ··· 409 412 goto out; 410 413 } 411 414 412 - dprintk("low speed is %u\n", *low_speed); 415 + pr_debug("low speed is %u\n", *low_speed); 413 416 414 417 /* start latency measurement */ 415 418 if (transition_latency) ··· 428 431 goto out; 429 432 } 430 433 431 - dprintk("high speed is %u\n", *high_speed); 434 + pr_debug("high speed is %u\n", *high_speed); 432 435 433 436 if (*low_speed == *high_speed) { 434 437 ret = -ENODEV; ··· 442 445 if (transition_latency) { 443 446 *transition_latency = (tv2.tv_sec - tv1.tv_sec) * USEC_PER_SEC + 444 447 tv2.tv_usec - tv1.tv_usec; 445 - dprintk("transition latency is %u uSec\n", *transition_latency); 448 + pr_debug("transition latency is %u uSec\n", *transition_latency); 446 449 447 450 /* convert uSec to nSec and add 20% for safety reasons */ 448 451 *transition_latency *= 1200;
+19 -22
arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
··· 55 55 * of DMA activity going on? */ 56 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 59 * speedstep_smi_ownership 63 60 */ ··· 67 70 command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); 68 71 magic = virt_to_phys(magic_data); 69 72 70 - dprintk("trying to obtain ownership with command %x at port %x\n", 73 + pr_debug("trying to obtain ownership with command %x at port %x\n", 71 74 command, smi_port); 72 75 73 76 __asm__ __volatile__( ··· 82 85 : "memory" 83 86 ); 84 87 85 - dprintk("result is %x\n", result); 88 + pr_debug("result is %x\n", result); 86 89 87 90 return result; 88 91 } ··· 103 106 u32 function = GET_SPEEDSTEP_FREQS; 104 107 105 108 if (!(ist_info.event & 0xFFFF)) { 106 - dprintk("bug #1422 -- can't read freqs from BIOS\n"); 109 + pr_debug("bug #1422 -- can't read freqs from BIOS\n"); 107 110 return -ENODEV; 108 111 } 109 112 110 113 command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); 111 114 112 - dprintk("trying to determine frequencies with command %x at port %x\n", 115 + pr_debug("trying to determine frequencies with command %x at port %x\n", 113 116 command, smi_port); 114 117 115 118 __asm__ __volatile__( ··· 126 129 "d" (smi_port), "S" (0), "D" (0) 127 130 ); 128 131 129 - dprintk("result %x, low_freq %u, high_freq %u\n", 132 + pr_debug("result %x, low_freq %u, high_freq %u\n", 130 133 result, low_mhz, high_mhz); 131 134 132 135 /* abort if results are obviously incorrect... */ ··· 151 154 152 155 command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); 153 156 154 - dprintk("trying to determine current setting with command %x " 157 + pr_debug("trying to determine current setting with command %x " 155 158 "at port %x\n", command, smi_port); 156 159 157 160 __asm__ __volatile__( ··· 165 168 "d" (smi_port), "S" (0), "D" (0) 166 169 ); 167 170 168 - dprintk("state is %x, result is %x\n", state, result); 171 + pr_debug("state is %x, result is %x\n", state, result); 169 172 170 173 return state & 1; 171 174 } ··· 191 194 192 195 command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); 193 196 194 - dprintk("trying to set frequency to state %u " 197 + pr_debug("trying to set frequency to state %u " 195 198 "with command %x at port %x\n", 196 199 state, command, smi_port); 197 200 198 201 do { 199 202 if (retry) { 200 - dprintk("retry %u, previous result %u, waiting...\n", 203 + pr_debug("retry %u, previous result %u, waiting...\n", 201 204 retry, result); 202 205 mdelay(retry * 50); 203 206 } ··· 218 221 local_irq_restore(flags); 219 222 220 223 if (new_state == state) 221 - dprintk("change to %u MHz succeeded after %u tries " 224 + pr_debug("change to %u MHz succeeded after %u tries " 222 225 "with result %u\n", 223 226 (speedstep_freqs[new_state].frequency / 1000), 224 227 retry, result); ··· 289 292 290 293 result = speedstep_smi_ownership(); 291 294 if (result) { 292 - dprintk("fails in acquiring ownership of a SMI interface.\n"); 295 + pr_debug("fails in acquiring ownership of a SMI interface.\n"); 293 296 return -EINVAL; 294 297 } 295 298 ··· 301 304 if (result) { 302 305 /* fall back to speedstep_lib.c dection mechanism: 303 306 * try both states out */ 304 - dprintk("could not detect low and high frequencies " 307 + pr_debug("could not detect low and high frequencies " 305 308 "by SMI call.\n"); 306 309 result = speedstep_get_freqs(speedstep_processor, 307 310 low, high, ··· 309 312 &speedstep_set_state); 310 313 311 314 if (result) { 312 - dprintk("could not detect two different speeds" 315 + pr_debug("could not detect two different speeds" 313 316 " -- aborting.\n"); 314 317 return result; 315 318 } else 316 - dprintk("workaround worked.\n"); 319 + pr_debug("workaround worked.\n"); 317 320 } 318 321 319 322 /* get current speed setting */ 320 323 state = speedstep_get_state(); 321 324 speed = speedstep_freqs[state].frequency; 322 325 323 - dprintk("currently at %s speed setting - %i MHz\n", 326 + pr_debug("currently at %s speed setting - %i MHz\n", 324 327 (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) 325 328 ? "low" : "high", 326 329 (speed / 1000)); ··· 357 360 int result = speedstep_smi_ownership(); 358 361 359 362 if (result) 360 - dprintk("fails in re-acquiring ownership of a SMI interface.\n"); 363 + pr_debug("fails in re-acquiring ownership of a SMI interface.\n"); 361 364 362 365 return result; 363 366 } ··· 400 403 } 401 404 402 405 if (!speedstep_processor) { 403 - dprintk("No supported Intel CPU detected.\n"); 406 + pr_debug("No supported Intel CPU detected.\n"); 404 407 return -ENODEV; 405 408 } 406 409 407 - dprintk("signature:0x%.8lx, command:0x%.8lx, " 408 - "event:0x%.8lx, perf_level:0x%.8lx.\n", 410 + pr_debug("signature:0x%.8ulx, command:0x%.8ulx, " 411 + "event:0x%.8ulx, perf_level:0x%.8ulx.\n", 409 412 ist_info.signature, ist_info.command, 410 413 ist_info.event, ist_info.perf_level); 411 414
+1 -5
drivers/acpi/processor_perflib.c
··· 49 49 50 50 static DEFINE_MUTEX(performance_mutex); 51 51 52 - /* Use cpufreq debug layer for _PPC changes. */ 53 - #define cpufreq_printk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \ 54 - "cpufreq-core", msg) 55 - 56 52 /* 57 53 * _PPC support is implemented as a CPUfreq policy notifier: 58 54 * This means each time a CPUfreq driver registered also with ··· 141 145 return -ENODEV; 142 146 } 143 147 144 - cpufreq_printk("CPU %d: _PPC is %d - frequency %s limited\n", pr->id, 148 + pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id, 145 149 (int)ppc, ppc ? "" : "not"); 146 150 147 151 pr->performance_platform_limit = (int)ppc;
-13
drivers/cpufreq/Kconfig
··· 18 18 config CPU_FREQ_TABLE 19 19 tristate 20 20 21 - config CPU_FREQ_DEBUG 22 - bool "Enable CPUfreq debugging" 23 - help 24 - Say Y here to enable CPUfreq subsystem (including drivers) 25 - debugging. You will need to activate it via the kernel 26 - command line by passing 27 - cpufreq.debug=<value> 28 - 29 - To get <value>, add 30 - 1 to activate CPUfreq core debugging, 31 - 2 to activate CPUfreq drivers debugging, and 32 - 4 to activate CPUfreq governor debugging 33 - 34 21 config CPU_FREQ_STAT 35 22 tristate "CPU frequency translation statistics" 36 23 select CPU_FREQ_TABLE
+59 -156
drivers/cpufreq/cpufreq.c
··· 32 32 33 33 #include <trace/events/power.h> 34 34 35 - #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \ 36 - "cpufreq-core", msg) 37 - 38 35 /** 39 36 * The "cpufreq driver" - the arch- or hardware-dependent low 40 37 * level driver of CPUFreq support, and its spinlock. This lock ··· 178 181 179 182 180 183 /********************************************************************* 181 - * UNIFIED DEBUG HELPERS * 182 - *********************************************************************/ 183 - #ifdef CONFIG_CPU_FREQ_DEBUG 184 - 185 - /* what part(s) of the CPUfreq subsystem are debugged? */ 186 - static unsigned int debug; 187 - 188 - /* is the debug output ratelimit'ed using printk_ratelimit? User can 189 - * set or modify this value. 190 - */ 191 - static unsigned int debug_ratelimit = 1; 192 - 193 - /* is the printk_ratelimit'ing enabled? It's enabled after a successful 194 - * loading of a cpufreq driver, temporarily disabled when a new policy 195 - * is set, and disabled upon cpufreq driver removal 196 - */ 197 - static unsigned int disable_ratelimit = 1; 198 - static DEFINE_SPINLOCK(disable_ratelimit_lock); 199 - 200 - static void cpufreq_debug_enable_ratelimit(void) 201 - { 202 - unsigned long flags; 203 - 204 - spin_lock_irqsave(&disable_ratelimit_lock, flags); 205 - if (disable_ratelimit) 206 - disable_ratelimit--; 207 - spin_unlock_irqrestore(&disable_ratelimit_lock, flags); 208 - } 209 - 210 - static void cpufreq_debug_disable_ratelimit(void) 211 - { 212 - unsigned long flags; 213 - 214 - spin_lock_irqsave(&disable_ratelimit_lock, flags); 215 - disable_ratelimit++; 216 - spin_unlock_irqrestore(&disable_ratelimit_lock, flags); 217 - } 218 - 219 - void cpufreq_debug_printk(unsigned int type, const char *prefix, 220 - const char *fmt, ...) 221 - { 222 - char s[256]; 223 - va_list args; 224 - unsigned int len; 225 - unsigned long flags; 226 - 227 - WARN_ON(!prefix); 228 - if (type & debug) { 229 - spin_lock_irqsave(&disable_ratelimit_lock, flags); 230 - if (!disable_ratelimit && debug_ratelimit 231 - && !printk_ratelimit()) { 232 - spin_unlock_irqrestore(&disable_ratelimit_lock, flags); 233 - return; 234 - } 235 - spin_unlock_irqrestore(&disable_ratelimit_lock, flags); 236 - 237 - len = snprintf(s, 256, KERN_DEBUG "%s: ", prefix); 238 - 239 - va_start(args, fmt); 240 - len += vsnprintf(&s[len], (256 - len), fmt, args); 241 - va_end(args); 242 - 243 - printk(s); 244 - 245 - WARN_ON(len < 5); 246 - } 247 - } 248 - EXPORT_SYMBOL(cpufreq_debug_printk); 249 - 250 - 251 - module_param(debug, uint, 0644); 252 - MODULE_PARM_DESC(debug, "CPUfreq debugging: add 1 to debug core," 253 - " 2 to debug drivers, and 4 to debug governors."); 254 - 255 - module_param(debug_ratelimit, uint, 0644); 256 - MODULE_PARM_DESC(debug_ratelimit, "CPUfreq debugging:" 257 - " set to 0 to disable ratelimiting."); 258 - 259 - #else /* !CONFIG_CPU_FREQ_DEBUG */ 260 - 261 - static inline void cpufreq_debug_enable_ratelimit(void) { return; } 262 - static inline void cpufreq_debug_disable_ratelimit(void) { return; } 263 - 264 - #endif /* CONFIG_CPU_FREQ_DEBUG */ 265 - 266 - 267 - /********************************************************************* 268 184 * EXTERNALLY AFFECTING FREQUENCY CHANGES * 269 185 *********************************************************************/ 270 186 ··· 201 291 if (!l_p_j_ref_freq) { 202 292 l_p_j_ref = loops_per_jiffy; 203 293 l_p_j_ref_freq = ci->old; 204 - dprintk("saving %lu as reference value for loops_per_jiffy; " 294 + pr_debug("saving %lu as reference value for loops_per_jiffy; " 205 295 "freq is %u kHz\n", l_p_j_ref, l_p_j_ref_freq); 206 296 } 207 297 if ((val == CPUFREQ_PRECHANGE && ci->old < ci->new) || ··· 209 299 (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) { 210 300 loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq, 211 301 ci->new); 212 - dprintk("scaling loops_per_jiffy to %lu " 302 + pr_debug("scaling loops_per_jiffy to %lu " 213 303 "for frequency %u kHz\n", loops_per_jiffy, ci->new); 214 304 } 215 305 } ··· 236 326 BUG_ON(irqs_disabled()); 237 327 238 328 freqs->flags = cpufreq_driver->flags; 239 - dprintk("notification %u of frequency transition to %u kHz\n", 329 + pr_debug("notification %u of frequency transition to %u kHz\n", 240 330 state, freqs->new); 241 331 242 332 policy = per_cpu(cpufreq_cpu_data, freqs->cpu); ··· 250 340 if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) { 251 341 if ((policy) && (policy->cpu == freqs->cpu) && 252 342 (policy->cur) && (policy->cur != freqs->old)) { 253 - dprintk("Warning: CPU frequency is" 343 + pr_debug("Warning: CPU frequency is" 254 344 " %u, cpufreq assumed %u kHz.\n", 255 345 freqs->old, policy->cur); 256 346 freqs->old = policy->cur; ··· 263 353 264 354 case CPUFREQ_POSTCHANGE: 265 355 adjust_jiffies(CPUFREQ_POSTCHANGE, freqs); 266 - dprintk("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new, 356 + pr_debug("FREQ: %lu - CPU: %lu", (unsigned long)freqs->new, 267 357 (unsigned long)freqs->cpu); 268 358 trace_power_frequency(POWER_PSTATE, freqs->new, freqs->cpu); 269 359 trace_cpu_frequency(freqs->new, freqs->cpu); ··· 321 411 t = __find_governor(str_governor); 322 412 323 413 if (t == NULL) { 324 - char *name = kasprintf(GFP_KERNEL, "cpufreq_%s", 325 - str_governor); 414 + int ret; 326 415 327 - if (name) { 328 - int ret; 416 + mutex_unlock(&cpufreq_governor_mutex); 417 + ret = request_module("cpufreq_%s", str_governor); 418 + mutex_lock(&cpufreq_governor_mutex); 329 419 330 - mutex_unlock(&cpufreq_governor_mutex); 331 - ret = request_module("%s", name); 332 - mutex_lock(&cpufreq_governor_mutex); 333 - 334 - if (ret == 0) 335 - t = __find_governor(str_governor); 336 - } 337 - 338 - kfree(name); 420 + if (ret == 0) 421 + t = __find_governor(str_governor); 339 422 } 340 423 341 424 if (t != NULL) { ··· 656 753 static void cpufreq_sysfs_release(struct kobject *kobj) 657 754 { 658 755 struct cpufreq_policy *policy = to_policy(kobj); 659 - dprintk("last reference is dropped\n"); 756 + pr_debug("last reference is dropped\n"); 660 757 complete(&policy->kobj_unregister); 661 758 } 662 759 ··· 691 788 gov = __find_governor(per_cpu(cpufreq_cpu_governor, cpu)); 692 789 if (gov) { 693 790 policy->governor = gov; 694 - dprintk("Restoring governor %s for cpu %d\n", 791 + pr_debug("Restoring governor %s for cpu %d\n", 695 792 policy->governor->name, cpu); 696 793 } 697 794 #endif ··· 727 824 per_cpu(cpufreq_cpu_data, cpu) = managed_policy; 728 825 spin_unlock_irqrestore(&cpufreq_driver_lock, flags); 729 826 730 - dprintk("CPU already managed, adding link\n"); 827 + pr_debug("CPU already managed, adding link\n"); 731 828 ret = sysfs_create_link(&sys_dev->kobj, 732 829 &managed_policy->kobj, 733 830 "cpufreq"); ··· 768 865 if (!cpu_online(j)) 769 866 continue; 770 867 771 - dprintk("CPU %u already managed, adding link\n", j); 868 + pr_debug("CPU %u already managed, adding link\n", j); 772 869 managed_policy = cpufreq_cpu_get(cpu); 773 870 cpu_sys_dev = get_cpu_sysdev(j); 774 871 ret = sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, ··· 844 941 policy->user_policy.governor = policy->governor; 845 942 846 943 if (ret) { 847 - dprintk("setting policy failed\n"); 944 + pr_debug("setting policy failed\n"); 848 945 if (cpufreq_driver->exit) 849 946 cpufreq_driver->exit(policy); 850 947 } ··· 880 977 if (cpu_is_offline(cpu)) 881 978 return 0; 882 979 883 - cpufreq_debug_disable_ratelimit(); 884 - dprintk("adding CPU %u\n", cpu); 980 + pr_debug("adding CPU %u\n", cpu); 885 981 886 982 #ifdef CONFIG_SMP 887 983 /* check whether a different CPU already registered this ··· 888 986 policy = cpufreq_cpu_get(cpu); 889 987 if (unlikely(policy)) { 890 988 cpufreq_cpu_put(policy); 891 - cpufreq_debug_enable_ratelimit(); 892 989 return 0; 893 990 } 894 991 #endif ··· 938 1037 */ 939 1038 ret = cpufreq_driver->init(policy); 940 1039 if (ret) { 941 - dprintk("initialization failed\n"); 1040 + pr_debug("initialization failed\n"); 942 1041 goto err_unlock_policy; 943 1042 } 944 1043 policy->user_policy.min = policy->min; ··· 964 1063 965 1064 kobject_uevent(&policy->kobj, KOBJ_ADD); 966 1065 module_put(cpufreq_driver->owner); 967 - dprintk("initialization complete\n"); 968 - cpufreq_debug_enable_ratelimit(); 1066 + pr_debug("initialization complete\n"); 969 1067 970 1068 return 0; 971 1069 ··· 988 1088 nomem_out: 989 1089 module_put(cpufreq_driver->owner); 990 1090 module_out: 991 - cpufreq_debug_enable_ratelimit(); 992 1091 return ret; 993 1092 } 994 1093 ··· 1011 1112 unsigned int j; 1012 1113 #endif 1013 1114 1014 - cpufreq_debug_disable_ratelimit(); 1015 - dprintk("unregistering CPU %u\n", cpu); 1115 + pr_debug("unregistering CPU %u\n", cpu); 1016 1116 1017 1117 spin_lock_irqsave(&cpufreq_driver_lock, flags); 1018 1118 data = per_cpu(cpufreq_cpu_data, cpu); 1019 1119 1020 1120 if (!data) { 1021 1121 spin_unlock_irqrestore(&cpufreq_driver_lock, flags); 1022 - cpufreq_debug_enable_ratelimit(); 1023 1122 unlock_policy_rwsem_write(cpu); 1024 1123 return -EINVAL; 1025 1124 } ··· 1029 1132 * only need to unlink, put and exit 1030 1133 */ 1031 1134 if (unlikely(cpu != data->cpu)) { 1032 - dprintk("removing link\n"); 1135 + pr_debug("removing link\n"); 1033 1136 cpumask_clear_cpu(cpu, data->cpus); 1034 1137 spin_unlock_irqrestore(&cpufreq_driver_lock, flags); 1035 1138 kobj = &sys_dev->kobj; 1036 1139 cpufreq_cpu_put(data); 1037 - cpufreq_debug_enable_ratelimit(); 1038 1140 unlock_policy_rwsem_write(cpu); 1039 1141 sysfs_remove_link(kobj, "cpufreq"); 1040 1142 return 0; ··· 1066 1170 for_each_cpu(j, data->cpus) { 1067 1171 if (j == cpu) 1068 1172 continue; 1069 - dprintk("removing link for cpu %u\n", j); 1173 + pr_debug("removing link for cpu %u\n", j); 1070 1174 #ifdef CONFIG_HOTPLUG_CPU 1071 1175 strncpy(per_cpu(cpufreq_cpu_governor, j), 1072 1176 data->governor->name, CPUFREQ_NAME_LEN); ··· 1095 1199 * not referenced anymore by anybody before we proceed with 1096 1200 * unloading. 1097 1201 */ 1098 - dprintk("waiting for dropping of refcount\n"); 1202 + pr_debug("waiting for dropping of refcount\n"); 1099 1203 wait_for_completion(cmp); 1100 - dprintk("wait complete\n"); 1204 + pr_debug("wait complete\n"); 1101 1205 1102 1206 lock_policy_rwsem_write(cpu); 1103 1207 if (cpufreq_driver->exit) 1104 1208 cpufreq_driver->exit(data); 1105 1209 unlock_policy_rwsem_write(cpu); 1106 1210 1211 + #ifdef CONFIG_HOTPLUG_CPU 1212 + /* when the CPU which is the parent of the kobj is hotplugged 1213 + * offline, check for siblings, and create cpufreq sysfs interface 1214 + * and symlinks 1215 + */ 1216 + if (unlikely(cpumask_weight(data->cpus) > 1)) { 1217 + /* first sibling now owns the new sysfs dir */ 1218 + cpumask_clear_cpu(cpu, data->cpus); 1219 + cpufreq_add_dev(get_cpu_sysdev(cpumask_first(data->cpus))); 1220 + 1221 + /* finally remove our own symlink */ 1222 + lock_policy_rwsem_write(cpu); 1223 + __cpufreq_remove_dev(sys_dev); 1224 + } 1225 + #endif 1226 + 1107 1227 free_cpumask_var(data->related_cpus); 1108 1228 free_cpumask_var(data->cpus); 1109 1229 kfree(data); 1110 - per_cpu(cpufreq_cpu_data, cpu) = NULL; 1111 1230 1112 - cpufreq_debug_enable_ratelimit(); 1113 1231 return 0; 1114 1232 } 1115 1233 ··· 1149 1239 struct cpufreq_policy *policy = 1150 1240 container_of(work, struct cpufreq_policy, update); 1151 1241 unsigned int cpu = policy->cpu; 1152 - dprintk("handle_update for cpu %u called\n", cpu); 1242 + pr_debug("handle_update for cpu %u called\n", cpu); 1153 1243 cpufreq_update_policy(cpu); 1154 1244 } 1155 1245 ··· 1167 1257 { 1168 1258 struct cpufreq_freqs freqs; 1169 1259 1170 - dprintk("Warning: CPU frequency out of sync: cpufreq and timing " 1260 + pr_debug("Warning: CPU frequency out of sync: cpufreq and timing " 1171 1261 "core thinks of %u, is %u kHz.\n", old_freq, new_freq); 1172 1262 1173 1263 freqs.cpu = cpu; ··· 1270 1360 int cpu = smp_processor_id(); 1271 1361 struct cpufreq_policy *cpu_policy; 1272 1362 1273 - dprintk("suspending cpu %u\n", cpu); 1363 + pr_debug("suspending cpu %u\n", cpu); 1274 1364 1275 1365 /* If there's no policy for the boot CPU, we have nothing to do. */ 1276 1366 cpu_policy = cpufreq_cpu_get(cpu); ··· 1308 1398 int cpu = smp_processor_id(); 1309 1399 struct cpufreq_policy *cpu_policy; 1310 1400 1311 - dprintk("resuming cpu %u\n", cpu); 1401 + pr_debug("resuming cpu %u\n", cpu); 1312 1402 1313 1403 /* If there's no policy for the boot CPU, we have nothing to do. */ 1314 1404 cpu_policy = cpufreq_cpu_get(cpu); ··· 1420 1510 { 1421 1511 int retval = -EINVAL; 1422 1512 1423 - dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu, 1513 + pr_debug("target for CPU %u: %u kHz, relation %u\n", policy->cpu, 1424 1514 target_freq, relation); 1425 1515 if (cpu_online(policy->cpu) && cpufreq_driver->target) 1426 1516 retval = cpufreq_driver->target(policy, target_freq, relation); ··· 1506 1596 if (!try_module_get(policy->governor->owner)) 1507 1597 return -EINVAL; 1508 1598 1509 - dprintk("__cpufreq_governor for CPU %u, event %u\n", 1599 + pr_debug("__cpufreq_governor for CPU %u, event %u\n", 1510 1600 policy->cpu, event); 1511 1601 ret = policy->governor->governor(policy, event); 1512 1602 ··· 1607 1697 { 1608 1698 int ret = 0; 1609 1699 1610 - cpufreq_debug_disable_ratelimit(); 1611 - dprintk("setting new policy for CPU %u: %u - %u kHz\n", policy->cpu, 1700 + pr_debug("setting new policy for CPU %u: %u - %u kHz\n", policy->cpu, 1612 1701 policy->min, policy->max); 1613 1702 1614 1703 memcpy(&policy->cpuinfo, &data->cpuinfo, ··· 1644 1735 data->min = policy->min; 1645 1736 data->max = policy->max; 1646 1737 1647 - dprintk("new min and max freqs are %u - %u kHz\n", 1738 + pr_debug("new min and max freqs are %u - %u kHz\n", 1648 1739 data->min, data->max); 1649 1740 1650 1741 if (cpufreq_driver->setpolicy) { 1651 1742 data->policy = policy->policy; 1652 - dprintk("setting range\n"); 1743 + pr_debug("setting range\n"); 1653 1744 ret = cpufreq_driver->setpolicy(policy); 1654 1745 } else { 1655 1746 if (policy->governor != data->governor) { 1656 1747 /* save old, working values */ 1657 1748 struct cpufreq_governor *old_gov = data->governor; 1658 1749 1659 - dprintk("governor switch\n"); 1750 + pr_debug("governor switch\n"); 1660 1751 1661 1752 /* end old governor */ 1662 1753 if (data->governor) ··· 1666 1757 data->governor = policy->governor; 1667 1758 if (__cpufreq_governor(data, CPUFREQ_GOV_START)) { 1668 1759 /* new governor failed, so re-start old one */ 1669 - dprintk("starting governor %s failed\n", 1760 + pr_debug("starting governor %s failed\n", 1670 1761 data->governor->name); 1671 1762 if (old_gov) { 1672 1763 data->governor = old_gov; ··· 1678 1769 } 1679 1770 /* might be a policy change, too, so fall through */ 1680 1771 } 1681 - dprintk("governor: change or update limits\n"); 1772 + pr_debug("governor: change or update limits\n"); 1682 1773 __cpufreq_governor(data, CPUFREQ_GOV_LIMITS); 1683 1774 } 1684 1775 1685 1776 error_out: 1686 - cpufreq_debug_enable_ratelimit(); 1687 1777 return ret; 1688 1778 } 1689 1779 ··· 1709 1801 goto fail; 1710 1802 } 1711 1803 1712 - dprintk("updating policy for CPU %u\n", cpu); 1804 + pr_debug("updating policy for CPU %u\n", cpu); 1713 1805 memcpy(&policy, data, sizeof(struct cpufreq_policy)); 1714 1806 policy.min = data->user_policy.min; 1715 1807 policy.max = data->user_policy.max; ··· 1721 1813 if (cpufreq_driver->get) { 1722 1814 policy.cur = cpufreq_driver->get(cpu); 1723 1815 if (!data->cur) { 1724 - dprintk("Driver did not initialize current freq"); 1816 + pr_debug("Driver did not initialize current freq"); 1725 1817 data->cur = policy.cur; 1726 1818 } else { 1727 1819 if (data->cur != policy.cur) ··· 1797 1889 ((!driver_data->setpolicy) && (!driver_data->target))) 1798 1890 return -EINVAL; 1799 1891 1800 - dprintk("trying to register driver %s\n", driver_data->name); 1892 + pr_debug("trying to register driver %s\n", driver_data->name); 1801 1893 1802 1894 if (driver_data->setpolicy) 1803 1895 driver_data->flags |= CPUFREQ_CONST_LOOPS; ··· 1828 1920 1829 1921 /* if all ->init() calls failed, unregister */ 1830 1922 if (ret) { 1831 - dprintk("no CPU initialized for driver %s\n", 1923 + pr_debug("no CPU initialized for driver %s\n", 1832 1924 driver_data->name); 1833 1925 goto err_sysdev_unreg; 1834 1926 } 1835 1927 } 1836 1928 1837 1929 register_hotcpu_notifier(&cpufreq_cpu_notifier); 1838 - dprintk("driver %s up and running\n", driver_data->name); 1839 - cpufreq_debug_enable_ratelimit(); 1930 + pr_debug("driver %s up and running\n", driver_data->name); 1840 1931 1841 1932 return 0; 1842 1933 err_sysdev_unreg: ··· 1862 1955 { 1863 1956 unsigned long flags; 1864 1957 1865 - cpufreq_debug_disable_ratelimit(); 1866 - 1867 - if (!cpufreq_driver || (driver != cpufreq_driver)) { 1868 - cpufreq_debug_enable_ratelimit(); 1958 + if (!cpufreq_driver || (driver != cpufreq_driver)) 1869 1959 return -EINVAL; 1870 - } 1871 1960 1872 - dprintk("unregistering driver %s\n", driver->name); 1961 + pr_debug("unregistering driver %s\n", driver->name); 1873 1962 1874 1963 sysdev_driver_unregister(&cpu_sysdev_class, &cpufreq_sysdev_driver); 1875 1964 unregister_hotcpu_notifier(&cpufreq_cpu_notifier);
+1 -4
drivers/cpufreq/cpufreq_performance.c
··· 15 15 #include <linux/cpufreq.h> 16 16 #include <linux/init.h> 17 17 18 - #define dprintk(msg...) \ 19 - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "performance", msg) 20 - 21 18 22 19 static int cpufreq_governor_performance(struct cpufreq_policy *policy, 23 20 unsigned int event) ··· 22 25 switch (event) { 23 26 case CPUFREQ_GOV_START: 24 27 case CPUFREQ_GOV_LIMITS: 25 - dprintk("setting to %u kHz because of event %u\n", 28 + pr_debug("setting to %u kHz because of event %u\n", 26 29 policy->max, event); 27 30 __cpufreq_driver_target(policy, policy->max, 28 31 CPUFREQ_RELATION_H);
+1 -4
drivers/cpufreq/cpufreq_powersave.c
··· 15 15 #include <linux/cpufreq.h> 16 16 #include <linux/init.h> 17 17 18 - #define dprintk(msg...) \ 19 - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "powersave", msg) 20 - 21 18 static int cpufreq_governor_powersave(struct cpufreq_policy *policy, 22 19 unsigned int event) 23 20 { 24 21 switch (event) { 25 22 case CPUFREQ_GOV_START: 26 23 case CPUFREQ_GOV_LIMITS: 27 - dprintk("setting to %u kHz because of event %u\n", 24 + pr_debug("setting to %u kHz because of event %u\n", 28 25 policy->min, event); 29 26 __cpufreq_driver_target(policy, policy->min, 30 27 CPUFREQ_RELATION_L);
+19 -5
drivers/cpufreq/cpufreq_stats.c
··· 165 165 return -1; 166 166 } 167 167 168 + /* should be called late in the CPU removal sequence so that the stats 169 + * memory is still available in case someone tries to use it. 170 + */ 168 171 static void cpufreq_stats_free_table(unsigned int cpu) 169 172 { 170 173 struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, cpu); 171 - struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); 172 - if (policy && policy->cpu == cpu) 173 - sysfs_remove_group(&policy->kobj, &stats_attr_group); 174 174 if (stat) { 175 175 kfree(stat->time_in_state); 176 176 kfree(stat); 177 177 } 178 178 per_cpu(cpufreq_stats_table, cpu) = NULL; 179 + } 180 + 181 + /* must be called early in the CPU removal sequence (before 182 + * cpufreq_remove_dev) so that policy is still valid. 183 + */ 184 + static void cpufreq_stats_free_sysfs(unsigned int cpu) 185 + { 186 + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); 187 + if (policy && policy->cpu == cpu) 188 + sysfs_remove_group(&policy->kobj, &stats_attr_group); 179 189 if (policy) 180 190 cpufreq_cpu_put(policy); 181 191 } ··· 326 316 case CPU_ONLINE_FROZEN: 327 317 cpufreq_update_policy(cpu); 328 318 break; 319 + case CPU_DOWN_PREPARE: 320 + cpufreq_stats_free_sysfs(cpu); 321 + break; 329 322 case CPU_DEAD: 330 323 case CPU_DEAD_FROZEN: 331 324 cpufreq_stats_free_table(cpu); ··· 337 324 return NOTIFY_OK; 338 325 } 339 326 340 - static struct notifier_block cpufreq_stat_cpu_notifier __refdata = 341 - { 327 + /* priority=1 so this will get called before cpufreq_remove_dev */ 328 + static struct notifier_block cpufreq_stat_cpu_notifier __refdata = { 342 329 .notifier_call = cpufreq_stat_cpu_callback, 330 + .priority = 1, 343 331 }; 344 332 345 333 static struct notifier_block notifier_policy_block = {
+5 -8
drivers/cpufreq/cpufreq_userspace.c
··· 37 37 static DEFINE_MUTEX(userspace_mutex); 38 38 static int cpus_using_userspace_governor; 39 39 40 - #define dprintk(msg...) \ 41 - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "userspace", msg) 42 - 43 40 /* keep track of frequency transitions */ 44 41 static int 45 42 userspace_cpufreq_notifier(struct notifier_block *nb, unsigned long val, ··· 47 50 if (!per_cpu(cpu_is_managed, freq->cpu)) 48 51 return 0; 49 52 50 - dprintk("saving cpu_cur_freq of cpu %u to be %u kHz\n", 53 + pr_debug("saving cpu_cur_freq of cpu %u to be %u kHz\n", 51 54 freq->cpu, freq->new); 52 55 per_cpu(cpu_cur_freq, freq->cpu) = freq->new; 53 56 ··· 70 73 { 71 74 int ret = -EINVAL; 72 75 73 - dprintk("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); 76 + pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); 74 77 75 78 mutex_lock(&userspace_mutex); 76 79 if (!per_cpu(cpu_is_managed, policy->cpu)) ··· 131 134 per_cpu(cpu_max_freq, cpu) = policy->max; 132 135 per_cpu(cpu_cur_freq, cpu) = policy->cur; 133 136 per_cpu(cpu_set_freq, cpu) = policy->cur; 134 - dprintk("managing cpu %u started " 137 + pr_debug("managing cpu %u started " 135 138 "(%u - %u kHz, currently %u kHz)\n", 136 139 cpu, 137 140 per_cpu(cpu_min_freq, cpu), ··· 153 156 per_cpu(cpu_min_freq, cpu) = 0; 154 157 per_cpu(cpu_max_freq, cpu) = 0; 155 158 per_cpu(cpu_set_freq, cpu) = 0; 156 - dprintk("managing cpu %u stopped\n", cpu); 159 + pr_debug("managing cpu %u stopped\n", cpu); 157 160 mutex_unlock(&userspace_mutex); 158 161 break; 159 162 case CPUFREQ_GOV_LIMITS: 160 163 mutex_lock(&userspace_mutex); 161 - dprintk("limit event for cpu %u: %u - %u kHz, " 164 + pr_debug("limit event for cpu %u: %u - %u kHz, " 162 165 "currently %u kHz, last set to %u kHz\n", 163 166 cpu, policy->min, policy->max, 164 167 per_cpu(cpu_cur_freq, cpu),
+8 -11
drivers/cpufreq/freq_table.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/cpufreq.h> 16 16 17 - #define dprintk(msg...) \ 18 - cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, "freq-table", msg) 19 - 20 17 /********************************************************************* 21 18 * FREQUENCY TABLE HELPERS * 22 19 *********************************************************************/ ··· 28 31 for (i = 0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { 29 32 unsigned int freq = table[i].frequency; 30 33 if (freq == CPUFREQ_ENTRY_INVALID) { 31 - dprintk("table entry %u is invalid, skipping\n", i); 34 + pr_debug("table entry %u is invalid, skipping\n", i); 32 35 33 36 continue; 34 37 } 35 - dprintk("table entry %u: %u kHz, %u index\n", 38 + pr_debug("table entry %u: %u kHz, %u index\n", 36 39 i, freq, table[i].index); 37 40 if (freq < min_freq) 38 41 min_freq = freq; ··· 58 61 unsigned int i; 59 62 unsigned int count = 0; 60 63 61 - dprintk("request for verification of policy (%u - %u kHz) for cpu %u\n", 64 + pr_debug("request for verification of policy (%u - %u kHz) for cpu %u\n", 62 65 policy->min, policy->max, policy->cpu); 63 66 64 67 if (!cpu_online(policy->cpu)) ··· 83 86 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, 84 87 policy->cpuinfo.max_freq); 85 88 86 - dprintk("verification lead to (%u - %u kHz) for cpu %u\n", 89 + pr_debug("verification lead to (%u - %u kHz) for cpu %u\n", 87 90 policy->min, policy->max, policy->cpu); 88 91 89 92 return 0; ··· 107 110 }; 108 111 unsigned int i; 109 112 110 - dprintk("request for target %u kHz (relation: %u) for cpu %u\n", 113 + pr_debug("request for target %u kHz (relation: %u) for cpu %u\n", 111 114 target_freq, relation, policy->cpu); 112 115 113 116 switch (relation) { ··· 164 167 } else 165 168 *index = optimal.index; 166 169 167 - dprintk("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, 170 + pr_debug("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, 168 171 table[*index].index); 169 172 170 173 return 0; ··· 213 216 void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, 214 217 unsigned int cpu) 215 218 { 216 - dprintk("setting show_table for cpu %u to %p\n", cpu, table); 219 + pr_debug("setting show_table for cpu %u to %p\n", cpu, table); 217 220 per_cpu(cpufreq_show_table, cpu) = table; 218 221 } 219 222 EXPORT_SYMBOL_GPL(cpufreq_frequency_table_get_attr); 220 223 221 224 void cpufreq_frequency_table_put_attr(unsigned int cpu) 222 225 { 223 - dprintk("clearing show_table for cpu %u\n", cpu); 226 + pr_debug("clearing show_table for cpu %u\n", cpu); 224 227 per_cpu(cpufreq_show_table, cpu) = NULL; 225 228 } 226 229 EXPORT_SYMBOL_GPL(cpufreq_frequency_table_put_attr);
+18 -34
include/linux/cpufreq.h
··· 3 3 * 4 4 * Copyright (C) 2001 Russell King 5 5 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 6 - * 6 + * 7 7 * This program is free software; you can redistribute it and/or modify 8 8 * it under the terms of the GNU General Public License version 2 as 9 9 * published by the Free Software Foundation. ··· 56 56 #define CPUFREQ_POLICY_POWERSAVE (1) 57 57 #define CPUFREQ_POLICY_PERFORMANCE (2) 58 58 59 - /* Frequency values here are CPU kHz so that hardware which doesn't run 60 - * with some frequencies can complain without having to guess what per 61 - * cent / per mille means. 59 + /* Frequency values here are CPU kHz so that hardware which doesn't run 60 + * with some frequencies can complain without having to guess what per 61 + * cent / per mille means. 62 62 * Maximum transition latency is in nanoseconds - if it's unknown, 63 63 * CPUFREQ_ETERNAL shall be used. 64 64 */ ··· 72 72 struct cpufreq_cpuinfo { 73 73 unsigned int max_freq; 74 74 unsigned int min_freq; 75 - unsigned int transition_latency; /* in 10^(-9) s = nanoseconds */ 75 + 76 + /* in 10^(-9) s = nanoseconds */ 77 + unsigned int transition_latency; 76 78 }; 77 79 78 80 struct cpufreq_real_policy { 79 81 unsigned int min; /* in kHz */ 80 82 unsigned int max; /* in kHz */ 81 - unsigned int policy; /* see above */ 83 + unsigned int policy; /* see above */ 82 84 struct cpufreq_governor *governor; /* see below */ 83 85 }; 84 86 ··· 96 94 unsigned int max; /* in kHz */ 97 95 unsigned int cur; /* in kHz, only needed if cpufreq 98 96 * governors are used */ 99 - unsigned int policy; /* see above */ 97 + unsigned int policy; /* see above */ 100 98 struct cpufreq_governor *governor; /* see below */ 101 99 102 100 struct work_struct update; /* if update_policy() needs to be ··· 169 167 170 168 struct cpufreq_governor { 171 169 char name[CPUFREQ_NAME_LEN]; 172 - int (*governor) (struct cpufreq_policy *policy, 170 + int (*governor) (struct cpufreq_policy *policy, 173 171 unsigned int event); 174 172 ssize_t (*show_setspeed) (struct cpufreq_policy *policy, 175 173 char *buf); 176 - int (*store_setspeed) (struct cpufreq_policy *policy, 174 + int (*store_setspeed) (struct cpufreq_policy *policy, 177 175 unsigned int freq); 178 176 unsigned int max_transition_latency; /* HW must be able to switch to 179 177 next freq faster than this value in nano secs or we ··· 182 180 struct module *owner; 183 181 }; 184 182 185 - /* pass a target to the cpufreq driver 183 + /* 184 + * Pass a target to the cpufreq driver. 186 185 */ 187 186 extern int cpufreq_driver_target(struct cpufreq_policy *policy, 188 187 unsigned int target_freq, ··· 240 237 241 238 /* flags */ 242 239 243 - #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if 240 + #define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if 244 241 * all ->init() calls failed */ 245 - #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel 242 + #define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel 246 243 * "constants" aren't affected by 247 244 * frequency transitions */ 248 245 #define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed ··· 255 252 void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); 256 253 257 254 258 - static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) 255 + static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) 259 256 { 260 257 if (policy->min < min) 261 258 policy->min = min; ··· 389 386 /* the following 3 funtions are for cpufreq core use only */ 390 387 struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); 391 388 struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); 392 - void cpufreq_cpu_put (struct cpufreq_policy *data); 389 + void cpufreq_cpu_put(struct cpufreq_policy *data); 393 390 394 391 /* the following are really really optional */ 395 392 extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 396 393 397 - void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, 394 + void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, 398 395 unsigned int cpu); 399 396 400 397 void cpufreq_frequency_table_put_attr(unsigned int cpu); 401 398 402 - 403 - /********************************************************************* 404 - * UNIFIED DEBUG HELPERS * 405 - *********************************************************************/ 406 - 407 - #define CPUFREQ_DEBUG_CORE 1 408 - #define CPUFREQ_DEBUG_DRIVER 2 409 - #define CPUFREQ_DEBUG_GOVERNOR 4 410 - 411 - #ifdef CONFIG_CPU_FREQ_DEBUG 412 - 413 - extern void cpufreq_debug_printk(unsigned int type, const char *prefix, 414 - const char *fmt, ...); 415 - 416 - #else 417 - 418 - #define cpufreq_debug_printk(msg...) do { } while(0) 419 - 420 - #endif /* CONFIG_CPU_FREQ_DEBUG */ 421 399 422 400 #endif /* _LINUX_CPUFREQ_H */