Skip to content

Commit

Permalink
x86_64: Fix S3 fail path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jirislaby authored and lenb committed Feb 22, 2009
1 parent e6bd676 commit 6defa2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/kernel/acpi/wakeup_64.S
Expand Up @@ -73,7 +73,9 @@ ENTRY(do_suspend_lowlevel)
addq $8, %rsp
movl $3, %edi
xorl %eax, %eax
jmp acpi_enter_sleep_state
call acpi_enter_sleep_state
/* in case something went wrong, restore the machine status and go on */
jmp resume_point

.align 4
resume_point:
Expand Down

0 comments on commit 6defa2f

Please sign in to comment.