* [PATCH 1/1] x86_64: fix s3 fail path
@ 2009-02-09 14:35 Jiri Slaby
2009-02-10 10:08 ` Pavel Machek
2009-02-14 20:21 ` Rafael J. Wysocki
0 siblings, 2 replies; 6+ messages in thread
From: Jiri Slaby @ 2009-02-09 14:35 UTC (permalink / raw)
To: lenb; +Cc: mingo, linux-kernel, Jiri Slaby, Pavel Machek, Rafael J. Wysocki
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] x86_64: fix s3 fail path
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
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2009-02-10 10:08 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, mingo, linux-kernel, Rafael J. Wysocki
> 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>
Acked-by: 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:
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] x86_64: fix s3 fail path
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
2009-02-14 20:25 ` Jiri Slaby
1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-02-14 20:21 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, mingo, linux-kernel, Pavel Machek
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:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] x86_64: fix s3 fail path
2009-02-14 20:21 ` Rafael J. Wysocki
@ 2009-02-14 20:25 ` Jiri Slaby
2009-02-14 21:22 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2009-02-14 20:25 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: lenb, mingo, linux-kernel, Pavel Machek
Rafael J. Wysocki napsal(a):
> 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.
It is applicable even after
[PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
from
http://lkml.org/lkml/2009/2/7/101
which is not present anywhere so far.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] x86_64: fix s3 fail path
2009-02-14 20:25 ` Jiri Slaby
@ 2009-02-14 21:22 ` Rafael J. Wysocki
2009-02-14 23:02 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-02-14 21:22 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, mingo, linux-kernel, Pavel Machek
On Saturday 14 February 2009, Jiri Slaby wrote:
> Rafael J. Wysocki napsal(a):
> > 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.
>
> It is applicable even after
> [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
> from
> http://lkml.org/lkml/2009/2/7/101
> which is not present anywhere so far.
Thanks, I'm going to push both patches through Len, if Ingo doesn't mind.
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] x86_64: fix s3 fail path
2009-02-14 21:22 ` Rafael J. Wysocki
@ 2009-02-14 23:02 ` Ingo Molnar
0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-02-14 23:02 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Jiri Slaby, lenb, mingo, linux-kernel, Pavel Machek
* Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Saturday 14 February 2009, Jiri Slaby wrote:
> > Rafael J. Wysocki napsal(a):
> > > 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.
> >
> > It is applicable even after
> > [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
> > from
> > http://lkml.org/lkml/2009/2/7/101
> > which is not present anywhere so far.
>
> Thanks, I'm going to push both patches through Len, if Ingo doesn't mind.
Fine with me.
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-14 23:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-02-14 20:25 ` Jiri Slaby
2009-02-14 21:22 ` Rafael J. Wysocki
2009-02-14 23:02 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox