public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: lenb@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org,
	Pavel Machek <pavel@suse.cz>
Subject: Re: [PATCH 1/1] x86_64: fix s3 fail path
Date: Sat, 14 Feb 2009 21:21:46 +0100	[thread overview]
Message-ID: <200902142121.46987.rjw@sisk.pl> (raw)
In-Reply-To: <1234190120-6268-1-git-send-email-jirislaby@gmail.com>

On Monday 09 February 2009, Jiri Slaby wrote:
> 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>

What kernel is this patch against?  It doesn't apply to the mainline.

Thanks,
Rafael


> ---
>  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:

  parent reply	other threads:[~2009-02-14 20:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 14:35 [PATCH 1/1] x86_64: fix s3 fail path Jiri Slaby
2009-02-10 10:08 ` Pavel Machek
2009-02-14 20:21 ` Rafael J. Wysocki [this message]
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=200902142121.46987.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=jirislaby@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@suse.cz \
    /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