diff options
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 779e4e500df4..01574a066534 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -300,9 +300,9 @@ static int acpi_suspend_state_valid(suspend_state_t pm_state) | |||
300 | static struct platform_suspend_ops acpi_suspend_ops = { | 300 | static struct platform_suspend_ops acpi_suspend_ops = { |
301 | .valid = acpi_suspend_state_valid, | 301 | .valid = acpi_suspend_state_valid, |
302 | .begin = acpi_suspend_begin, | 302 | .begin = acpi_suspend_begin, |
303 | .prepare = acpi_pm_prepare, | 303 | .prepare_late = acpi_pm_prepare, |
304 | .enter = acpi_suspend_enter, | 304 | .enter = acpi_suspend_enter, |
305 | .finish = acpi_pm_finish, | 305 | .wake = acpi_pm_finish, |
306 | .end = acpi_pm_end, | 306 | .end = acpi_pm_end, |
307 | }; | 307 | }; |
308 | 308 | ||
@@ -328,9 +328,9 @@ static int acpi_suspend_begin_old(suspend_state_t pm_state) | |||
328 | static struct platform_suspend_ops acpi_suspend_ops_old = { | 328 | static struct platform_suspend_ops acpi_suspend_ops_old = { |
329 | .valid = acpi_suspend_state_valid, | 329 | .valid = acpi_suspend_state_valid, |
330 | .begin = acpi_suspend_begin_old, | 330 | .begin = acpi_suspend_begin_old, |
331 | .prepare = acpi_pm_disable_gpes, | 331 | .prepare_late = acpi_pm_disable_gpes, |
332 | .enter = acpi_suspend_enter, | 332 | .enter = acpi_suspend_enter, |
333 | .finish = acpi_pm_finish, | 333 | .wake = acpi_pm_finish, |
334 | .end = acpi_pm_end, | 334 | .end = acpi_pm_end, |
335 | .recover = acpi_pm_finish, | 335 | .recover = acpi_pm_finish, |
336 | }; | 336 | }; |
@@ -713,6 +713,32 @@ static void acpi_power_off(void) | |||
713 | acpi_enter_sleep_state(ACPI_STATE_S5); | 713 | acpi_enter_sleep_state(ACPI_STATE_S5); |
714 | } | 714 | } |
715 | 715 | ||
716 | /* | ||
717 | * ACPI 2.0 created the optional _GTS and _BFS, | ||
718 | * but industry adoption has been neither rapid nor broad. | ||
719 | * | ||
720 | * Linux gets into trouble when it executes poorly validated | ||
721 | * paths through the BIOS, so disable _GTS and _BFS by default, | ||
722 | * but do speak up and offer the option to enable them. | ||
723 | */ | ||
724 | void __init acpi_gts_bfs_check(void) | ||
725 | { | ||
726 | acpi_handle dummy; | ||
727 | |||
728 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__GTS, &dummy))) | ||
729 | { | ||
730 | printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); | ||
731 | printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " | ||
732 | "please notify linux-acpi@vger.kernel.org\n"); | ||
733 | } | ||
734 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__BFS, &dummy))) | ||
735 | { | ||
736 | printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); | ||
737 | printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " | ||
738 | "please notify linux-acpi@vger.kernel.org\n"); | ||
739 | } | ||
740 | } | ||
741 | |||
716 | int __init acpi_sleep_init(void) | 742 | int __init acpi_sleep_init(void) |
717 | { | 743 | { |
718 | acpi_status status; | 744 | acpi_status status; |
@@ -771,5 +797,6 @@ int __init acpi_sleep_init(void) | |||
771 | * object can also be evaluated when the system enters S5. | 797 | * object can also be evaluated when the system enters S5. |
772 | */ | 798 | */ |
773 | register_reboot_notifier(&tts_notifier); | 799 | register_reboot_notifier(&tts_notifier); |
800 | acpi_gts_bfs_check(); | ||
774 | return 0; | 801 | return 0; |
775 | } | 802 | } |