aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/sc520_freq.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2011-03-27 09:04:46 -0400
committerDave Jones <davej@redhat.com>2011-05-04 11:50:57 -0400
commit2d06d8c49afdcc9bb35a85039fa50f0fe35bd40e (patch)
treed933a68fc71f6e2c3b95b744a87fa1d817bea3d6 /arch/x86/kernel/cpu/cpufreq/sc520_freq.c
parent27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 (diff)
[CPUFREQ] use dynamic debug instead of custom infrastructure
With dynamic debug having gained the capability to report debug messages also during the boot process, it offers a far superior interface for debug messages than the custom cpufreq infrastructure. As a first step, remove the old cpufreq_debug_printk() function and replace it with a call to the generic pr_debug() function. How can dynamic debug be used on cpufreq? You need a kernel which has CONFIG_DYNAMIC_DEBUG enabled. To enabled debugging during runtime, mount debugfs and $ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control for debugging the complete "cpufreq" module. To achieve the same goal during boot, append ddebug_query="module cpufreq +p" as a boot parameter to the kernel of your choice. For more detailled instructions, please see Documentation/dynamic-debug-howto.txt Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/sc520_freq.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/sc520_freq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c
index 435a996a613..1e205e6b172 100644
--- a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c
+++ b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c
@@ -29,8 +29,6 @@
29 29
30static __u8 __iomem *cpuctl; 30static __u8 __iomem *cpuctl;
31 31
32#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
33 "sc520_freq", msg)
34#define PFX "sc520_freq: " 32#define PFX "sc520_freq: "
35 33
36static struct cpufreq_frequency_table sc520_freq_table[] = { 34static struct cpufreq_frequency_table sc520_freq_table[] = {
@@ -66,7 +64,7 @@ static void sc520_freq_set_cpu_state(unsigned int state)
66 64
67 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 65 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
68 66
69 dprintk("attempting to set frequency to %i kHz\n", 67 pr_debug("attempting to set frequency to %i kHz\n",
70 sc520_freq_table[state].frequency); 68 sc520_freq_table[state].frequency);
71 69
72 local_irq_disable(); 70 local_irq_disable();
@@ -161,7 +159,7 @@ static int __init sc520_freq_init(void)
161 /* Test if we have the right hardware */ 159 /* Test if we have the right hardware */
162 if (c->x86_vendor != X86_VENDOR_AMD || 160 if (c->x86_vendor != X86_VENDOR_AMD ||
163 c->x86 != 4 || c->x86_model != 9) { 161 c->x86 != 4 || c->x86_model != 9) {
164 dprintk("no Elan SC520 processor found!\n"); 162 pr_debug("no Elan SC520 processor found!\n");
165 return -ENODEV; 163 return -ENODEV;
166 } 164 }
167 cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); 165 cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1);