aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/idle/intel_idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/idle/intel_idle.c')
-rw-r--r--drivers/idle/intel_idle.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 216d7ec88c0c..c2ae819a871c 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -51,6 +51,8 @@
51/* un-comment DEBUG to enable pr_debug() statements */ 51/* un-comment DEBUG to enable pr_debug() statements */
52#define DEBUG 52#define DEBUG
53 53
54#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
55
54#include <linux/kernel.h> 56#include <linux/kernel.h>
55#include <linux/cpuidle.h> 57#include <linux/cpuidle.h>
56#include <linux/tick.h> 58#include <linux/tick.h>
@@ -65,7 +67,6 @@
65#include <asm/msr.h> 67#include <asm/msr.h>
66 68
67#define INTEL_IDLE_VERSION "0.4.1" 69#define INTEL_IDLE_VERSION "0.4.1"
68#define PREFIX "intel_idle: "
69 70
70static struct cpuidle_driver intel_idle_driver = { 71static struct cpuidle_driver intel_idle_driver = {
71 .name = "intel_idle", 72 .name = "intel_idle",
@@ -1111,7 +1112,7 @@ static int __init intel_idle_probe(void)
1111 const struct x86_cpu_id *id; 1112 const struct x86_cpu_id *id;
1112 1113
1113 if (max_cstate == 0) { 1114 if (max_cstate == 0) {
1114 pr_debug(PREFIX "disabled\n"); 1115 pr_debug("disabled\n");
1115 return -EPERM; 1116 return -EPERM;
1116 } 1117 }
1117 1118
@@ -1119,8 +1120,8 @@ static int __init intel_idle_probe(void)
1119 if (!id) { 1120 if (!id) {
1120 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && 1121 if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
1121 boot_cpu_data.x86 == 6) 1122 boot_cpu_data.x86 == 6)
1122 pr_debug(PREFIX "does not run on family %d model %d\n", 1123 pr_debug("does not run on family %d model %d\n",
1123 boot_cpu_data.x86, boot_cpu_data.x86_model); 1124 boot_cpu_data.x86, boot_cpu_data.x86_model);
1124 return -ENODEV; 1125 return -ENODEV;
1125 } 1126 }
1126 1127
@@ -1134,13 +1135,13 @@ static int __init intel_idle_probe(void)
1134 !mwait_substates) 1135 !mwait_substates)
1135 return -ENODEV; 1136 return -ENODEV;
1136 1137
1137 pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates); 1138 pr_debug("MWAIT substates: 0x%x\n", mwait_substates);
1138 1139
1139 icpu = (const struct idle_cpu *)id->driver_data; 1140 icpu = (const struct idle_cpu *)id->driver_data;
1140 cpuidle_state_table = icpu->state_table; 1141 cpuidle_state_table = icpu->state_table;
1141 1142
1142 pr_debug(PREFIX "v" INTEL_IDLE_VERSION 1143 pr_debug("v" INTEL_IDLE_VERSION " model 0x%X\n",
1143 " model 0x%X\n", boot_cpu_data.x86_model); 1144 boot_cpu_data.x86_model);
1144 1145
1145 return 0; 1146 return 0;
1146} 1147}
@@ -1340,8 +1341,7 @@ static void __init intel_idle_cpuidle_driver_init(void)
1340 break; 1341 break;
1341 1342
1342 if (cstate + 1 > max_cstate) { 1343 if (cstate + 1 > max_cstate) {
1343 printk(PREFIX "max_cstate %d reached\n", 1344 pr_info("max_cstate %d reached\n", max_cstate);
1344 max_cstate);
1345 break; 1345 break;
1346 } 1346 }
1347 1347
@@ -1358,8 +1358,8 @@ static void __init intel_idle_cpuidle_driver_init(void)
1358 1358
1359 /* if state marked as disabled, skip it */ 1359 /* if state marked as disabled, skip it */
1360 if (cpuidle_state_table[cstate].disabled != 0) { 1360 if (cpuidle_state_table[cstate].disabled != 0) {
1361 pr_debug(PREFIX "state %s is disabled", 1361 pr_debug("state %s is disabled\n",
1362 cpuidle_state_table[cstate].name); 1362 cpuidle_state_table[cstate].name);
1363 continue; 1363 continue;
1364 } 1364 }
1365 1365
@@ -1395,7 +1395,7 @@ static int intel_idle_cpu_init(unsigned int cpu)
1395 dev->cpu = cpu; 1395 dev->cpu = cpu;
1396 1396
1397 if (cpuidle_register_device(dev)) { 1397 if (cpuidle_register_device(dev)) {
1398 pr_debug(PREFIX "cpuidle_register_device %d failed!\n", cpu); 1398 pr_debug("cpuidle_register_device %d failed!\n", cpu);
1399 return -EIO; 1399 return -EIO;
1400 } 1400 }
1401 1401
@@ -1447,8 +1447,8 @@ static int __init intel_idle_init(void)
1447 retval = cpuidle_register_driver(&intel_idle_driver); 1447 retval = cpuidle_register_driver(&intel_idle_driver);
1448 if (retval) { 1448 if (retval) {
1449 struct cpuidle_driver *drv = cpuidle_get_driver(); 1449 struct cpuidle_driver *drv = cpuidle_get_driver();
1450 printk(KERN_DEBUG PREFIX "intel_idle yielding to %s", 1450 printk(KERN_DEBUG pr_fmt("intel_idle yielding to %s\n"),
1451 drv ? drv->name : "none"); 1451 drv ? drv->name : "none");
1452 goto init_driver_fail; 1452 goto init_driver_fail;
1453 } 1453 }
1454 1454
@@ -1460,8 +1460,8 @@ static int __init intel_idle_init(void)
1460 if (retval < 0) 1460 if (retval < 0)
1461 goto hp_setup_fail; 1461 goto hp_setup_fail;
1462 1462
1463 pr_debug(PREFIX "lapic_timer_reliable_states 0x%x\n", 1463 pr_debug("lapic_timer_reliable_states 0x%x\n",
1464 lapic_timer_reliable_states); 1464 lapic_timer_reliable_states);
1465 1465
1466 return 0; 1466 return 0;
1467 1467