From: Jiri Slaby <jirislaby@gmail.com>
To: lenb@kernel.org
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>, Pavel Machek <pavel@suse.cz>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: [PATCH 1/1] x86_64: fix s3 fail path
Date: Mon, 9 Feb 2009 15:35:20 +0100 [thread overview]
Message-ID: <1234190120-6268-1-git-send-email-jirislaby@gmail.com> (raw)
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>
Cc: Len Brown <lenb@kernel.org>
Cc: Pavel Machek <pavel@suse.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/x86/kernel/acpi/wakeup_64.S | 4 +++-
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 b5dee6a..96258d9 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)
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:
--
1.6.1.3
next reply other threads:[~2009-02-09 14:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 14:35 Jiri Slaby [this message]
2009-02-10 10:08 ` Pavel Machek
2009-02-14 20:21 ` Rafael J. Wysocki
2009-02-14 20:25 ` Jiri Slaby
2009-02-14 21:22 ` Rafael J. Wysocki
2009-02-14 23:02 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234190120-6268-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@suse.cz \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®