cpufreq: use pr_debug() consistently
Subsystems (6)
PATCH 2/2 cpufreq: use pr_debug() consistently
Consistently use pr_debug() as the debug printk statement, so that we can get rid of the now-obsolete cpufreq_debug_printk() re-directions.
Signed-off-by Dominik Brodowski <[email protected]>
--- arch/arm/mach-davinci/cpufreq.c | 4 +- arch/blackfin/mach-common/dpmc.c | 3 - arch/ia64/kernel/cpufreq/acpi-cpufreq.c | 44 +++++----- arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 45 +++++----- arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | 6 +- arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | 21 ++--- arch/x86/kernel/cpu/cpufreq/longhaul.c | 9 +-- arch/x86/kernel/cpu/cpufreq/longrun.c | 17 ++-- arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 10 +-- arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | 43 +++++----- arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 31 +++---- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 100 +++++++++++----------- arch/x86/kernel/cpu/cpufreq/powernow-k8.h | 2 - arch/x86/kernel/cpu/cpufreq/sc520_freq.c | 6 +- arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 23 ++--- arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | 28 +++---- arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | 43 +++++----- arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | 39 ++++----- drivers/acpi/processor_perflib.c | 6 +- drivers/cpufreq/cpufreq.c | 75 ++++++++--------- drivers/cpufreq/cpufreq_performance.c | 5 +- drivers/cpufreq/cpufreq_powersave.c | 5 +- drivers/cpufreq/cpufreq_userspace.c | 13 +-- drivers/cpufreq/freq_table.c | 19 ++--- include/linux/cpufreq.h | 10 -- 25 files changed, 266 insertions(+), 341 deletions(-)
arch/arm/mach-davinci/cpufreq.c +1 -3
@@ -94,9 +94,7 @@ static int davinci_target(struct cpufreq_policy *policy,if (freqs.old == freqs.new)return ret; -cpufreq_debug_printk (CPUFREQ_DEBUG_DRIVER , -dev_driver_string (cpufreq.dev), -"transition: %u --> %u\n" , freqs.old, freqs.new); +dev_dbg (&cpufreq.dev,"transition: %u --> %u\n" , freqs.old, freqs.new); ret =cpufreq_frequency_table_target (policy, pdata->freq_table, freqs.new, relation, &idx);
arch/blackfin/mach-common/dpmc.c +0 -3
@@ -19,9 +19,6 @@#define DRIVER_NAME "bfin dpmc" -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, DRIVER_NAME, msg) -struct bfin_dpmc_platform_data *pdata;/**
arch/ia64/kernel/cpufreq/acpi-cpufreq.c +21 -23
169 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +21 -24
163 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +2 -4
@@ -57,8 +57,6 @@ MODULE_PARM_DESC(min_fsb, "Minimum FSB to use, if not defined: current FSB - 50");#define PFX "cpufreq-nforce2: " -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "cpufreq-nforce2", msg)/** * nforce2_calc_fsb - calculate FSB
@@ -270,7 +268,7 @@ static int nforce2_target(struct cpufreq_policy *policy,if (freqs.old == freqs.new)return 0 ; -dprintk ("Old CPU frequency %d kHz, new %d kHz\n" , +pr_debug ("Old CPU frequency %d kHz, new %d kHz\n" , freqs.old, freqs.new);cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE );
@@ -282,7 +280,7 @@ static int nforce2_target(struct cpufreq_policy *policy, printk(KERN_ERR PFX "Changing FSB to %d failed\n", target_fsb); else - dprintk("Changed FSB successfully to %d\n", + pr_debug("Changed FSB successfully to %d\n", target_fsb);/* Enable IRQs */
arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +9 -12
@@ -142,9 +142,6 @@ module_param(max_duration, int, 0444);#define POLICY_MIN_DIV 20 -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "gx-suspmod", msg) -/** * we can detect a core multipiler from dir0_lsb * from GX1 datasheet p.56,
@@ -191,7 +188,7 @@ static __init struct pci_dev *gx_detect_chipset(void)/* check if CPU is a MediaGX or a Geode. */ if ((boot_cpu_data.x86_vendor !=X86_VENDOR_NSC ) && (boot_cpu_data.x86_vendor !=X86_VENDOR_CYRIX )) { -dprintk ("error: no MediaGX/Geode processor found!\n" ); +pr_debug ("error: no MediaGX/Geode processor found!\n" );return NULL ; }
@@ -201,7 +198,7 @@ static __init struct pci_dev *gx_detect_chipset(void)return gx_pci; } -dprintk ("error: no supported chipset found!\n" ); +pr_debug ("error: no supported chipset found!\n" );return NULL ; }
@@ -305,14 +302,14 @@ static void gx_set_cpuspeed(unsigned int khz)break ;default :local_irq_restore (flags); -dprintk ("fatal: try to set unknown chipset.\n" ); +pr_debug ("fatal: try to set unknown chipset.\n" );return ; } }else { suscfg = gx_params->pci_suscfg & ~(SUSMOD ); gx_params->off_duration =0 ; gx_params->on_duration =0 ; -dprintk ("suspend modulation disabled: cpu runs 100%% speed.\n" ); +pr_debug ("suspend modulation disabled: cpu runs 100%% speed.\n" ); }gx_write_byte (PCI_MODOFF , gx_params->off_duration);
@@ -327,9 +324,9 @@ static void gx_set_cpuspeed(unsigned int khz)cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); -dprintk ("suspend modulation w/ duration of ON:%d us, OFF:%d us\n" , +pr_debug ("suspend modulation w/ duration of ON:%d us, OFF:%d us\n" , gx_params->on_duration *32 , gx_params->off_duration *32 ); -dprintk ("suspend modulation w/ clock speed: %d kHz.\n" , freqs.new); +pr_debug ("suspend modulation w/ clock speed: %d kHz.\n" , freqs.new); }/****************************************************************
@@ -428,8 +425,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy) stock_freq = maxfreq; curfreq =gx_get_cpuspeed (0 ); -dprintk ("cpu max frequency is %d.\n" , maxfreq); -dprintk ("cpu current frequency is %dkHz.\n" , curfreq); +pr_debug ("cpu max frequency is %d.\n" , maxfreq); +pr_debug ("cpu current frequency is %dkHz.\n" , curfreq);/* setup basic struct for cpufreq API */ policy->cpu =0 ;
@@ -475,7 +472,7 @@ static int __init cpufreq_gx_init(void)if (max_duration >0xff ) max_duration =0xff ; -dprintk ("geode suspend modulation available.\n" ); +pr_debug ("geode suspend modulation available.\n" ); params =kzalloc (sizeof (struct gxfreq_params ),GFP_KERNEL );if (params ==NULL )
arch/x86/kernel/cpu/cpufreq/longhaul.c +3 -6
@@ -77,9 +77,6 @@ static int scale_voltage;static int disable_acpi_c3;static int revid_errata; -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "longhaul", msg) -/* Clock ratios multiplied by 10 */ static int mults[32 ];
@@ -275,7 +272,7 @@ static void longhaul_setstate(unsigned int table_index)cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE ); -dprintk ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n" , +pr_debug ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n" , fsb, mult/10 , mult%10 ,print_speed (speed/1000 )); retry_loop:preempt_disable ();
@@ -460,12 +457,12 @@ static int __cpuinit longhaul_get_ranges(void)break ; } -dprintk ("MinMult:%d.%dx MaxMult:%d.%dx\n" , +pr_debug ("MinMult:%d.%dx MaxMult:%d.%dx\n" , minmult/10 , minmult%10 , maxmult/10 , maxmult%10 ); highest_speed =calc_speed (maxmult); lowest_speed =calc_speed (minmult); -dprintk ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n" , fsb, +pr_debug ("FSB:%dMHz Lowest speed: %s Highest speed:%s\n" , fsb,print_speed (lowest_speed/1000 ),print_speed (highest_speed/1000 ));
arch/x86/kernel/cpu/cpufreq/longrun.c +7 -10
@@ -15,9 +15,6 @@#include <asm/msr.h> #include <asm/processor.h> -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "longrun", msg) -static struct cpufreq_driver longrun_driver;/**
@@ -40,14 +37,14 @@ static void __cpuinit longrun_get_policy(struct cpufreq_policy *policy)u32 msr_lo, msr_hi;rdmsr (MSR_TMTA_LONGRUN_FLAGS , msr_lo, msr_hi); -dprintk ("longrun flags are %x - %x\n" , msr_lo, msr_hi); +pr_debug ("longrun flags are %x - %x\n" , msr_lo, msr_hi);if (msr_lo &0x01 ) policy->policy =CPUFREQ_POLICY_PERFORMANCE ;else policy->policy =CPUFREQ_POLICY_POWERSAVE ;rdmsr (MSR_TMTA_LONGRUN_CTRL , msr_lo, msr_hi); -dprintk ("longrun ctrl is %x - %x\n" , msr_lo, msr_hi); +pr_debug ("longrun ctrl is %x - %x\n" , msr_lo, msr_hi); msr_lo &=0x0000007F ; msr_hi &=0x0000007F ;
@@ -150,7 +147,7 @@ static unsigned int longrun_get(unsigned int cpu)return 0 ;cpuid (0x80860007 , &eax, &ebx, &ecx, &edx); -dprintk ("cpuid eax is %u\n" , eax); +pr_debug ("cpuid eax is %u\n" , eax);return eax *1000 ; }
@@ -196,7 +193,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq,rdmsr (MSR_TMTA_LRTI_VOLT_MHZ , msr_lo, msr_hi); *high_freq = msr_lo *1000 ;/* to kHz */ -dprintk ("longrun table interface told %u - %u kHz\n" , +pr_debug ("longrun table interface told %u - %u kHz\n" , *low_freq, *high_freq);if (*low_freq > *high_freq)
@@ -207,7 +204,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq,/* set the upper border to the value determined during TSC init */ *high_freq = (cpu_khz /1000 ); *high_freq = *high_freq *1000 ; -dprintk ("high frequency is %u kHz\n" , *high_freq); +pr_debug ("high frequency is %u kHz\n" , *high_freq);/* get current borders */ rdmsr (MSR_TMTA_LONGRUN_CTRL , msr_lo, msr_hi);
@@ -233,7 +230,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq,/* restore values */ wrmsr (MSR_TMTA_LONGRUN_CTRL , save_lo, save_hi); } -dprintk ("percentage is %u %%, freq is %u MHz\n" , ecx, eax); +pr_debug ("percentage is %u %%, freq is %u MHz\n" , ecx, eax);/* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq) * eqals
@@ -249,7 +246,7 @@ static int __cpuinit longrun_determine_freqs(unsigned int *low_freq, edx = ((eax - ebx) *100 ) / (100 - ecx); *low_freq = edx *1000 ;/* back to kHz */ -dprintk ("low frequency is %u kHz\n" , *low_freq); +pr_debug ("low frequency is %u kHz\n" , *low_freq);if (*low_freq > *high_freq) *low_freq = *high_freq;
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +4 -6
@@ -35,8 +35,6 @@#include "speedstep-lib.h" #define PFX "p4-clockmod: " -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "p4-clockmod", msg)/* * Duty Cycle (3bits), note DC_DISABLE is not specified in
@@ -66,7 +64,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate)rdmsr_on_cpu (cpu,MSR_IA32_THERM_STATUS , &l, &h);if (l &0x01 ) -dprintk ("CPU#%d currently thermal throttled\n" , cpu); +pr_debug ("CPU#%d currently thermal throttled\n" , cpu);if (has_N44_O17_errata[cpu] && (newstate ==DC_25PT || newstate ==DC_DFLT ))
@@ -74,10 +72,10 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate)rdmsr_on_cpu (cpu,MSR_IA32_THERM_CONTROL , &l, &h);if (newstate ==DC_DISABLE ) { -dprintk ("CPU#%d disabling modulation\n" , cpu); +pr_debug ("CPU#%d disabling modulation\n" , cpu);wrmsr_on_cpu (cpu,MSR_IA32_THERM_CONTROL , l & ~(1 <<4 ), h); }else { -dprintk ("CPU#%d setting duty cycle to %d%%\n" , +pr_debug ("CPU#%d setting duty cycle to %d%%\n" , cpu, ((125 * newstate) /10 ));/* bits 63 - 5 : reserved * bit 4 : enable/disable
@@ -217,7 +215,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)case 0x0f11 :case 0x0f12 : has_N44_O17_errata[policy->cpu] =1 ; -dprintk ("has errata -- disabling low frequencies\n" ); +pr_debug ("has errata -- disabling low frequencies\n" ); } if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D &&
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +20 -23
159 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/powernow-k7.c +14 -17
@@ -103,9 +103,6 @@ static unsigned int fsb;static unsigned int latency;static char have_a0; -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "powernow-k7", msg) -static int check_fsb (unsigned int fsbspeed) {int delta;
@@ -209,7 +206,7 @@ static int get_ranges(unsigned char *pst) vid = *pst++; powernow_table[j].index |= (vid <<8 );/* upper 8 bits */ - dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " + pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, fid_codes[fid] % 10, speed/1000, vid, mobile_vid_table[vid]/1000,
@@ -367,7 +364,7 @@ static int powernow_acpi_init(void)unsigned int speed, speed_mhz; pc.val = (unsigned long ) state->control; - dprintk("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", + pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n", i, (u32) state->core_frequency, (u32) state->power,
@@ -401,7 +398,7 @@ static int powernow_acpi_init(void)invalidate_entry (i); } - dprintk(" FID: 0x%x (%d.%dx [%dMHz]) " + pr_debug(" FID: 0x%x (%d.%dx [%dMHz]) " "VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10, fid_codes[fid] % 10, speed_mhz, vid, mobile_vid_table[vid]/1000,
@@ -409,7 +406,7 @@ static int powernow_acpi_init(void)if (state->core_frequency != speed_mhz) { state->core_frequency = speed_mhz; -dprintk (" Corrected ACPI frequency to %d\n" , +pr_debug (" Corrected ACPI frequency to %d\n" , speed_mhz); }
@@ -453,8 +450,8 @@ static int powernow_acpi_init(void)static void print_pst_entry (struct pst_s *pst,unsigned int j) { -dprintk ("PST:%d (@%p)\n" , j, pst); -dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n" , +pr_debug ("PST:%d (@%p)\n" , j, pst); +pr_debug (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n" , pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); }
@@ -474,20 +471,20 @@ static int powernow_decode_bios(int maxfid, int startvid) p =phys_to_virt (i);if (memcmp (p,"AMDK7PNOW!" ,10 ) ==0 ) { -dprintk ("Found PSB header at %p\n" , p); +pr_debug ("Found PSB header at %p\n" , p); psb = (struct psb_s *) p; -dprintk ("Table version: 0x%x\n" , psb->tableversion); +pr_debug ("Table version: 0x%x\n" , psb->tableversion);if (psb->tableversion !=0x12 ) { printk(KERN_INFO PFX "Sorry, only v1.2 tables" " supported right now\n");return -ENODEV ; } -dprintk ("Flags: 0x%x\n" , psb->flags); +pr_debug ("Flags: 0x%x\n" , psb->flags);if ((psb->flags &1 ) ==0 ) -dprintk ("Mobile voltage regulator\n" ); +pr_debug ("Mobile voltage regulator\n" );else -dprintk ("Desktop voltage regulator\n" ); +pr_debug ("Desktop voltage regulator\n" ); latency = psb->settlingtime;if (latency <100 ) {
@@ -497,9 +494,9 @@ static int powernow_decode_bios(int maxfid, int startvid) "Correcting.\n", latency); latency =100 ; } -dprintk ("Settling Time: %d microseconds.\n" , +pr_debug ("Settling Time: %d microseconds.\n" , psb->settlingtime); -dprintk ("Has %d PST tables. (Only dumping ones " +pr_debug ("Has %d PST tables. (Only dumping ones " "relevant to this CPU).\n" , psb->numpst);
@@ -650,7 +647,7 @@ static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy) printk(KERN_WARNING PFX "can not determine bus frequency\n");return -EINVAL ; } -dprintk ("FSB: %3dMHz\n" , fsb/1000 ); +pr_debug ("FSB: %3dMHz\n" , fsb/1000 );if (dmi_check_system (powernow_dmi_table) || acpi_force) { printk(KERN_INFO PFX "PSB/PST known to be broken. "
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +50 -50
344 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/powernow-k8.h +0 -2
@@ -211,8 +211,6 @@ struct pst_s {u8 vid; }; -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "powernow-k8", msg) -static int core_voltage_pre_transition (struct powernow_k8_data *data,u32 reqvid,u32 regfid);static int core_voltage_post_transition (struct powernow_k8_data *data,u32 reqvid);
arch/x86/kernel/cpu/cpufreq/sc520_freq.c +2 -4
@@ -29,8 +29,6 @@static __u8 __iomem *cpuctl; -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "sc520_freq", msg)#define PFX "sc520_freq: "static struct cpufreq_frequency_table sc520_freq_table[] = {
@@ -66,7 +64,7 @@ static void sc520_freq_set_cpu_state(unsigned int state)cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE ); -dprintk ("attempting to set frequency to %i kHz\n" , +pr_debug ("attempting to set frequency to %i kHz\n" , sc520_freq_table[state].frequency);local_irq_disable ();
@@ -161,7 +159,7 @@ static int __init sc520_freq_init(void)/* Test if we have the right hardware */ if (c->x86_vendor !=X86_VENDOR_AMD || c->x86 !=4 || c->x86_model !=9 ) { -dprintk ("no Elan SC520 processor found!\n" ); +pr_debug ("no Elan SC520 processor found!\n" );return -ENODEV ; } cpuctl =ioremap ((unsigned long )(MMCR_BASE +OFFS_CPUCTL ),1 );
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +10 -13
@@ -29,9 +29,6 @@#define PFX "speedstep-centrino: "#define MAINTAINER "[email protected]" -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) -#define INTEL_MSR_RANGE (0xffff)struct cpu_id
@@ -244,7 +241,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)if (model->cpu_id ==NULL ) {/* No match at all */ -dprintk ("no support for CPU model \"%s\": " +pr_debug ("no support for CPU model \"%s\": " "send /proc/cpuinfo to " MAINTAINER "\n" , cpu->x86_model_id);return -ENOENT ;
@@ -252,15 +249,15 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)if (model->op_points ==NULL ) {/* Matched a non-match */ -dprintk ("no table support for CPU model \"%s\"\n" , +pr_debug ("no table support for CPU model \"%s\"\n" , cpu->x86_model_id); -dprintk ("try using the acpi-cpufreq driver\n" ); +pr_debug ("try using the acpi-cpufreq driver\n" );return -ENOENT ; }per_cpu (centrino_model, policy->cpu) = model; -dprintk ("found \"%s\": max frequency: %dkHz\n" , +pr_debug ("found \"%s\": max frequency: %dkHz\n" , model->model_name, model->max_freq);return 0 ;
@@ -369,7 +366,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)per_cpu (centrino_cpu, policy->cpu) = &cpu_ids[i];if (!per_cpu (centrino_cpu, policy->cpu)) { -dprintk ("found unsupported CPU with " +pr_debug ("found unsupported CPU with " "Enhanced SpeedStep: send /proc/cpuinfo to " MAINTAINER "\n" );return -ENODEV ;
@@ -385,7 +382,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)if (!(l &MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP )) { l |=MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP ; -dprintk ("trying to enable Enhanced SpeedStep (%x)\n" , l); +pr_debug ("trying to enable Enhanced SpeedStep (%x)\n" , l);wrmsr (MSR_IA32_MISC_ENABLE , l, h);/* check to see if it stuck */
@@ -402,7 +399,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)/* 10uS transition latency */ policy->cur = freq; -dprintk ("centrino_cpu_init: cur=%dkHz\n" , policy->cur); +pr_debug ("centrino_cpu_init: cur=%dkHz\n" , policy->cur); ret =cpufreq_frequency_table_cpuinfo (policy,per_cpu (centrino_model, policy->cpu)->op_points);
@@ -498,7 +495,7 @@ static int centrino_target (struct cpufreq_policy *policy, good_cpu = j;if (good_cpu >= nr_cpu_ids) { -dprintk ("couldn't limit to CPUs in this domain\n" ); +pr_debug ("couldn't limit to CPUs in this domain\n" ); retval = -EAGAIN ;if (first_cpu) {/* We haven't started the transition yet. */
@@ -512,7 +509,7 @@ static int centrino_target (struct cpufreq_policy *policy,if (first_cpu) {rdmsr_on_cpu (good_cpu,MSR_IA32_PERF_CTL , &oldmsr, &h);if (msr == (oldmsr &0xffff )) { -dprintk ("no change needed - msr was and needs " +pr_debug ("no change needed - msr was and needs " "to be %x\n" , oldmsr); retval =0 ; goto out;
@@ -521,7 +518,7 @@ static int centrino_target (struct cpufreq_policy *policy, freqs.old =extract_clock (oldmsr, cpu,0 ); freqs.new =extract_clock (msr, cpu,0 ); -dprintk ("target=%dkHz old=%d new=%d msr=%04x\n" , +pr_debug ("target=%dkHz old=%d new=%d msr=%04x\n" , target_freq, freqs.old, freqs.new, msr);for_each_cpu (k, policy->cpus) {
arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +12 -16
@@ -53,10 +53,6 @@ static struct cpufreq_frequency_table speedstep_freqs[] = { }; -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "speedstep-ich", msg) - -/** * speedstep_find_register - read the PMBASE address *
@@ -80,7 +76,7 @@ static int speedstep_find_register(void)return -ENODEV ; } -dprintk ("pmbase is 0x%x\n" , pmbase); +pr_debug ("pmbase is 0x%x\n" , pmbase);return 0 ; }
@@ -106,13 +102,13 @@ static void speedstep_set_state(unsigned int state)/* read state */ value =inb (pmbase +0x50 ); -dprintk ("read at pmbase 0x%x + 0x50 returned 0x%x\n" , pmbase, value); +pr_debug ("read at pmbase 0x%x + 0x50 returned 0x%x\n" , pmbase, value);/* write new state */ value &=0xFE ; value |= state; -dprintk ("writing 0x%x to pmbase 0x%x + 0x50\n" , value, pmbase); +pr_debug ("writing 0x%x to pmbase 0x%x + 0x50\n" , value, pmbase);/* Disable bus master arbitration */ pm2_blk =inb (pmbase +0x20 );
@@ -132,10 +128,10 @@ static void speedstep_set_state(unsigned int state)/* Enable IRQs */ local_irq_restore (flags); -dprintk ("read at pmbase 0x%x + 0x50 returned 0x%x\n" , pmbase, value); +pr_debug ("read at pmbase 0x%x + 0x50 returned 0x%x\n" , pmbase, value);if (state == (value &0x1 )) -dprintk ("change to %u MHz succeeded\n" , +pr_debug ("change to %u MHz succeeded\n" ,speedstep_get_frequency (speedstep_processor) /1000 );else printk (KERN_ERR "cpufreq: change failed - I/O error\n" );
@@ -165,7 +161,7 @@ static int speedstep_activate(void)pci_read_config_word (speedstep_chipset_dev,0x00A0 , &value);if (!(value &0x08 )) { value |=0x08 ; -dprintk ("activating SpeedStep (TM) registers\n" ); +pr_debug ("activating SpeedStep (TM) registers\n" );pci_write_config_word (speedstep_chipset_dev,0x00A0 , value); }
@@ -218,7 +214,7 @@ static unsigned int speedstep_detect_chipset(void)return 2 ;/* 2-M */ if (hostbridge->revision <5 ) { -dprintk ("hostbridge does not support speedstep\n" ); +pr_debug ("hostbridge does not support speedstep\n" ); speedstep_chipset_dev =NULL ;pci_dev_put (hostbridge);return 0 ;
@@ -246,7 +242,7 @@ static unsigned int speedstep_get(unsigned int cpu)if (smp_call_function_single (cpu, get_freq_data, &speed,1 ) !=0 )BUG (); -dprintk ("detected %u kHz as current frequency\n" , speed); +pr_debug ("detected %u kHz as current frequency\n" , speed);return speed; }
@@ -276,7 +272,7 @@ static int speedstep_target(struct cpufreq_policy *policy, freqs.new = speedstep_freqs[newstate].frequency; freqs.cpu = policy->cpu; -dprintk ("transiting from %u to %u kHz\n" , freqs.old, freqs.new); +pr_debug ("transiting from %u to %u kHz\n" , freqs.old, freqs.new);/* no transition necessary */ if (freqs.old == freqs.new)
@@ -351,7 +347,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)if (!speed)return -EIO ; -dprintk ("currently at %s speed setting - %i MHz\n" , +pr_debug ("currently at %s speed setting - %i MHz\n" , (speed == speedstep_freqs[SPEEDSTEP_LOW ].frequency) ?"low" :"high" , (speed /1000 ));
@@ -405,14 +401,14 @@ static int __init speedstep_init(void)/* detect processor */ speedstep_processor =speedstep_detect_processor ();if (!speedstep_processor) { -dprintk ("Intel(R) SpeedStep(TM) capable processor " +pr_debug ("Intel(R) SpeedStep(TM) capable processor " "not found\n" );return -ENODEV ; }/* detect chipset */ if (!speedstep_detect_chipset ()) { -dprintk ("Intel(R) SpeedStep(TM) for this chipset not " +pr_debug ("Intel(R) SpeedStep(TM) for this chipset not " "(yet) available.\n" );return -ENODEV ; }
arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +20 -23
164 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +18 -21
@@ -55,9 +55,6 @@ static struct cpufreq_frequency_table speedstep_freqs[] = {* of DMA activity going on? */ #define SMI_TRIES 5 -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \ - "speedstep-smi", msg) -/** * speedstep_smi_ownership */
@@ -70,7 +67,7 @@ static int speedstep_smi_ownership(void) command = (smi_sig &0xffffff00 ) | (smi_cmd &0xff ); magic =virt_to_phys (magic_data); -dprintk ("trying to obtain ownership with command %x at port %x\n" , +pr_debug ("trying to obtain ownership with command %x at port %x\n" , command, smi_port); __asm__ __volatile__(
@@ -85,7 +82,7 @@ static int speedstep_smi_ownership(void) : "memory" ); -dprintk ("result is %x\n" , result); +pr_debug ("result is %x\n" , result);return result; }
@@ -106,13 +103,13 @@ static int speedstep_smi_get_freqs(unsigned int *low, unsigned int *high)u32 function =GET_SPEEDSTEP_FREQS ;if (!(ist_info.event &0xFFFF )) { -dprintk ("bug #1422 -- can't read freqs from BIOS\n" ); +pr_debug ("bug #1422 -- can't read freqs from BIOS\n" );return -ENODEV ; } command = (smi_sig &0xffffff00 ) | (smi_cmd &0xff ); -dprintk ("trying to determine frequencies with command %x at port %x\n" , +pr_debug ("trying to determine frequencies with command %x at port %x\n" , command, smi_port); __asm__ __volatile__(
@@ -129,7 +126,7 @@ static int speedstep_smi_get_freqs(unsigned int *low, unsigned int *high)"d" (smi_port),"S" (0 ),"D" (0 ) ); -dprintk ("result %x, low_freq %u, high_freq %u\n" , +pr_debug ("result %x, low_freq %u, high_freq %u\n" , result, low_mhz, high_mhz);/* abort if results are obviously incorrect... */
@@ -154,7 +151,7 @@ static int speedstep_get_state(void) command = (smi_sig &0xffffff00 ) | (smi_cmd &0xff ); -dprintk ("trying to determine current setting with command %x " +pr_debug ("trying to determine current setting with command %x " "at port %x\n" , command, smi_port); __asm__ __volatile__(
@@ -168,7 +165,7 @@ static int speedstep_get_state(void)"d" (smi_port),"S" (0 ),"D" (0 ) ); -dprintk ("state is %x, result is %x\n" , state, result); +pr_debug ("state is %x, result is %x\n" , state, result);return state &1 ; }
@@ -194,13 +191,13 @@ static void speedstep_set_state(unsigned int state) command = (smi_sig &0xffffff00 ) | (smi_cmd &0xff ); -dprintk ("trying to set frequency to state %u " +pr_debug ("trying to set frequency to state %u " "with command %x at port %x\n" , state, command, smi_port); do { if (retry) { - dprintk("retry %u, previous result %u, waiting...\n", + pr_debug("retry %u, previous result %u, waiting...\n", retry, result); mdelay(retry * 50); }
@@ -221,7 +218,7 @@ static void speedstep_set_state(unsigned int state)local_irq_restore (flags);if (new_state == state) -dprintk ("change to %u MHz succeeded after %u tries " +pr_debug ("change to %u MHz succeeded after %u tries " "with result %u\n" , (speedstep_freqs[new_state].frequency /1000 ), retry, result);
@@ -292,7 +289,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) result =speedstep_smi_ownership ();if (result) { -dprintk ("fails in acquiring ownership of a SMI interface.\n" ); +pr_debug ("fails in acquiring ownership of a SMI interface.\n" );return -EINVAL ; }
@@ -304,7 +301,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)if (result) {/* fall back to speedstep_lib.c dection mechanism: * try both states out */ -dprintk ("could not detect low and high frequencies " +pr_debug ("could not detect low and high frequencies " "by SMI call.\n" ); result = speedstep_get_freqs(speedstep_processor, low, high,
@@ -312,18 +309,18 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) &speedstep_set_state);if (result) { -dprintk ("could not detect two different speeds" +pr_debug ("could not detect two different speeds" " -- aborting.\n" );return result; }else -dprintk ("workaround worked.\n" ); +pr_debug ("workaround worked.\n" ); }/* get current speed setting */ state =speedstep_get_state (); speed = speedstep_freqs[state].frequency; -dprintk ("currently at %s speed setting - %i MHz\n" , +pr_debug ("currently at %s speed setting - %i MHz\n" , (speed == speedstep_freqs[SPEEDSTEP_LOW ].frequency) ?"low" :"high" , (speed /1000 ));
@@ -360,7 +357,7 @@ static int speedstep_resume(struct cpufreq_policy *policy)int result =speedstep_smi_ownership ();if (result) -dprintk ("fails in re-acquiring ownership of a SMI interface.\n" ); +pr_debug ("fails in re-acquiring ownership of a SMI interface.\n" );return result; }
@@ -403,11 +400,11 @@ static int __init speedstep_init(void) }if (!speedstep_processor) { -dprintk ("No supported Intel CPU detected.\n" ); +pr_debug ("No supported Intel CPU detected.\n" );return -ENODEV ; } -dprintk ("signature:0x%.8lx, command:0x%.8lx, " +pr_debug ("signature:0x%.8lx, command:0x%.8lx, " "event:0x%.8lx, perf_level:0x%.8lx.\n" , ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
drivers/acpi/processor_perflib.c +1 -5
@@ -49,10 +49,6 @@ ACPI_MODULE_NAME("processor_perflib");static DEFINE_MUTEX (performance_mutex); -/* Use cpufreq debug layer for _PPC changes. */ -#define cpufreq_printk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \ - "cpufreq-core", msg) -/* * _PPC support is implemented as a CPUfreq policy notifier: * This means each time a CPUfreq driver registered also with
@@ -145,7 +141,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)return -ENODEV ; } -cpufreq_printk ("CPU %d: _PPC is %d - frequency %s limited\n" , pr->id, +pr_debug ("CPU %d: _PPC is %d - frequency %s limited\n" , pr->id, (int )ppc, ppc ?"" :"not" ); pr->performance_platform_limit = (int )ppc;
drivers/cpufreq/cpufreq.c +36 -39
290 lines not on this page · raw message
drivers/cpufreq/cpufreq_performance.c +1 -4
@@ -15,9 +15,6 @@#include <linux/cpufreq.h> #include <linux/init.h> -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "performance", msg) -static int cpufreq_governor_performance (struct cpufreq_policy *policy,unsigned int event)
@@ -25,7 +22,7 @@ static int cpufreq_governor_performance(struct cpufreq_policy *policy,switch (event) {case CPUFREQ_GOV_START :case CPUFREQ_GOV_LIMITS : -dprintk ("setting to %u kHz because of event %u\n" , +pr_debug ("setting to %u kHz because of event %u\n" , policy->max, event);__cpufreq_driver_target (policy, policy->max,CPUFREQ_RELATION_H );
drivers/cpufreq/cpufreq_powersave.c +1 -4
@@ -15,16 +15,13 @@#include <linux/cpufreq.h> #include <linux/init.h> -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "powersave", msg) -static int cpufreq_governor_powersave (struct cpufreq_policy *policy,unsigned int event) {switch (event) {case CPUFREQ_GOV_START :case CPUFREQ_GOV_LIMITS : -dprintk ("setting to %u kHz because of event %u\n" , +pr_debug ("setting to %u kHz because of event %u\n" , policy->min, event);__cpufreq_driver_target (policy, policy->min,CPUFREQ_RELATION_L );
drivers/cpufreq/cpufreq_userspace.c +5 -8
@@ -37,9 +37,6 @@ static DEFINE_PER_CPU(unsigned int, cpu_is_managed);static DEFINE_MUTEX (userspace_mutex);static int cpus_using_userspace_governor; -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_GOVERNOR, "userspace", msg) -/* keep track of frequency transitions */ static int userspace_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
@@ -50,7 +47,7 @@ userspace_cpufreq_notifier(struct notifier_block *nb, unsigned long val,if (!per_cpu (cpu_is_managed, freq->cpu))return 0 ; -dprintk ("saving cpu_cur_freq of cpu %u to be %u kHz\n" , +pr_debug ("saving cpu_cur_freq of cpu %u to be %u kHz\n" , freq->cpu, freq->new);per_cpu (cpu_cur_freq, freq->cpu) = freq->new;
@@ -73,7 +70,7 @@ static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq) {int ret = -EINVAL ; -dprintk ("cpufreq_set for cpu %u, freq %u kHz\n" , policy->cpu, freq); +pr_debug ("cpufreq_set for cpu %u, freq %u kHz\n" , policy->cpu, freq);mutex_lock (&userspace_mutex);if (!per_cpu (cpu_is_managed, policy->cpu))
@@ -134,7 +131,7 @@ static int cpufreq_governor_userspace(struct cpufreq_policy *policy,per_cpu (cpu_max_freq, cpu) = policy->max;per_cpu (cpu_cur_freq, cpu) = policy->cur;per_cpu (cpu_set_freq, cpu) = policy->cur; - dprintk("managing cpu %u started " + pr_debug("managing cpu %u started " "(%u - %u kHz, currently %u kHz)\n", cpu, per_cpu(cpu_min_freq, cpu),
@@ -156,12 +153,12 @@ static int cpufreq_governor_userspace(struct cpufreq_policy *policy,per_cpu (cpu_min_freq, cpu) =0 ;per_cpu (cpu_max_freq, cpu) =0 ;per_cpu (cpu_set_freq, cpu) =0 ; -dprintk ("managing cpu %u stopped\n" , cpu); +pr_debug ("managing cpu %u stopped\n" , cpu);mutex_unlock (&userspace_mutex);break ;case CPUFREQ_GOV_LIMITS :mutex_lock (&userspace_mutex); - dprintk("limit event for cpu %u: %u - %u kHz, " + pr_debug("limit event for cpu %u: %u - %u kHz, " "currently %u kHz, last set to %u kHz\n", cpu, policy->min, policy->max, per_cpu(cpu_cur_freq, cpu),
drivers/cpufreq/freq_table.c +8 -11
@@ -14,9 +14,6 @@#include <linux/init.h> #include <linux/cpufreq.h> -#define dprintk(msg...) \ - cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, "freq-table", msg) -/********************************************************************* * FREQUENCY TABLE HELPERS * *********************************************************************/
@@ -31,11 +28,11 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,for (i =0 ; (table[i].frequency !=CPUFREQ_TABLE_END ); i++) {unsigned int freq = table[i].frequency;if (freq ==CPUFREQ_ENTRY_INVALID ) { -dprintk ("table entry %u is invalid, skipping\n" , i); +pr_debug ("table entry %u is invalid, skipping\n" , i);continue ; } -dprintk ("table entry %u: %u kHz, %u index\n" , +pr_debug ("table entry %u: %u kHz, %u index\n" , i, freq, table[i].index);if (freq < min_freq) min_freq = freq;
@@ -61,7 +58,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,unsigned int i;unsigned int count =0 ; -dprintk ("request for verification of policy (%u - %u kHz) for cpu %u\n" , +pr_debug ("request for verification of policy (%u - %u kHz) for cpu %u\n" , policy->min, policy->max, policy->cpu);if (!cpu_online (policy->cpu))
@@ -86,7 +83,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,cpufreq_verify_within_limits (policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); -dprintk ("verification lead to (%u - %u kHz) for cpu %u\n" , +pr_debug ("verification lead to (%u - %u kHz) for cpu %u\n" , policy->min, policy->max, policy->cpu);return 0 ;
@@ -110,7 +107,7 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, };unsigned int i; -dprintk ("request for target %u kHz (relation: %u) for cpu %u\n" , +pr_debug ("request for target %u kHz (relation: %u) for cpu %u\n" , target_freq, relation, policy->cpu);switch (relation) {
@@ -167,7 +164,7 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, }else *index = optimal.index; -dprintk ("target is %u (%u kHz, %u)\n" , *index, table[*index].frequency, +pr_debug ("target is %u (%u kHz, %u)\n" , *index, table[*index].frequency, table[*index].index);return 0 ;
@@ -216,14 +213,14 @@ EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);void cpufreq_frequency_table_get_attr (struct cpufreq_frequency_table *table,unsigned int cpu) { -dprintk ("setting show_table for cpu %u to %p\n" , cpu, table); +pr_debug ("setting show_table for cpu %u to %p\n" , cpu, table);per_cpu (cpufreq_show_table, cpu) = table; }EXPORT_SYMBOL_GPL (cpufreq_frequency_table_get_attr);void cpufreq_frequency_table_put_attr (unsigned int cpu) { -dprintk ("clearing show_table for cpu %u\n" , cpu); +pr_debug ("clearing show_table for cpu %u\n" , cpu);per_cpu (cpufreq_show_table, cpu) =NULL ; }EXPORT_SYMBOL_GPL (cpufreq_frequency_table_put_attr);
include/linux/cpufreq.h +0 -10
@@ -397,14 +397,4 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,void cpufreq_frequency_table_put_attr (unsigned int cpu); -/********************************************************************* -* UNIFIED DEBUG HELPERS * -*********************************************************************/ - -#define CPUFREQ_DEBUG_CORE 1 -#define CPUFREQ_DEBUG_DRIVER 2 -#define CPUFREQ_DEBUG_GOVERNOR 4 - -#define cpufreq_debug_printk(type, msg...) pr_debug(msg) -#endif /* _LINUX_CPUFREQ_H */
Signature · 1 line
1.7.1