aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 32003fdc91e8..baa389b908e2 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -945,11 +945,16 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
945 * Otherwise, ignore this info and continue. 945 * Otherwise, ignore this info and continue.
946 */ 946 */
947 cx.entry_method = ACPI_CSTATE_HALT; 947 cx.entry_method = ACPI_CSTATE_HALT;
948 snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
948 } else { 949 } else {
949 continue; 950 continue;
950 } 951 }
952 } else {
953 snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x",
954 cx.address);
951 } 955 }
952 956
957
953 obj = &(element->package.elements[2]); 958 obj = &(element->package.elements[2]);
954 if (obj->type != ACPI_TYPE_INTEGER) 959 if (obj->type != ACPI_TYPE_INTEGER)
955 continue; 960 continue;
@@ -1643,6 +1648,11 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
1643 return -EINVAL; 1648 return -EINVAL;
1644 } 1649 }
1645 1650
1651 for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
1652 dev->states[i].name[0] = '\0';
1653 dev->states[i].desc[0] = '\0';
1654 }
1655
1646 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { 1656 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
1647 cx = &pr->power.states[i]; 1657 cx = &pr->power.states[i];
1648 state = &dev->states[count]; 1658 state = &dev->states[count];
@@ -1659,6 +1669,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
1659 cpuidle_set_statedata(state, cx); 1669 cpuidle_set_statedata(state, cx);
1660 1670
1661 snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); 1671 snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
1672 strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
1662 state->exit_latency = cx->latency; 1673 state->exit_latency = cx->latency;
1663 state->target_residency = cx->latency * latency_factor; 1674 state->target_residency = cx->latency * latency_factor;
1664 state->power_usage = cx->power; 1675 state->power_usage = cx->power;