diff options
-rw-r--r-- | drivers/acpi/acpica/achware.h | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwesleep.c | 19 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwsleep.c | 20 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwxfsleep.c | 22 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 73 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 4 | ||||
-rw-r--r-- | include/acpi/actypes.h | 2 |
7 files changed, 34 insertions, 118 deletions
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h index 5ccb99ae3a6f..5de4ec72766d 100644 --- a/drivers/acpi/acpica/achware.h +++ b/drivers/acpi/acpica/achware.h | |||
@@ -83,22 +83,22 @@ acpi_status acpi_hw_clear_acpi_status(void); | |||
83 | /* | 83 | /* |
84 | * hwsleep - sleep/wake support (Legacy sleep registers) | 84 | * hwsleep - sleep/wake support (Legacy sleep registers) |
85 | */ | 85 | */ |
86 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags); | 86 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state); |
87 | 87 | ||
88 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags); | 88 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state); |
89 | 89 | ||
90 | acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags); | 90 | acpi_status acpi_hw_legacy_wake(u8 sleep_state); |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers) | 93 | * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers) |
94 | */ | 94 | */ |
95 | void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument); | 95 | void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument); |
96 | 96 | ||
97 | acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags); | 97 | acpi_status acpi_hw_extended_sleep(u8 sleep_state); |
98 | 98 | ||
99 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags); | 99 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state); |
100 | 100 | ||
101 | acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags); | 101 | acpi_status acpi_hw_extended_wake(u8 sleep_state); |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * hwvalid - Port I/O with validation | 104 | * hwvalid - Port I/O with validation |
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c index 48518dac5342..94996f9ae3ad 100644 --- a/drivers/acpi/acpica/hwesleep.c +++ b/drivers/acpi/acpica/hwesleep.c | |||
@@ -90,7 +90,6 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) | |||
90 | * FUNCTION: acpi_hw_extended_sleep | 90 | * FUNCTION: acpi_hw_extended_sleep |
91 | * | 91 | * |
92 | * PARAMETERS: sleep_state - Which sleep state to enter | 92 | * PARAMETERS: sleep_state - Which sleep state to enter |
93 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
94 | * | 93 | * |
95 | * RETURN: Status | 94 | * RETURN: Status |
96 | * | 95 | * |
@@ -100,7 +99,7 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) | |||
100 | * | 99 | * |
101 | ******************************************************************************/ | 100 | ******************************************************************************/ |
102 | 101 | ||
103 | acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | 102 | acpi_status acpi_hw_extended_sleep(u8 sleep_state) |
104 | { | 103 | { |
105 | acpi_status status; | 104 | acpi_status status; |
106 | u8 sleep_type_value; | 105 | u8 sleep_type_value; |
@@ -125,12 +124,6 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
125 | 124 | ||
126 | acpi_gbl_system_awake_and_running = FALSE; | 125 | acpi_gbl_system_awake_and_running = FALSE; |
127 | 126 | ||
128 | /* Optionally execute _GTS (Going To Sleep) */ | ||
129 | |||
130 | if (flags & ACPI_EXECUTE_GTS) { | ||
131 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); | ||
132 | } | ||
133 | |||
134 | /* Flush caches, as per ACPI specification */ | 127 | /* Flush caches, as per ACPI specification */ |
135 | 128 | ||
136 | ACPI_FLUSH_CPU_CACHE(); | 129 | ACPI_FLUSH_CPU_CACHE(); |
@@ -172,7 +165,6 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
172 | * FUNCTION: acpi_hw_extended_wake_prep | 165 | * FUNCTION: acpi_hw_extended_wake_prep |
173 | * | 166 | * |
174 | * PARAMETERS: sleep_state - Which sleep state we just exited | 167 | * PARAMETERS: sleep_state - Which sleep state we just exited |
175 | * flags - ACPI_EXECUTE_BFS to run optional method | ||
176 | * | 168 | * |
177 | * RETURN: Status | 169 | * RETURN: Status |
178 | * | 170 | * |
@@ -181,7 +173,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
181 | * | 173 | * |
182 | ******************************************************************************/ | 174 | ******************************************************************************/ |
183 | 175 | ||
184 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | 176 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state) |
185 | { | 177 | { |
186 | acpi_status status; | 178 | acpi_status status; |
187 | u8 sleep_type_value; | 179 | u8 sleep_type_value; |
@@ -200,11 +192,6 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
200 | &acpi_gbl_FADT.sleep_control); | 192 | &acpi_gbl_FADT.sleep_control); |
201 | } | 193 | } |
202 | 194 | ||
203 | /* Optionally execute _BFS (Back From Sleep) */ | ||
204 | |||
205 | if (flags & ACPI_EXECUTE_BFS) { | ||
206 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); | ||
207 | } | ||
208 | return_ACPI_STATUS(AE_OK); | 195 | return_ACPI_STATUS(AE_OK); |
209 | } | 196 | } |
210 | 197 | ||
@@ -222,7 +209,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
222 | * | 209 | * |
223 | ******************************************************************************/ | 210 | ******************************************************************************/ |
224 | 211 | ||
225 | acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags) | 212 | acpi_status acpi_hw_extended_wake(u8 sleep_state) |
226 | { | 213 | { |
227 | ACPI_FUNCTION_TRACE(hw_extended_wake); | 214 | ACPI_FUNCTION_TRACE(hw_extended_wake); |
228 | 215 | ||
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 9960fe9ef533..3fddde056a5e 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c | |||
@@ -56,7 +56,6 @@ ACPI_MODULE_NAME("hwsleep") | |||
56 | * FUNCTION: acpi_hw_legacy_sleep | 56 | * FUNCTION: acpi_hw_legacy_sleep |
57 | * | 57 | * |
58 | * PARAMETERS: sleep_state - Which sleep state to enter | 58 | * PARAMETERS: sleep_state - Which sleep state to enter |
59 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
60 | * | 59 | * |
61 | * RETURN: Status | 60 | * RETURN: Status |
62 | * | 61 | * |
@@ -64,7 +63,7 @@ ACPI_MODULE_NAME("hwsleep") | |||
64 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 63 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
65 | * | 64 | * |
66 | ******************************************************************************/ | 65 | ******************************************************************************/ |
67 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | 66 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state) |
68 | { | 67 | { |
69 | struct acpi_bit_register_info *sleep_type_reg_info; | 68 | struct acpi_bit_register_info *sleep_type_reg_info; |
70 | struct acpi_bit_register_info *sleep_enable_reg_info; | 69 | struct acpi_bit_register_info *sleep_enable_reg_info; |
@@ -110,12 +109,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
110 | return_ACPI_STATUS(status); | 109 | return_ACPI_STATUS(status); |
111 | } | 110 | } |
112 | 111 | ||
113 | /* Optionally execute _GTS (Going To Sleep) */ | ||
114 | |||
115 | if (flags & ACPI_EXECUTE_GTS) { | ||
116 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); | ||
117 | } | ||
118 | |||
119 | /* Get current value of PM1A control */ | 112 | /* Get current value of PM1A control */ |
120 | 113 | ||
121 | status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, | 114 | status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, |
@@ -214,7 +207,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
214 | * FUNCTION: acpi_hw_legacy_wake_prep | 207 | * FUNCTION: acpi_hw_legacy_wake_prep |
215 | * | 208 | * |
216 | * PARAMETERS: sleep_state - Which sleep state we just exited | 209 | * PARAMETERS: sleep_state - Which sleep state we just exited |
217 | * flags - ACPI_EXECUTE_BFS to run optional method | ||
218 | * | 210 | * |
219 | * RETURN: Status | 211 | * RETURN: Status |
220 | * | 212 | * |
@@ -224,7 +216,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
224 | * | 216 | * |
225 | ******************************************************************************/ | 217 | ******************************************************************************/ |
226 | 218 | ||
227 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | 219 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state) |
228 | { | 220 | { |
229 | acpi_status status; | 221 | acpi_status status; |
230 | struct acpi_bit_register_info *sleep_type_reg_info; | 222 | struct acpi_bit_register_info *sleep_type_reg_info; |
@@ -275,11 +267,6 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
275 | } | 267 | } |
276 | } | 268 | } |
277 | 269 | ||
278 | /* Optionally execute _BFS (Back From Sleep) */ | ||
279 | |||
280 | if (flags & ACPI_EXECUTE_BFS) { | ||
281 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); | ||
282 | } | ||
283 | return_ACPI_STATUS(status); | 270 | return_ACPI_STATUS(status); |
284 | } | 271 | } |
285 | 272 | ||
@@ -288,7 +275,6 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
288 | * FUNCTION: acpi_hw_legacy_wake | 275 | * FUNCTION: acpi_hw_legacy_wake |
289 | * | 276 | * |
290 | * PARAMETERS: sleep_state - Which sleep state we just exited | 277 | * PARAMETERS: sleep_state - Which sleep state we just exited |
291 | * flags - Reserved, set to zero | ||
292 | * | 278 | * |
293 | * RETURN: Status | 279 | * RETURN: Status |
294 | * | 280 | * |
@@ -297,7 +283,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
297 | * | 283 | * |
298 | ******************************************************************************/ | 284 | ******************************************************************************/ |
299 | 285 | ||
300 | acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags) | 286 | acpi_status acpi_hw_legacy_wake(u8 sleep_state) |
301 | { | 287 | { |
302 | acpi_status status; | 288 | acpi_status status; |
303 | 289 | ||
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index f8684bfe7907..1f165a750ae2 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c | |||
@@ -50,7 +50,7 @@ ACPI_MODULE_NAME("hwxfsleep") | |||
50 | 50 | ||
51 | /* Local prototypes */ | 51 | /* Local prototypes */ |
52 | static acpi_status | 52 | static acpi_status |
53 | acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id); | 53 | acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Dispatch table used to efficiently branch to the various sleep | 56 | * Dispatch table used to efficiently branch to the various sleep |
@@ -235,7 +235,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) | |||
235 | * | 235 | * |
236 | ******************************************************************************/ | 236 | ******************************************************************************/ |
237 | static acpi_status | 237 | static acpi_status |
238 | acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | 238 | acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id) |
239 | { | 239 | { |
240 | acpi_status status; | 240 | acpi_status status; |
241 | struct acpi_sleep_functions *sleep_functions = | 241 | struct acpi_sleep_functions *sleep_functions = |
@@ -248,11 +248,11 @@ acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | |||
248 | * use the extended sleep registers | 248 | * use the extended sleep registers |
249 | */ | 249 | */ |
250 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { | 250 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { |
251 | status = sleep_functions->extended_function(sleep_state, flags); | 251 | status = sleep_functions->extended_function(sleep_state); |
252 | } else { | 252 | } else { |
253 | /* Legacy sleep */ | 253 | /* Legacy sleep */ |
254 | 254 | ||
255 | status = sleep_functions->legacy_function(sleep_state, flags); | 255 | status = sleep_functions->legacy_function(sleep_state); |
256 | } | 256 | } |
257 | 257 | ||
258 | return (status); | 258 | return (status); |
@@ -262,7 +262,7 @@ acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | |||
262 | * For the case where reduced-hardware-only code is being generated, | 262 | * For the case where reduced-hardware-only code is being generated, |
263 | * we know that only the extended sleep registers are available | 263 | * we know that only the extended sleep registers are available |
264 | */ | 264 | */ |
265 | status = sleep_functions->extended_function(sleep_state, flags); | 265 | status = sleep_functions->extended_function(sleep_state); |
266 | return (status); | 266 | return (status); |
267 | 267 | ||
268 | #endif /* !ACPI_REDUCED_HARDWARE */ | 268 | #endif /* !ACPI_REDUCED_HARDWARE */ |
@@ -349,7 +349,6 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | |||
349 | * FUNCTION: acpi_enter_sleep_state | 349 | * FUNCTION: acpi_enter_sleep_state |
350 | * | 350 | * |
351 | * PARAMETERS: sleep_state - Which sleep state to enter | 351 | * PARAMETERS: sleep_state - Which sleep state to enter |
352 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
353 | * | 352 | * |
354 | * RETURN: Status | 353 | * RETURN: Status |
355 | * | 354 | * |
@@ -357,7 +356,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | |||
357 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 356 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
358 | * | 357 | * |
359 | ******************************************************************************/ | 358 | ******************************************************************************/ |
360 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags) | 359 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) |
361 | { | 360 | { |
362 | acpi_status status; | 361 | acpi_status status; |
363 | 362 | ||
@@ -371,7 +370,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags) | |||
371 | } | 370 | } |
372 | 371 | ||
373 | status = | 372 | status = |
374 | acpi_hw_sleep_dispatch(sleep_state, flags, ACPI_SLEEP_FUNCTION_ID); | 373 | acpi_hw_sleep_dispatch(sleep_state, ACPI_SLEEP_FUNCTION_ID); |
375 | return_ACPI_STATUS(status); | 374 | return_ACPI_STATUS(status); |
376 | } | 375 | } |
377 | 376 | ||
@@ -391,14 +390,14 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) | |||
391 | * Called with interrupts DISABLED. | 390 | * Called with interrupts DISABLED. |
392 | * | 391 | * |
393 | ******************************************************************************/ | 392 | ******************************************************************************/ |
394 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state, u8 flags) | 393 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) |
395 | { | 394 | { |
396 | acpi_status status; | 395 | acpi_status status; |
397 | 396 | ||
398 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); | 397 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); |
399 | 398 | ||
400 | status = | 399 | status = |
401 | acpi_hw_sleep_dispatch(sleep_state, flags, | 400 | acpi_hw_sleep_dispatch(sleep_state, |
402 | ACPI_WAKE_PREP_FUNCTION_ID); | 401 | ACPI_WAKE_PREP_FUNCTION_ID); |
403 | return_ACPI_STATUS(status); | 402 | return_ACPI_STATUS(status); |
404 | } | 403 | } |
@@ -423,8 +422,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
423 | 422 | ||
424 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); | 423 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); |
425 | 424 | ||
426 | 425 | status = acpi_hw_sleep_dispatch(sleep_state, ACPI_WAKE_FUNCTION_ID); | |
427 | status = acpi_hw_sleep_dispatch(sleep_state, 0, ACPI_WAKE_FUNCTION_ID); | ||
428 | return_ACPI_STATUS(status); | 426 | return_ACPI_STATUS(status); |
429 | } | 427 | } |
430 | 428 | ||
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 23a53c013f1e..bd35e3c5e530 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -28,34 +28,6 @@ | |||
28 | #include "internal.h" | 28 | #include "internal.h" |
29 | #include "sleep.h" | 29 | #include "sleep.h" |
30 | 30 | ||
31 | u8 wake_sleep_flags = ACPI_NO_OPTIONAL_METHODS; | ||
32 | static unsigned int gts, bfs; | ||
33 | static int set_param_wake_flag(const char *val, struct kernel_param *kp) | ||
34 | { | ||
35 | int ret = param_set_int(val, kp); | ||
36 | |||
37 | if (ret) | ||
38 | return ret; | ||
39 | |||
40 | if (kp->arg == (const char *)>s) { | ||
41 | if (gts) | ||
42 | wake_sleep_flags |= ACPI_EXECUTE_GTS; | ||
43 | else | ||
44 | wake_sleep_flags &= ~ACPI_EXECUTE_GTS; | ||
45 | } | ||
46 | if (kp->arg == (const char *)&bfs) { | ||
47 | if (bfs) | ||
48 | wake_sleep_flags |= ACPI_EXECUTE_BFS; | ||
49 | else | ||
50 | wake_sleep_flags &= ~ACPI_EXECUTE_BFS; | ||
51 | } | ||
52 | return ret; | ||
53 | } | ||
54 | module_param_call(gts, set_param_wake_flag, param_get_int, >s, 0644); | ||
55 | module_param_call(bfs, set_param_wake_flag, param_get_int, &bfs, 0644); | ||
56 | MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend."); | ||
57 | MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); | ||
58 | |||
59 | static u8 sleep_states[ACPI_S_STATE_COUNT]; | 31 | static u8 sleep_states[ACPI_S_STATE_COUNT]; |
60 | static bool pwr_btn_event_pending; | 32 | static bool pwr_btn_event_pending; |
61 | 33 | ||
@@ -305,7 +277,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
305 | switch (acpi_state) { | 277 | switch (acpi_state) { |
306 | case ACPI_STATE_S1: | 278 | case ACPI_STATE_S1: |
307 | barrier(); | 279 | barrier(); |
308 | status = acpi_enter_sleep_state(acpi_state, wake_sleep_flags); | 280 | status = acpi_enter_sleep_state(acpi_state); |
309 | break; | 281 | break; |
310 | 282 | ||
311 | case ACPI_STATE_S3: | 283 | case ACPI_STATE_S3: |
@@ -319,8 +291,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
319 | /* This violates the spec but is required for bug compatibility. */ | 291 | /* This violates the spec but is required for bug compatibility. */ |
320 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); | 292 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); |
321 | 293 | ||
322 | /* Reprogram control registers and execute _BFS */ | 294 | /* Reprogram control registers */ |
323 | acpi_leave_sleep_state_prep(acpi_state, wake_sleep_flags); | 295 | acpi_leave_sleep_state_prep(acpi_state); |
324 | 296 | ||
325 | /* ACPI 3.0 specs (P62) says that it's the responsibility | 297 | /* ACPI 3.0 specs (P62) says that it's the responsibility |
326 | * of the OSPM to clear the status bit [ implying that the | 298 | * of the OSPM to clear the status bit [ implying that the |
@@ -603,9 +575,9 @@ static int acpi_hibernation_enter(void) | |||
603 | ACPI_FLUSH_CPU_CACHE(); | 575 | ACPI_FLUSH_CPU_CACHE(); |
604 | 576 | ||
605 | /* This shouldn't return. If it returns, we have a problem */ | 577 | /* This shouldn't return. If it returns, we have a problem */ |
606 | status = acpi_enter_sleep_state(ACPI_STATE_S4, wake_sleep_flags); | 578 | status = acpi_enter_sleep_state(ACPI_STATE_S4); |
607 | /* Reprogram control registers and execute _BFS */ | 579 | /* Reprogram control registers */ |
608 | acpi_leave_sleep_state_prep(ACPI_STATE_S4, wake_sleep_flags); | 580 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); |
609 | 581 | ||
610 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; | 582 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; |
611 | } | 583 | } |
@@ -617,8 +589,8 @@ static void acpi_hibernation_leave(void) | |||
617 | * enable it here. | 589 | * enable it here. |
618 | */ | 590 | */ |
619 | acpi_enable(); | 591 | acpi_enable(); |
620 | /* Reprogram control registers and execute _BFS */ | 592 | /* Reprogram control registers */ |
621 | acpi_leave_sleep_state_prep(ACPI_STATE_S4, wake_sleep_flags); | 593 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); |
622 | /* Check the hardware signature */ | 594 | /* Check the hardware signature */ |
623 | if (facs && s4_hardware_signature != facs->hardware_signature) { | 595 | if (facs && s4_hardware_signature != facs->hardware_signature) { |
624 | printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " | 596 | printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " |
@@ -876,33 +848,7 @@ static void acpi_power_off(void) | |||
876 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 848 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
877 | printk(KERN_DEBUG "%s called\n", __func__); | 849 | printk(KERN_DEBUG "%s called\n", __func__); |
878 | local_irq_disable(); | 850 | local_irq_disable(); |
879 | acpi_enter_sleep_state(ACPI_STATE_S5, wake_sleep_flags); | 851 | acpi_enter_sleep_state(ACPI_STATE_S5); |
880 | } | ||
881 | |||
882 | /* | ||
883 | * ACPI 2.0 created the optional _GTS and _BFS, | ||
884 | * but industry adoption has been neither rapid nor broad. | ||
885 | * | ||
886 | * Linux gets into trouble when it executes poorly validated | ||
887 | * paths through the BIOS, so disable _GTS and _BFS by default, | ||
888 | * but do speak up and offer the option to enable them. | ||
889 | */ | ||
890 | static void __init acpi_gts_bfs_check(void) | ||
891 | { | ||
892 | acpi_handle dummy; | ||
893 | |||
894 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__GTS, &dummy))) | ||
895 | { | ||
896 | printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); | ||
897 | printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " | ||
898 | "please notify linux-acpi@vger.kernel.org\n"); | ||
899 | } | ||
900 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__BFS, &dummy))) | ||
901 | { | ||
902 | printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); | ||
903 | printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " | ||
904 | "please notify linux-acpi@vger.kernel.org\n"); | ||
905 | } | ||
906 | } | 852 | } |
907 | 853 | ||
908 | int __init acpi_sleep_init(void) | 854 | int __init acpi_sleep_init(void) |
@@ -963,6 +909,5 @@ int __init acpi_sleep_init(void) | |||
963 | * object can also be evaluated when the system enters S5. | 909 | * object can also be evaluated when the system enters S5. |
964 | */ | 910 | */ |
965 | register_reboot_notifier(&tts_notifier); | 911 | register_reboot_notifier(&tts_notifier); |
966 | acpi_gts_bfs_check(); | ||
967 | return 0; | 912 | return 0; |
968 | } | 913 | } |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 2c744c7a5b3d..26a92fc28a59 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -491,11 +491,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | |||
491 | 491 | ||
492 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); | 492 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
493 | 493 | ||
494 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags); | 494 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); |
495 | 495 | ||
496 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) | 496 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) |
497 | 497 | ||
498 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state, u8 flags); | 498 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); |
499 | 499 | ||
500 | acpi_status acpi_leave_sleep_state(u8 sleep_state); | 500 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
501 | 501 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 3af87de6a68c..3d00bd5bd7e3 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -803,7 +803,7 @@ typedef u8 acpi_adr_space_type; | |||
803 | 803 | ||
804 | /* Sleep function dispatch */ | 804 | /* Sleep function dispatch */ |
805 | 805 | ||
806 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state, u8 flags); | 806 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state); |
807 | 807 | ||
808 | struct acpi_sleep_functions { | 808 | struct acpi_sleep_functions { |
809 | ACPI_SLEEP_FUNCTION legacy_function; | 809 | ACPI_SLEEP_FUNCTION legacy_function; |