summaryrefslogtreecommitdiff
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-24 05:35:24 (GMT)
committerLen Brown <len.brown@intel.com>2009-04-24 05:35:24 (GMT)
commitac0849fb6c66ca865270fda32bcbc39f6dd52de1 (patch)
treea103bf7e2a2c8ed3be63221a51233caefa32ad08 /drivers/acpi/sleep.c
parent09041daeea467090f57507473a3ec8ec0e68be6d (diff)
parent96f15efcea94545987715f453a8c2b8ea592d000 (diff)
downloadlinux-fsl-qoriq-ac0849fb6c66ca865270fda32bcbc39f6dd52de1.tar.xz
Merge branch 'bugzilla-13041' into release
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index d060e6f..01574a0 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -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;
@@ -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;
}