diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 5 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 29 | ||||
-rw-r--r-- | include/linux/acpi.h | 1 |
4 files changed, 24 insertions, 13 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5ba4d9dff113..736d45602886 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -240,7 +240,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
240 | 240 | ||
241 | acpi_sleep= [HW,ACPI] Sleep options | 241 | acpi_sleep= [HW,ACPI] Sleep options |
242 | Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, | 242 | Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, |
243 | old_ordering, s4_nonvs } | 243 | old_ordering, s4_nonvs, sci_force_enable } |
244 | See Documentation/power/video.txt for information on | 244 | See Documentation/power/video.txt for information on |
245 | s3_bios and s3_mode. | 245 | s3_bios and s3_mode. |
246 | s3_beep is for debugging; it makes the PC's speaker beep | 246 | s3_beep is for debugging; it makes the PC's speaker beep |
@@ -253,6 +253,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
253 | of _PTS is used by default). | 253 | of _PTS is used by default). |
254 | s4_nonvs prevents the kernel from saving/restoring the | 254 | s4_nonvs prevents the kernel from saving/restoring the |
255 | ACPI NVS memory during hibernation. | 255 | ACPI NVS memory during hibernation. |
256 | sci_force_enable causes the kernel to set SCI_EN directly | ||
257 | on resume from S1/S3 (which is against the ACPI spec, | ||
258 | but some broken systems don't work without it). | ||
256 | 259 | ||
257 | acpi_use_timer_override [HW,ACPI] | 260 | acpi_use_timer_override [HW,ACPI] |
258 | Use timer override. For some broken Nvidia NF5 boards | 261 | Use timer override. For some broken Nvidia NF5 boards |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 82e508677b91..f9961034e557 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -162,6 +162,8 @@ static int __init acpi_sleep_setup(char *str) | |||
162 | #endif | 162 | #endif |
163 | if (strncmp(str, "old_ordering", 12) == 0) | 163 | if (strncmp(str, "old_ordering", 12) == 0) |
164 | acpi_old_suspend_ordering(); | 164 | acpi_old_suspend_ordering(); |
165 | if (strncmp(str, "sci_force_enable", 16) == 0) | ||
166 | acpi_set_sci_en_on_resume(); | ||
165 | str = strchr(str, ','); | 167 | str = strchr(str, ','); |
166 | if (str != NULL) | 168 | if (str != NULL) |
167 | str += strspn(str, ", \t"); | 169 | str += strspn(str, ", \t"); |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 5f2c379ab7bf..79d33d908b5a 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -81,6 +81,23 @@ static int acpi_sleep_prepare(u32 acpi_state) | |||
81 | #ifdef CONFIG_ACPI_SLEEP | 81 | #ifdef CONFIG_ACPI_SLEEP |
82 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 82 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
83 | /* | 83 | /* |
84 | * According to the ACPI specification the BIOS should make sure that ACPI is | ||
85 | * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still, | ||
86 | * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI | ||
87 | * on such systems during resume. Unfortunately that doesn't help in | ||
88 | * particularly pathological cases in which SCI_EN has to be set directly on | ||
89 | * resume, although the specification states very clearly that this flag is | ||
90 | * owned by the hardware. The set_sci_en_on_resume variable will be set in such | ||
91 | * cases. | ||
92 | */ | ||
93 | static bool set_sci_en_on_resume; | ||
94 | |||
95 | void __init acpi_set_sci_en_on_resume(void) | ||
96 | { | ||
97 | set_sci_en_on_resume = true; | ||
98 | } | ||
99 | |||
100 | /* | ||
84 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the | 101 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the |
85 | * user to request that behavior by using the 'acpi_old_suspend_ordering' | 102 | * user to request that behavior by using the 'acpi_old_suspend_ordering' |
86 | * kernel command line option that causes the following variable to be set. | 103 | * kernel command line option that causes the following variable to be set. |
@@ -170,18 +187,6 @@ static void acpi_pm_end(void) | |||
170 | #endif /* CONFIG_ACPI_SLEEP */ | 187 | #endif /* CONFIG_ACPI_SLEEP */ |
171 | 188 | ||
172 | #ifdef CONFIG_SUSPEND | 189 | #ifdef CONFIG_SUSPEND |
173 | /* | ||
174 | * According to the ACPI specification the BIOS should make sure that ACPI is | ||
175 | * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still, | ||
176 | * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI | ||
177 | * on such systems during resume. Unfortunately that doesn't help in | ||
178 | * particularly pathological cases in which SCI_EN has to be set directly on | ||
179 | * resume, although the specification states very clearly that this flag is | ||
180 | * owned by the hardware. The set_sci_en_on_resume variable will be set in such | ||
181 | * cases. | ||
182 | */ | ||
183 | static bool set_sci_en_on_resume; | ||
184 | |||
185 | extern void do_suspend_lowlevel(void); | 190 | extern void do_suspend_lowlevel(void); |
186 | 191 | ||
187 | static u32 acpi_suspend_states[] = { | 192 | static u32 acpi_suspend_states[] = { |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ce945d4845fc..36924255c0d5 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -251,6 +251,7 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n, | |||
251 | void __init acpi_no_s4_hw_signature(void); | 251 | void __init acpi_no_s4_hw_signature(void); |
252 | void __init acpi_old_suspend_ordering(void); | 252 | void __init acpi_old_suspend_ordering(void); |
253 | void __init acpi_s4_no_nvs(void); | 253 | void __init acpi_s4_no_nvs(void); |
254 | void __init acpi_set_sci_en_on_resume(void); | ||
254 | #endif /* CONFIG_PM_SLEEP */ | 255 | #endif /* CONFIG_PM_SLEEP */ |
255 | 256 | ||
256 | struct acpi_osc_context { | 257 | struct acpi_osc_context { |