diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/acpi/processor_idle.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 0fc310e7dfd..c75c7ace8c1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/pm_qos_params.h> | 41 | #include <linux/pm_qos_params.h> |
| 42 | #include <linux/clockchips.h> | 42 | #include <linux/clockchips.h> |
| 43 | #include <linux/cpuidle.h> | 43 | #include <linux/cpuidle.h> |
| 44 | #include <linux/cpuidle.h> | ||
| 44 | 45 | ||
| 45 | /* | 46 | /* |
| 46 | * Include the apic definitions for x86 to have the APIC timer related defines | 47 | * Include the apic definitions for x86 to have the APIC timer related defines |
| @@ -57,6 +58,7 @@ | |||
| 57 | 58 | ||
| 58 | #include <acpi/acpi_bus.h> | 59 | #include <acpi/acpi_bus.h> |
| 59 | #include <acpi/processor.h> | 60 | #include <acpi/processor.h> |
| 61 | #include <asm/processor.h> | ||
| 60 | 62 | ||
| 61 | #define ACPI_PROCESSOR_COMPONENT 0x01000000 | 63 | #define ACPI_PROCESSOR_COMPONENT 0x01000000 |
| 62 | #define ACPI_PROCESSOR_CLASS "processor" | 64 | #define ACPI_PROCESSOR_CLASS "processor" |
| @@ -955,6 +957,17 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) | |||
| 955 | } else { | 957 | } else { |
| 956 | continue; | 958 | continue; |
| 957 | } | 959 | } |
| 960 | if (cx.type == ACPI_STATE_C1 && idle_halt) { | ||
| 961 | /* | ||
| 962 | * In most cases the C1 space_id obtained from | ||
| 963 | * _CST object is FIXED_HARDWARE access mode. | ||
| 964 | * But when the option of idle=halt is added, | ||
| 965 | * the entry_method type should be changed from | ||
| 966 | * CSTATE_FFH to CSTATE_HALT. | ||
| 967 | */ | ||
| 968 | cx.entry_method = ACPI_CSTATE_HALT; | ||
| 969 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT"); | ||
| 970 | } | ||
| 958 | } else { | 971 | } else { |
| 959 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x", | 972 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x", |
| 960 | cx.address); | 973 | cx.address); |
| @@ -1780,6 +1793,15 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
| 1780 | return 0; | 1793 | return 0; |
| 1781 | 1794 | ||
| 1782 | if (!first_run) { | 1795 | if (!first_run) { |
| 1796 | if (idle_halt) { | ||
| 1797 | /* | ||
| 1798 | * When the boot option of "idle=halt" is added, halt | ||
| 1799 | * is used for CPU IDLE. | ||
| 1800 | * In such case C2/C3 is meaningless. So the max_cstate | ||
| 1801 | * is set to one. | ||
| 1802 | */ | ||
| 1803 | max_cstate = 1; | ||
| 1804 | } | ||
| 1783 | dmi_check_system(processor_power_dmi_table); | 1805 | dmi_check_system(processor_power_dmi_table); |
| 1784 | max_cstate = acpi_processor_cstate_check(max_cstate); | 1806 | max_cstate = acpi_processor_cstate_check(max_cstate); |
| 1785 | if (max_cstate < ACPI_C_STATES_MAX) | 1807 | if (max_cstate < ACPI_C_STATES_MAX) |
