提交 6defa2fe 编写于 作者: J Jiri Slaby 提交者: Len Brown

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: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 e6bd6760
...@@ -73,7 +73,9 @@ ENTRY(do_suspend_lowlevel) ...@@ -73,7 +73,9 @@ ENTRY(do_suspend_lowlevel)
addq $8, %rsp addq $8, %rsp
movl $3, %edi movl $3, %edi
xorl %eax, %eax 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 .align 4
resume_point: resume_point:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册