aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 18:57:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 18:57:29 -0400
commitf8223b17550c427ac249124ff7f25722221f4591 (patch)
tree741c45fec1c747cb7866f016865822b44105d6df /arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
parent98a38a5d60a6e79eaad7f4a9b68cc1bd306ac5c0 (diff)
parent1a8e1463a49aaa452da1cefe184a00d4df47f1ef (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] remove redundant sprintf from request_module call. [CPUFREQ] cpufreq_stats.c: Fixed brace coding style issue [CPUFREQ] Fix memory leak in cpufreq_stat [CPUFREQ] cpufreq.h: Fix some checkpatch.pl coding style issues. [CPUFREQ] use dynamic debug instead of custom infrastructure [CPUFREQ] CPU hotplug, re-create sysfs directory and symlinks [CPUFREQ] Fix _OSC UUID in pcc-cpufreq
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
index 9b1ff37de46a..6ea3455def21 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -29,9 +29,6 @@
29#define PFX "speedstep-centrino: " 29#define PFX "speedstep-centrino: "
30#define MAINTAINER "cpufreq@vger.kernel.org" 30#define MAINTAINER "cpufreq@vger.kernel.org"
31 31
32#define dprintk(msg...) \
33 cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg)
34
35#define INTEL_MSR_RANGE (0xffff) 32#define INTEL_MSR_RANGE (0xffff)
36 33
37struct cpu_id 34struct cpu_id
@@ -244,7 +241,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
244 241
245 if (model->cpu_id == NULL) { 242 if (model->cpu_id == NULL) {
246 /* No match at all */ 243 /* No match at all */
247 dprintk("no support for CPU model \"%s\": " 244 pr_debug("no support for CPU model \"%s\": "
248 "send /proc/cpuinfo to " MAINTAINER "\n", 245 "send /proc/cpuinfo to " MAINTAINER "\n",
249 cpu->x86_model_id); 246 cpu->x86_model_id);
250 return -ENOENT; 247 return -ENOENT;
@@ -252,15 +249,15 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
252 249
253 if (model->op_points == NULL) { 250 if (model->op_points == NULL) {
254 /* Matched a non-match */ 251 /* Matched a non-match */
255 dprintk("no table support for CPU model \"%s\"\n", 252 pr_debug("no table support for CPU model \"%s\"\n",
256 cpu->x86_model_id); 253 cpu->x86_model_id);
257 dprintk("try using the acpi-cpufreq driver\n"); 254 pr_debug("try using the acpi-cpufreq driver\n");
258 return -ENOENT; 255 return -ENOENT;
259 } 256 }
260 257
261 per_cpu(centrino_model, policy->cpu) = model; 258 per_cpu(centrino_model, policy->cpu) = model;
262 259
263 dprintk("found \"%s\": max frequency: %dkHz\n", 260 pr_debug("found \"%s\": max frequency: %dkHz\n",
264 model->model_name, model->max_freq); 261 model->model_name, model->max_freq);
265 262
266 return 0; 263 return 0;
@@ -369,7 +366,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
369 per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; 366 per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i];
370 367
371 if (!per_cpu(centrino_cpu, policy->cpu)) { 368 if (!per_cpu(centrino_cpu, policy->cpu)) {
372 dprintk("found unsupported CPU with " 369 pr_debug("found unsupported CPU with "
373 "Enhanced SpeedStep: send /proc/cpuinfo to " 370 "Enhanced SpeedStep: send /proc/cpuinfo to "
374 MAINTAINER "\n"); 371 MAINTAINER "\n");
375 return -ENODEV; 372 return -ENODEV;
@@ -385,7 +382,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
385 382
386 if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { 383 if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) {
387 l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; 384 l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP;
388 dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); 385 pr_debug("trying to enable Enhanced SpeedStep (%x)\n", l);
389 wrmsr(MSR_IA32_MISC_ENABLE, l, h); 386 wrmsr(MSR_IA32_MISC_ENABLE, l, h);
390 387
391 /* check to see if it stuck */ 388 /* check to see if it stuck */
@@ -402,7 +399,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
402 /* 10uS transition latency */ 399 /* 10uS transition latency */
403 policy->cur = freq; 400 policy->cur = freq;
404 401
405 dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); 402 pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);
406 403
407 ret = cpufreq_frequency_table_cpuinfo(policy, 404 ret = cpufreq_frequency_table_cpuinfo(policy,
408 per_cpu(centrino_model, policy->cpu)->op_points); 405 per_cpu(centrino_model, policy->cpu)->op_points);
@@ -498,7 +495,7 @@ static int centrino_target (struct cpufreq_policy *policy,
498 good_cpu = j; 495 good_cpu = j;
499 496
500 if (good_cpu >= nr_cpu_ids) { 497 if (good_cpu >= nr_cpu_ids) {
501 dprintk("couldn't limit to CPUs in this domain\n"); 498 pr_debug("couldn't limit to CPUs in this domain\n");
502 retval = -EAGAIN; 499 retval = -EAGAIN;
503 if (first_cpu) { 500 if (first_cpu) {
504 /* We haven't started the transition yet. */ 501 /* We haven't started the transition yet. */
@@ -512,7 +509,7 @@ static int centrino_target (struct cpufreq_policy *policy,
512 if (first_cpu) { 509 if (first_cpu) {
513 rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h); 510 rdmsr_on_cpu(good_cpu, MSR_IA32_PERF_CTL, &oldmsr, &h);
514 if (msr == (oldmsr & 0xffff)) { 511 if (msr == (oldmsr & 0xffff)) {
515 dprintk("no change needed - msr was and needs " 512 pr_debug("no change needed - msr was and needs "
516 "to be %x\n", oldmsr); 513 "to be %x\n", oldmsr);
517 retval = 0; 514 retval = 0;
518 goto out; 515 goto out;
@@ -521,7 +518,7 @@ static int centrino_target (struct cpufreq_policy *policy,
521 freqs.old = extract_clock(oldmsr, cpu, 0); 518 freqs.old = extract_clock(oldmsr, cpu, 0);
522 freqs.new = extract_clock(msr, cpu, 0); 519 freqs.new = extract_clock(msr, cpu, 0);
523 520
524 dprintk("target=%dkHz old=%d new=%d msr=%04x\n", 521 pr_debug("target=%dkHz old=%d new=%d msr=%04x\n",
525 target_freq, freqs.old, freqs.new, msr); 522 target_freq, freqs.old, freqs.new, msr);
526 523
527 for_each_cpu(k, policy->cpus) { 524 for_each_cpu(k, policy->cpus) {