aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2012-03-20 22:01:49 -0400
committerLen Brown <len.brown@intel.com>2012-03-26 21:16:25 -0400
commit8a73b17e4c0e09cb5b80deee5451e29b830df4cc (patch)
tree292f555ca2aa42b4b4d756aca01a53b65df60970 /drivers/acpi/sleep.c
parent4acb6884b5568f19bd47173cba8bc1f2289d6baa (diff)
ACPICA: Sleep/Wake interfaces: optionally execute _GTS and _BFS
Enhanced the sleep/wake interfaces to optionally execute the _GTS method (Going To Sleep), and the _BFS method (Back From Sleep). Windows apparently does not execute these methods, and therefore these methods are often untested. It has been seen on some systems where the execution of these methods causes errors and also prevents the machine from entering S5. It is therefore suggested that host operating systems do not execute these methods by default. In the future, perhaps these methods can be optionally executed based on the age of the system and/or what is the newest version of Windows that the BIOS asks for via _OSI. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 4fda549fa599..8f1fb4520d24 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -250,7 +250,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
250 switch (acpi_state) { 250 switch (acpi_state) {
251 case ACPI_STATE_S1: 251 case ACPI_STATE_S1:
252 barrier(); 252 barrier();
253 status = acpi_enter_sleep_state(acpi_state); 253 status = acpi_enter_sleep_state(acpi_state,
254 ACPI_NO_OPTIONAL_METHODS);
254 break; 255 break;
255 256
256 case ACPI_STATE_S3: 257 case ACPI_STATE_S3:
@@ -265,7 +266,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
265 acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); 266 acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
266 267
267 /* Reprogram control registers and execute _BFS */ 268 /* Reprogram control registers and execute _BFS */
268 acpi_leave_sleep_state_prep(acpi_state); 269 acpi_leave_sleep_state_prep(acpi_state, ACPI_NO_OPTIONAL_METHODS);
269 270
270 /* ACPI 3.0 specs (P62) says that it's the responsibility 271 /* ACPI 3.0 specs (P62) says that it's the responsibility
271 * of the OSPM to clear the status bit [ implying that the 272 * of the OSPM to clear the status bit [ implying that the
@@ -534,9 +535,9 @@ static int acpi_hibernation_enter(void)
534 ACPI_FLUSH_CPU_CACHE(); 535 ACPI_FLUSH_CPU_CACHE();
535 536
536 /* This shouldn't return. If it returns, we have a problem */ 537 /* This shouldn't return. If it returns, we have a problem */
537 status = acpi_enter_sleep_state(ACPI_STATE_S4); 538 status = acpi_enter_sleep_state(ACPI_STATE_S4, ACPI_NO_OPTIONAL_METHODS);
538 /* Reprogram control registers and execute _BFS */ 539 /* Reprogram control registers and execute _BFS */
539 acpi_leave_sleep_state_prep(ACPI_STATE_S4); 540 acpi_leave_sleep_state_prep(ACPI_STATE_S4, ACPI_NO_OPTIONAL_METHODS);
540 541
541 return ACPI_SUCCESS(status) ? 0 : -EFAULT; 542 return ACPI_SUCCESS(status) ? 0 : -EFAULT;
542} 543}
@@ -549,7 +550,7 @@ static void acpi_hibernation_leave(void)
549 */ 550 */
550 acpi_enable(); 551 acpi_enable();
551 /* Reprogram control registers and execute _BFS */ 552 /* Reprogram control registers and execute _BFS */
552 acpi_leave_sleep_state_prep(ACPI_STATE_S4); 553 acpi_leave_sleep_state_prep(ACPI_STATE_S4, ACPI_NO_OPTIONAL_METHODS);
553 /* Check the hardware signature */ 554 /* Check the hardware signature */
554 if (facs && s4_hardware_signature != facs->hardware_signature) { 555 if (facs && s4_hardware_signature != facs->hardware_signature) {
555 printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " 556 printk(KERN_EMERG "ACPI: Hardware changed while hibernated, "
@@ -773,7 +774,7 @@ static void acpi_power_off(void)
773 /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ 774 /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
774 printk(KERN_DEBUG "%s called\n", __func__); 775 printk(KERN_DEBUG "%s called\n", __func__);
775 local_irq_disable(); 776 local_irq_disable();
776 acpi_enter_sleep_state(ACPI_STATE_S5); 777 acpi_enter_sleep_state(ACPI_STATE_S5, ACPI_NO_OPTIONAL_METHODS);
777} 778}
778 779
779/* 780/*