diff options
author | Len Brown <len.brown@intel.com> | 2012-07-26 20:08:54 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-07-30 21:11:25 -0400 |
commit | 3f6f49c7854c9294119437a82c5b35be78f9cea6 (patch) | |
tree | ad2428e403a0d76f2327a1c0afccd12a6820e661 /drivers/acpi/acpica | |
parent | 3b6961ba8c682cc71e51079017743c1b282fd259 (diff) |
ACPI: delete _GTS/_BFS support
_GTS and _BFS were added to the suspend/resume flow
in the ACPI 2.0 specification.
Linux dutifully implemented _GTS and _BFS.
We discovered that it was rarely seen in systems
in the field. Further, some of those systems had
AML so bogus that it could never work -- proof that
no other operating system supports _GTS and _BFS.
So we made _GTS and _BFS optional via modparam,
and disabled them by default.
But we've had to complicate some code to keep
this support in the kernel, as these methods are defined
to be evaluated very close to sleep entry and exit.
Indeed, no other AML is ever evaluated with interrupts off.
We have submitted a proposal for _GTS and _BFS
to be officially removed from the ACPI specification
on the next revision. Here we remove it from Linux.
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/acpi/acpica')
-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 |
4 files changed, 22 insertions, 51 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 | ||