]> err.no Git - linux-2.6/blobdiff - drivers/acpi/processor_idle.c
ide: move ide_pci_setup_ports() call out from do_ide_setup_pci_device()
[linux-2.6] / drivers / acpi / processor_idle.c
index 0fc310e7dfd6eb4cc7b1cdcec87a6da778ce338f..d592dbb1d12acb04b029c1357b1516715890cefe 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/pm_qos_params.h>
 #include <linux/clockchips.h>
 #include <linux/cpuidle.h>
+#include <linux/cpuidle.h>
 
 /*
  * Include the apic definitions for x86 to have the APIC timer related defines
@@ -57,6 +58,7 @@
 
 #include <acpi/acpi_bus.h>
 #include <acpi/processor.h>
+#include <asm/processor.h>
 
 #define ACPI_PROCESSOR_COMPONENT        0x01000000
 #define ACPI_PROCESSOR_CLASS            "processor"
@@ -955,6 +957,21 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
                        } else {
                                continue;
                        }
+                       if (cx.type == ACPI_STATE_C1 &&
+                                       (idle_halt || idle_nomwait)) {
+                               /*
+                                * In most cases the C1 space_id obtained from
+                                * _CST object is FIXED_HARDWARE access mode.
+                                * But when the option of idle=halt is added,
+                                * the entry_method type should be changed from
+                                * CSTATE_FFH to CSTATE_HALT.
+                                * When the option of idle=nomwait is added,
+                                * the C1 entry_method type should be
+                                * CSTATE_HALT.
+                                */
+                               cx.entry_method = ACPI_CSTATE_HALT;
+                               snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
+                       }
                } else {
                        snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x",
                                 cx.address);
@@ -1780,6 +1797,15 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
                return 0;
 
        if (!first_run) {
+               if (idle_halt) {
+                       /*
+                        * When the boot option of "idle=halt" is added, halt
+                        * is used for CPU IDLE.
+                        * In such case C2/C3 is meaningless. So the max_cstate
+                        * is set to one.
+                        */
+                       max_cstate = 1;
+               }
                dmi_check_system(processor_power_dmi_table);
                max_cstate = acpi_processor_cstate_check(max_cstate);
                if (max_cstate < ACPI_C_STATES_MAX)