]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/processor_idle.c
Merge branches 'release', 'dmi', 'idle' and 'misc' into release
[linux-2.6-omap-h63xx.git] / drivers / acpi / processor_idle.c
index 32003fdc91e8a4b0205f3fbf2bedfbfc91260399..980e1c33e6c5eeb11a7ec91132c2aa1cb614ef0a 100644 (file)
@@ -945,11 +945,16 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
                                 * Otherwise, ignore this info and continue.
                                 */
                                cx.entry_method = ACPI_CSTATE_HALT;
+                               snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
                        } else {
                                continue;
                        }
+               } else {
+                       snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x",
+                                cx.address);
                }
 
+
                obj = &(element->package.elements[2]);
                if (obj->type != ACPI_TYPE_INTEGER)
                        continue;
@@ -1420,6 +1425,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
                return 0;
 
        local_irq_disable();
+
+       /* Do not access any ACPI IO ports in suspend path */
+       if (acpi_idle_suspend) {
+               acpi_safe_halt();
+               local_irq_enable();
+               return 0;
+       }
+
        if (pr->flags.bm_check)
                acpi_idle_update_bm_rld(pr, cx);
 
@@ -1643,6 +1656,11 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
                return -EINVAL;
        }
 
+       for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
+               dev->states[i].name[0] = '\0';
+               dev->states[i].desc[0] = '\0';
+       }
+
        for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
                cx = &pr->power.states[i];
                state = &dev->states[count];
@@ -1659,6 +1677,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
                cpuidle_set_statedata(state, cx);
 
                snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
+               strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
                state->exit_latency = cx->latency;
                state->target_residency = cx->latency * latency_factor;
                state->power_usage = cx->power;