x86_64: fix s3 fail path
Subsystems (3)
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.
--- arch/x86/kernel/acpi/wakeup_64.S | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/x86/kernel/acpi/wakeup_64.S +3 -1
@@ -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:
Signature · 1 line
1.6.1.3
Quoted 4 lines
As
acpi_enter_sleep_statecan fail, take this into account indo_suspend_lowleveland don't return to the do_suspend_lowlevel's caller. This would break (currently) fpu status and preempt count.
Quoted 8 lines
Technically, this means use
call' instead ofjmp' andjmp' to theresume_point' after thecall' (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 <[email protected]>Cc Len Brown <[email protected]>Cc Pavel Machek <[email protected]>
Quoted 20 lines
Cc Rafael J. Wysocki <[email protected]>--- arch/x86/kernel/acpi/wakeup_64.S | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)arch/x86/kernel/acpi/wakeup_64.S +3
-1@@ -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:
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 9 lines · Jiri Slaby
As
acpi_enter_sleep_statecan fail, take this into account indo_suspend_lowleveland 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 ofjmp' andjmp' to theresume_point' after thecall' (i.e. if acpi_enter_sleep_state returns=fails).resume_point' will handle the restore of fpu and preempt count gracefully.
Quoted 4 lines
Signed-off-by Jiri Slaby <[email protected]>Cc Len Brown <[email protected]>Cc Pavel Machek <[email protected]>Cc Rafael J. Wysocki <[email protected]>
What kernel is this patch against? It doesn't apply to the mainline.
Thanks,
Rafael
Quoted 19 lines
--- arch/x86/kernel/acpi/wakeup_64.S | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)arch/x86/kernel/acpi/wakeup_64.S +3
-1@@ -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:
Rafael J. Wysocki napsal(a):
Quoted 10 lines · Jiri Slaby
Quoted 9 lines
As
acpi_enter_sleep_statecan fail, take this into account indo_suspend_lowleveland 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 ofjmp' andjmp' to theresume_point' after thecall' (i.e. if acpi_enter_sleep_state returns=fails).resume_point' will handle the restore of fpu and preempt count gracefully.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Jiri Slaby <[email protected]>Cc Len Brown <[email protected]>Cc Pavel Machek <[email protected]>Cc Rafael J. Wysocki <[email protected]>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.
Quoted 16 lines · Jiri Slaby
Rafael J. Wysocki napsal(a):
Quoted 15 lines · Jiri Slaby
Quoted 13 lines
As
acpi_enter_sleep_statecan fail, take this into account indo_suspend_lowleveland 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 ofjmp' andjmp' to theresume_point' after thecall' (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 <[email protected]>Cc Len Brown <[email protected]>Cc Pavel Machek <[email protected]>Cc Rafael J. Wysocki <[email protected]>
Quoted 7 lines
Quoted 1 line
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
Quoted 19 lines · Rafael J. Wysocki
Quoted 18 lines · Jiri Slaby
Rafael J. Wysocki napsal(a):
Quoted 16 lines · Jiri Slaby
Quoted 9 lines
As
acpi_enter_sleep_statecan fail, take this into account indo_suspend_lowleveland 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 ofjmp' andjmp' to theresume_point' after thecall' (i.e. if acpi_enter_sleep_state returns=fails).resume_point' will handle the restore of fpu and preempt count gracefully.Quoted 4 lines
Signed-off-by Jiri Slaby <[email protected]>Cc Len Brown <[email protected]>Cc Pavel Machek <[email protected]>Cc Rafael J. Wysocki <[email protected]>What kernel is this patch against? It doesn't apply to the mainline.
Quoted 7 lines
Quoted 5 lines
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