[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090210100816.GA27018@atrey.karlin.mff.cuni.cz>
Date: Tue, 10 Feb 2009 11:08:16 +0100
From: Pavel Machek <pavel@...e.cz>
To: Jiri Slaby <jirislaby@...il.com>
Cc: lenb@...nel.org, mingo@...hat.com, linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [PATCH 1/1] 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@...il.com>
> Cc: Len Brown <lenb@...nel.org>
> Cc: Pavel Machek <pavel@...e.cz>
Acked-by: Pavel Machek <pavel@...e.cz>
> Cc: Rafael J. Wysocki <rjw@...k.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:
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists