aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-02-15 16:46:45 -0500
committerLen Brown <len.brown@intel.com>2009-02-21 21:58:18 -0500
commit6defa2fe2019f3729933516fba5cfd75eecd07de (patch)
treeb83d864329067e9a8137b8cb4bcd5f75266885c5 /arch
parente6bd6760c92dc8475c79c4c4a8a16ac313c0b93d (diff)
x86_64: Fix S3 fail path
As acpi_enter_sleep_state can fail, take this into account in do_suspend_lowlevel and don't return to the do_suspend_lowlevel's caller. This would break (currently) fpu status and preempt count. Technically, this means use `call' instead of `jmp' and `jmp' to the `resume_point' after the `call' (i.e. if acpi_enter_sleep_state returns=fails). `resume_point' will handle the restore of fpu and preempt count gracefully. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/acpi/wakeup_64.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index b5dee6a0de3a..96258d9dc974 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -73,7 +73,9 @@ ENTRY(do_suspend_lowlevel)
73 addq $8, %rsp 73 addq $8, %rsp
74 movl $3, %edi 74 movl $3, %edi
75 xorl %eax, %eax 75 xorl %eax, %eax
76 jmp acpi_enter_sleep_state 76 call acpi_enter_sleep_state
77 /* in case something went wrong, restore the machine status and go on */
78 jmp resume_point
77 79
78 .align 4 80 .align 4
79resume_point: 81resume_point: