Loading drivers/acpi/acpica/hwsleep.c +26 −17 Original line number Diff line number Diff line Loading @@ -211,6 +211,12 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) static unsigned int gts, bfs; module_param(gts, uint, 0644); module_param(bfs, uint, 0644); MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend."); MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state Loading Loading @@ -278,6 +284,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) return_ACPI_STATUS(status); } if (gts) { /* Execute the _GTS method */ arg_list.count = 1; Loading @@ -289,6 +296,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { return_ACPI_STATUS(status); } } /* Get current value of PM1A control */ Loading Loading @@ -513,6 +521,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) } } if (bfs) { /* Execute the _BFS method */ arg_list.count = 1; Loading @@ -524,7 +533,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); } } return_ACPI_STATUS(status); } Loading drivers/acpi/sleep.c +27 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,32 @@ static void acpi_power_off(void) acpi_enter_sleep_state(ACPI_STATE_S5); } /* * ACPI 2.0 created the optional _GTS and _BFS, * but industry adoption has been neither rapid nor broad. * * Linux gets into trouble when it executes poorly validated * paths through the BIOS, so disable _GTS and _BFS by default, * but do speak up and offer the option to enable them. */ void __init acpi_gts_bfs_check(void) { acpi_handle dummy; if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__GTS, &dummy))) { printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " "please notify linux-acpi@vger.kernel.org\n"); } if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__BFS, &dummy))) { printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " "please notify linux-acpi@vger.kernel.org\n"); } } int __init acpi_sleep_init(void) { acpi_status status; Loading Loading @@ -771,5 +797,6 @@ int __init acpi_sleep_init(void) * object can also be evaluated when the system enters S5. */ register_reboot_notifier(&tts_notifier); acpi_gts_bfs_check(); return 0; } Loading
drivers/acpi/acpica/hwsleep.c +26 −17 Original line number Diff line number Diff line Loading @@ -211,6 +211,12 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) static unsigned int gts, bfs; module_param(gts, uint, 0644); module_param(bfs, uint, 0644); MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend."); MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state Loading Loading @@ -278,6 +284,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) return_ACPI_STATUS(status); } if (gts) { /* Execute the _GTS method */ arg_list.count = 1; Loading @@ -289,6 +296,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { return_ACPI_STATUS(status); } } /* Get current value of PM1A control */ Loading Loading @@ -513,6 +521,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) } } if (bfs) { /* Execute the _BFS method */ arg_list.count = 1; Loading @@ -524,7 +533,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); } } return_ACPI_STATUS(status); } Loading
drivers/acpi/sleep.c +27 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,32 @@ static void acpi_power_off(void) acpi_enter_sleep_state(ACPI_STATE_S5); } /* * ACPI 2.0 created the optional _GTS and _BFS, * but industry adoption has been neither rapid nor broad. * * Linux gets into trouble when it executes poorly validated * paths through the BIOS, so disable _GTS and _BFS by default, * but do speak up and offer the option to enable them. */ void __init acpi_gts_bfs_check(void) { acpi_handle dummy; if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__GTS, &dummy))) { printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " "please notify linux-acpi@vger.kernel.org\n"); } if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__BFS, &dummy))) { printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " "please notify linux-acpi@vger.kernel.org\n"); } } int __init acpi_sleep_init(void) { acpi_status status; Loading Loading @@ -771,5 +797,6 @@ int __init acpi_sleep_init(void) * object can also be evaluated when the system enters S5. */ register_reboot_notifier(&tts_notifier); acpi_gts_bfs_check(); return 0; }