diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-07-18 05:36:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-07-18 05:36:53 -0400 |
commit | 1ed7d32763857fbdc8e406352404538e41050d22 (patch) | |
tree | f97c5d8f548141bf7cdec0a9d7f22adb61da6efc /drivers/idle | |
parent | 660da7c9228f685b2ebe664f9fd69aaddcc420b5 (diff) | |
parent | 27aac20574110abfd594175a668dc58b23b2b14a (diff) |
Merge branch 'x86/boot' into x86/mm, to pick up interacting changes
The SME patches we are about to apply add some E820 logic, so merge in
pending E820 code changes first, to have a single code base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/idle')
-rw-r--r-- | drivers/idle/intel_idle.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 2ae43f59091d..e87ffb3c31a9 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 | ||
70 | static struct cpuidle_driver intel_idle_driver = { | 71 | static struct cpuidle_driver intel_idle_driver = { |
71 | .name = "intel_idle", | 72 | .name = "intel_idle", |
@@ -1110,7 +1111,7 @@ static int __init intel_idle_probe(void) | |||
1110 | const struct x86_cpu_id *id; | 1111 | const struct x86_cpu_id *id; |
1111 | 1112 | ||
1112 | if (max_cstate == 0) { | 1113 | if (max_cstate == 0) { |
1113 | pr_debug(PREFIX "disabled\n"); | 1114 | pr_debug("disabled\n"); |
1114 | return -EPERM; | 1115 | return -EPERM; |
1115 | } | 1116 | } |
1116 | 1117 | ||
@@ -1118,8 +1119,8 @@ static int __init intel_idle_probe(void) | |||
1118 | if (!id) { | 1119 | if (!id) { |
1119 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && | 1120 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && |
1120 | boot_cpu_data.x86 == 6) | 1121 | boot_cpu_data.x86 == 6) |
1121 | pr_debug(PREFIX "does not run on family %d model %d\n", | 1122 | pr_debug("does not run on family %d model %d\n", |
1122 | boot_cpu_data.x86, boot_cpu_data.x86_model); | 1123 | boot_cpu_data.x86, boot_cpu_data.x86_model); |
1123 | return -ENODEV; | 1124 | return -ENODEV; |
1124 | } | 1125 | } |
1125 | 1126 | ||
@@ -1133,13 +1134,13 @@ static int __init intel_idle_probe(void) | |||
1133 | !mwait_substates) | 1134 | !mwait_substates) |
1134 | return -ENODEV; | 1135 | return -ENODEV; |
1135 | 1136 | ||
1136 | pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates); | 1137 | pr_debug("MWAIT substates: 0x%x\n", mwait_substates); |
1137 | 1138 | ||
1138 | icpu = (const struct idle_cpu *)id->driver_data; | 1139 | icpu = (const struct idle_cpu *)id->driver_data; |
1139 | cpuidle_state_table = icpu->state_table; | 1140 | cpuidle_state_table = icpu->state_table; |
1140 | 1141 | ||
1141 | pr_debug(PREFIX "v" INTEL_IDLE_VERSION | 1142 | pr_debug("v" INTEL_IDLE_VERSION " model 0x%X\n", |
1142 | " model 0x%X\n", boot_cpu_data.x86_model); | 1143 | boot_cpu_data.x86_model); |
1143 | 1144 | ||
1144 | return 0; | 1145 | return 0; |
1145 | } | 1146 | } |
@@ -1339,8 +1340,7 @@ static void __init intel_idle_cpuidle_driver_init(void) | |||
1339 | break; | 1340 | break; |
1340 | 1341 | ||
1341 | if (cstate + 1 > max_cstate) { | 1342 | if (cstate + 1 > max_cstate) { |
1342 | printk(PREFIX "max_cstate %d reached\n", | 1343 | pr_info("max_cstate %d reached\n", max_cstate); |
1343 | max_cstate); | ||
1344 | break; | 1344 | break; |
1345 | } | 1345 | } |
1346 | 1346 | ||
@@ -1357,8 +1357,8 @@ static void __init intel_idle_cpuidle_driver_init(void) | |||
1357 | 1357 | ||
1358 | /* if state marked as disabled, skip it */ | 1358 | /* if state marked as disabled, skip it */ |
1359 | if (cpuidle_state_table[cstate].disabled != 0) { | 1359 | if (cpuidle_state_table[cstate].disabled != 0) { |
1360 | pr_debug(PREFIX "state %s is disabled", | 1360 | pr_debug("state %s is disabled\n", |
1361 | cpuidle_state_table[cstate].name); | 1361 | cpuidle_state_table[cstate].name); |
1362 | continue; | 1362 | continue; |
1363 | } | 1363 | } |
1364 | 1364 | ||
@@ -1394,7 +1394,7 @@ static int intel_idle_cpu_init(unsigned int cpu) | |||
1394 | dev->cpu = cpu; | 1394 | dev->cpu = cpu; |
1395 | 1395 | ||
1396 | if (cpuidle_register_device(dev)) { | 1396 | if (cpuidle_register_device(dev)) { |
1397 | pr_debug(PREFIX "cpuidle_register_device %d failed!\n", cpu); | 1397 | pr_debug("cpuidle_register_device %d failed!\n", cpu); |
1398 | return -EIO; | 1398 | return -EIO; |
1399 | } | 1399 | } |
1400 | 1400 | ||
@@ -1446,8 +1446,8 @@ static int __init intel_idle_init(void) | |||
1446 | retval = cpuidle_register_driver(&intel_idle_driver); | 1446 | retval = cpuidle_register_driver(&intel_idle_driver); |
1447 | if (retval) { | 1447 | if (retval) { |
1448 | struct cpuidle_driver *drv = cpuidle_get_driver(); | 1448 | struct cpuidle_driver *drv = cpuidle_get_driver(); |
1449 | printk(KERN_DEBUG PREFIX "intel_idle yielding to %s", | 1449 | printk(KERN_DEBUG pr_fmt("intel_idle yielding to %s\n"), |
1450 | drv ? drv->name : "none"); | 1450 | drv ? drv->name : "none"); |
1451 | goto init_driver_fail; | 1451 | goto init_driver_fail; |
1452 | } | 1452 | } |
1453 | 1453 | ||
@@ -1459,8 +1459,8 @@ static int __init intel_idle_init(void) | |||
1459 | if (retval < 0) | 1459 | if (retval < 0) |
1460 | goto hp_setup_fail; | 1460 | goto hp_setup_fail; |
1461 | 1461 | ||
1462 | pr_debug(PREFIX "lapic_timer_reliable_states 0x%x\n", | 1462 | pr_debug("lapic_timer_reliable_states 0x%x\n", |
1463 | lapic_timer_reliable_states); | 1463 | lapic_timer_reliable_states); |
1464 | 1464 | ||
1465 | return 0; | 1465 | return 0; |
1466 | 1466 | ||