diff options
-rw-r--r-- | Documentation/cpuidle/sysfs.txt | 10 | ||||
-rw-r--r-- | drivers/acpi/processor_driver.c | 8 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 8 | ||||
-rw-r--r-- | drivers/cpuidle/governors/ladder.c | 6 | ||||
-rw-r--r-- | drivers/xen/xen-acpi-processor.c | 1 | ||||
-rw-r--r-- | include/acpi/processor.h | 7 |
6 files changed, 21 insertions, 19 deletions
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt index 9d28a3406e74..b6f44f490ed7 100644 --- a/Documentation/cpuidle/sysfs.txt +++ b/Documentation/cpuidle/sysfs.txt | |||
@@ -76,9 +76,17 @@ total 0 | |||
76 | 76 | ||
77 | 77 | ||
78 | * desc : Small description about the idle state (string) | 78 | * desc : Small description about the idle state (string) |
79 | * disable : Option to disable this idle state (bool) | 79 | * disable : Option to disable this idle state (bool) -> see note below |
80 | * latency : Latency to exit out of this idle state (in microseconds) | 80 | * latency : Latency to exit out of this idle state (in microseconds) |
81 | * name : Name of the idle state (string) | 81 | * name : Name of the idle state (string) |
82 | * power : Power consumed while in this idle state (in milliwatts) | 82 | * power : Power consumed while in this idle state (in milliwatts) |
83 | * time : Total time spent in this idle state (in microseconds) | 83 | * time : Total time spent in this idle state (in microseconds) |
84 | * usage : Number of times this state was entered (count) | 84 | * usage : Number of times this state was entered (count) |
85 | |||
86 | Note: | ||
87 | The behavior and the effect of the disable variable depends on the | ||
88 | implementation of a particular governor. In the ladder governor, for | ||
89 | example, it is not coherent, i.e. if one is disabling a light state, | ||
90 | then all deeper states are disabled as well, but the disable variable | ||
91 | does not reflect it. Likewise, if one enables a deep state but a lighter | ||
92 | state still is disabled, then this has no effect. | ||
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index bfc31cb0dd3e..e78c2a52ea46 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -475,7 +475,7 @@ static __ref int acpi_processor_start(struct acpi_processor *pr) | |||
475 | acpi_processor_get_limit_info(pr); | 475 | acpi_processor_get_limit_info(pr); |
476 | 476 | ||
477 | if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver) | 477 | if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver) |
478 | acpi_processor_power_init(pr, device); | 478 | acpi_processor_power_init(pr); |
479 | 479 | ||
480 | pr->cdev = thermal_cooling_device_register("Processor", device, | 480 | pr->cdev = thermal_cooling_device_register("Processor", device, |
481 | &processor_cooling_ops); | 481 | &processor_cooling_ops); |
@@ -509,7 +509,7 @@ err_remove_sysfs_thermal: | |||
509 | err_thermal_unregister: | 509 | err_thermal_unregister: |
510 | thermal_cooling_device_unregister(pr->cdev); | 510 | thermal_cooling_device_unregister(pr->cdev); |
511 | err_power_exit: | 511 | err_power_exit: |
512 | acpi_processor_power_exit(pr, device); | 512 | acpi_processor_power_exit(pr); |
513 | 513 | ||
514 | return result; | 514 | return result; |
515 | } | 515 | } |
@@ -620,7 +620,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
620 | return -EINVAL; | 620 | return -EINVAL; |
621 | } | 621 | } |
622 | 622 | ||
623 | acpi_processor_power_exit(pr, device); | 623 | acpi_processor_power_exit(pr); |
624 | 624 | ||
625 | sysfs_remove_link(&device->dev.kobj, "sysdev"); | 625 | sysfs_remove_link(&device->dev.kobj, "sysdev"); |
626 | 626 | ||
@@ -905,8 +905,6 @@ static int __init acpi_processor_init(void) | |||
905 | if (acpi_disabled) | 905 | if (acpi_disabled) |
906 | return 0; | 906 | return 0; |
907 | 907 | ||
908 | memset(&errata, 0, sizeof(errata)); | ||
909 | |||
910 | result = acpi_bus_register_driver(&acpi_processor_driver); | 908 | result = acpi_bus_register_driver(&acpi_processor_driver); |
911 | if (result < 0) | 909 | if (result < 0) |
912 | return result; | 910 | return result; |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index ad3730b4038b..c46a44a8c860 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -483,8 +483,6 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) | |||
483 | if (obj->type != ACPI_TYPE_INTEGER) | 483 | if (obj->type != ACPI_TYPE_INTEGER) |
484 | continue; | 484 | continue; |
485 | 485 | ||
486 | cx.power = obj->integer.value; | ||
487 | |||
488 | current_count++; | 486 | current_count++; |
489 | memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx)); | 487 | memcpy(&(pr->power.states[current_count]), &cx, sizeof(cx)); |
490 | 488 | ||
@@ -1218,8 +1216,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) | |||
1218 | 1216 | ||
1219 | static int acpi_processor_registered; | 1217 | static int acpi_processor_registered; |
1220 | 1218 | ||
1221 | int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | 1219 | int __cpuinit acpi_processor_power_init(struct acpi_processor *pr) |
1222 | struct acpi_device *device) | ||
1223 | { | 1220 | { |
1224 | acpi_status status = 0; | 1221 | acpi_status status = 0; |
1225 | int retval; | 1222 | int retval; |
@@ -1283,8 +1280,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1283 | return 0; | 1280 | return 0; |
1284 | } | 1281 | } |
1285 | 1282 | ||
1286 | int acpi_processor_power_exit(struct acpi_processor *pr, | 1283 | int acpi_processor_power_exit(struct acpi_processor *pr) |
1287 | struct acpi_device *device) | ||
1288 | { | 1284 | { |
1289 | if (disabled_by_idle_boot_param()) | 1285 | if (disabled_by_idle_boot_param()) |
1290 | return 0; | 1286 | return 0; |
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index b6a09ea859b1..9b784051ec12 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c | |||
@@ -88,6 +88,8 @@ static int ladder_select_state(struct cpuidle_driver *drv, | |||
88 | 88 | ||
89 | /* consider promotion */ | 89 | /* consider promotion */ |
90 | if (last_idx < drv->state_count - 1 && | 90 | if (last_idx < drv->state_count - 1 && |
91 | !drv->states[last_idx + 1].disabled && | ||
92 | !dev->states_usage[last_idx + 1].disable && | ||
91 | last_residency > last_state->threshold.promotion_time && | 93 | last_residency > last_state->threshold.promotion_time && |
92 | drv->states[last_idx + 1].exit_latency <= latency_req) { | 94 | drv->states[last_idx + 1].exit_latency <= latency_req) { |
93 | last_state->stats.promotion_count++; | 95 | last_state->stats.promotion_count++; |
@@ -100,7 +102,9 @@ static int ladder_select_state(struct cpuidle_driver *drv, | |||
100 | 102 | ||
101 | /* consider demotion */ | 103 | /* consider demotion */ |
102 | if (last_idx > CPUIDLE_DRIVER_STATE_START && | 104 | if (last_idx > CPUIDLE_DRIVER_STATE_START && |
103 | drv->states[last_idx].exit_latency > latency_req) { | 105 | (drv->states[last_idx].disabled || |
106 | dev->states_usage[last_idx].disable || | ||
107 | drv->states[last_idx].exit_latency > latency_req)) { | ||
104 | int i; | 108 | int i; |
105 | 109 | ||
106 | for (i = last_idx - 1; i > CPUIDLE_DRIVER_STATE_START; i--) { | 110 | for (i = last_idx - 1; i > CPUIDLE_DRIVER_STATE_START; i--) { |
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index b590ee067fcd..316df65163cf 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
@@ -98,7 +98,6 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr) | |||
98 | 98 | ||
99 | dst_cx->type = cx->type; | 99 | dst_cx->type = cx->type; |
100 | dst_cx->latency = cx->latency; | 100 | dst_cx->latency = cx->latency; |
101 | dst_cx->power = cx->power; | ||
102 | 101 | ||
103 | dst_cx->dpcnt = 0; | 102 | dst_cx->dpcnt = 0; |
104 | set_xen_guest_handle(dst_cx->dp, NULL); | 103 | set_xen_guest_handle(dst_cx->dp, NULL); |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 64ec644808bc..1d3c1a68acce 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -59,7 +59,6 @@ struct acpi_processor_cx { | |||
59 | u8 entry_method; | 59 | u8 entry_method; |
60 | u8 index; | 60 | u8 index; |
61 | u32 latency; | 61 | u32 latency; |
62 | u32 power; | ||
63 | u8 bm_sts_skip; | 62 | u8 bm_sts_skip; |
64 | char desc[ACPI_CX_DESC_LEN]; | 63 | char desc[ACPI_CX_DESC_LEN]; |
65 | }; | 64 | }; |
@@ -325,12 +324,10 @@ extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, | |||
325 | extern const struct file_operations acpi_processor_throttling_fops; | 324 | extern const struct file_operations acpi_processor_throttling_fops; |
326 | extern void acpi_processor_throttling_init(void); | 325 | extern void acpi_processor_throttling_init(void); |
327 | /* in processor_idle.c */ | 326 | /* in processor_idle.c */ |
328 | int acpi_processor_power_init(struct acpi_processor *pr, | 327 | int acpi_processor_power_init(struct acpi_processor *pr); |
329 | struct acpi_device *device); | 328 | int acpi_processor_power_exit(struct acpi_processor *pr); |
330 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); | 329 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); |
331 | int acpi_processor_hotplug(struct acpi_processor *pr); | 330 | int acpi_processor_hotplug(struct acpi_processor *pr); |
332 | int acpi_processor_power_exit(struct acpi_processor *pr, | ||
333 | struct acpi_device *device); | ||
334 | int acpi_processor_suspend(struct device *dev); | 331 | int acpi_processor_suspend(struct device *dev); |
335 | int acpi_processor_resume(struct device *dev); | 332 | int acpi_processor_resume(struct device *dev); |
336 | extern struct cpuidle_driver acpi_idle_driver; | 333 | extern struct cpuidle_driver acpi_idle_driver; |