diff options
Diffstat (limited to 'drivers/acpi/processor_idle.c')
| -rw-r--r-- | drivers/acpi/processor_idle.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 32003fdc91e8..980e1c33e6c5 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; |
| @@ -1420,6 +1425,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, | |||
| 1420 | return 0; | 1425 | return 0; |
| 1421 | 1426 | ||
| 1422 | local_irq_disable(); | 1427 | local_irq_disable(); |
| 1428 | |||
| 1429 | /* Do not access any ACPI IO ports in suspend path */ | ||
| 1430 | if (acpi_idle_suspend) { | ||
| 1431 | acpi_safe_halt(); | ||
| 1432 | local_irq_enable(); | ||
| 1433 | return 0; | ||
| 1434 | } | ||
| 1435 | |||
| 1423 | if (pr->flags.bm_check) | 1436 | if (pr->flags.bm_check) |
| 1424 | acpi_idle_update_bm_rld(pr, cx); | 1437 | acpi_idle_update_bm_rld(pr, cx); |
| 1425 | 1438 | ||
| @@ -1643,6 +1656,11 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
| 1643 | return -EINVAL; | 1656 | return -EINVAL; |
| 1644 | } | 1657 | } |
| 1645 | 1658 | ||
| 1659 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | ||
| 1660 | dev->states[i].name[0] = '\0'; | ||
| 1661 | dev->states[i].desc[0] = '\0'; | ||
| 1662 | } | ||
| 1663 | |||
| 1646 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { | 1664 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { |
| 1647 | cx = &pr->power.states[i]; | 1665 | cx = &pr->power.states[i]; |
| 1648 | state = &dev->states[count]; | 1666 | state = &dev->states[count]; |
| @@ -1659,6 +1677,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
| 1659 | cpuidle_set_statedata(state, cx); | 1677 | cpuidle_set_statedata(state, cx); |
| 1660 | 1678 | ||
| 1661 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); | 1679 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); |
| 1680 | strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN); | ||
| 1662 | state->exit_latency = cx->latency; | 1681 | state->exit_latency = cx->latency; |
| 1663 | state->target_residency = cx->latency * latency_factor; | 1682 | state->target_residency = cx->latency * latency_factor; |
| 1664 | state->power_usage = cx->power; | 1683 | state->power_usage = cx->power; |
