aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwsleep.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-17 23:32:20 -0400
committerLen Brown <len.brown@intel.com>2009-04-17 23:32:20 -0400
commit96f15efcea94545987715f453a8c2b8ea592d000 (patch)
tree9dac5a4547357e311cc2be960b799a91ae3ee15d /drivers/acpi/acpica/hwsleep.c
parent0882e8dd3aad33eca41696d463bb896e6c8817eb (diff)
ACPI: Disable _GTS and _BFS support by default
Executing BIOS code paths not exercised by Windows tends to get Linux into trouble. However, if a system does benefit from _GTS or _BFS, acpi.gts=1 an acpi.bfs=1 are now available to enable them. http://bugzilla.kernel.org/show_bug.cgi?id=13041 Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwsleep.c')
-rw-r--r--drivers/acpi/acpica/hwsleep.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index baa5fc05e12..db307a356f0 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -211,6 +211,12 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
211 211
212ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) 212ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
213 213
214static unsigned int gts, bfs;
215module_param(gts, uint, 0644);
216module_param(bfs, uint, 0644);
217MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend.");
218MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
219
214/******************************************************************************* 220/*******************************************************************************
215 * 221 *
216 * FUNCTION: acpi_enter_sleep_state 222 * FUNCTION: acpi_enter_sleep_state
@@ -278,16 +284,18 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
278 return_ACPI_STATUS(status); 284 return_ACPI_STATUS(status);
279 } 285 }
280 286
281 /* Execute the _GTS method */ 287 if (gts) {
288 /* Execute the _GTS method */
282 289
283 arg_list.count = 1; 290 arg_list.count = 1;
284 arg_list.pointer = &arg; 291 arg_list.pointer = &arg;
285 arg.type = ACPI_TYPE_INTEGER; 292 arg.type = ACPI_TYPE_INTEGER;
286 arg.integer.value = sleep_state; 293 arg.integer.value = sleep_state;
287 294
288 status = acpi_evaluate_object(NULL, METHOD_NAME__GTS, &arg_list, NULL); 295 status = acpi_evaluate_object(NULL, METHOD_NAME__GTS, &arg_list, NULL);
289 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 296 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
290 return_ACPI_STATUS(status); 297 return_ACPI_STATUS(status);
298 }
291 } 299 }
292 300
293 /* Get current value of PM1A control */ 301 /* Get current value of PM1A control */
@@ -513,18 +521,19 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
513 } 521 }
514 } 522 }
515 523
516 /* Execute the _BFS method */ 524 if (bfs) {
525 /* Execute the _BFS method */
517 526
518 arg_list.count = 1; 527 arg_list.count = 1;
519 arg_list.pointer = &arg; 528 arg_list.pointer = &arg;
520 arg.type = ACPI_TYPE_INTEGER; 529 arg.type = ACPI_TYPE_INTEGER;
521 arg.integer.value = sleep_state; 530 arg.integer.value = sleep_state;
522 531
523 status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL); 532 status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL);
524 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 533 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
525 ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); 534 ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
535 }
526 } 536 }
527
528 return_ACPI_STATUS(status); 537 return_ACPI_STATUS(status);
529} 538}
530 539