Commit e6bd6760 authored by Jiri Slaby's avatar Jiri Slaby Committed by Len Brown

x86_64: acpi/wakeup_64 cleanup

- remove %ds re-set, it's already set in wakeup_long64
- remove double labels and alignment (ENTRY already adds both)
- use meaningful resume point labelname
- skip alignment while jumping from wakeup_long64 to the resume point
- remove .size, .type and unused labels
[v2]
- added ENDPROCs
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Acked-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent adfafefd
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* Hooray, we are in Long 64-bit mode (but still running in low memory) * Hooray, we are in Long 64-bit mode (but still running in low memory)
*/ */
ENTRY(wakeup_long64) ENTRY(wakeup_long64)
wakeup_long64:
movq saved_magic, %rax movq saved_magic, %rax
movq $0x123456789abcdef0, %rdx movq $0x123456789abcdef0, %rdx
cmpq %rdx, %rax cmpq %rdx, %rax
...@@ -34,16 +33,12 @@ wakeup_long64: ...@@ -34,16 +33,12 @@ wakeup_long64:
movq saved_rip, %rax movq saved_rip, %rax
jmp *%rax jmp *%rax
ENDPROC(wakeup_long64)
bogus_64_magic: bogus_64_magic:
jmp bogus_64_magic jmp bogus_64_magic
.align 2 ENTRY(do_suspend_lowlevel)
.p2align 4,,15
.globl do_suspend_lowlevel
.type do_suspend_lowlevel,@function
do_suspend_lowlevel:
.LFB5:
subq $8, %rsp subq $8, %rsp
xorl %eax, %eax xorl %eax, %eax
call save_processor_state call save_processor_state
...@@ -67,7 +62,7 @@ do_suspend_lowlevel: ...@@ -67,7 +62,7 @@ do_suspend_lowlevel:
pushfq pushfq
popq pt_regs_flags(%rax) popq pt_regs_flags(%rax)
movq $.L97, saved_rip(%rip) movq $resume_point, saved_rip(%rip)
movq %rsp, saved_rsp movq %rsp, saved_rsp
movq %rbp, saved_rbp movq %rbp, saved_rbp
...@@ -79,13 +74,9 @@ do_suspend_lowlevel: ...@@ -79,13 +74,9 @@ do_suspend_lowlevel:
movl $3, %edi movl $3, %edi
xorl %eax, %eax xorl %eax, %eax
jmp acpi_enter_sleep_state jmp acpi_enter_sleep_state
.L97:
.p2align 4,,7
.L99:
.align 4
movl $24, %eax
movw %ax, %ds
.align 4
resume_point:
/* We don't restore %rax, it must be 0 anyway */ /* We don't restore %rax, it must be 0 anyway */
movq $saved_context, %rax movq $saved_context, %rax
movq saved_context_cr4(%rax), %rbx movq saved_context_cr4(%rax), %rbx
...@@ -117,12 +108,9 @@ do_suspend_lowlevel: ...@@ -117,12 +108,9 @@ do_suspend_lowlevel:
xorl %eax, %eax xorl %eax, %eax
addq $8, %rsp addq $8, %rsp
jmp restore_processor_state jmp restore_processor_state
.LFE5: ENDPROC(do_suspend_lowlevel)
.Lfe5:
.size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel
.data .data
ALIGN
ENTRY(saved_rbp) .quad 0 ENTRY(saved_rbp) .quad 0
ENTRY(saved_rsi) .quad 0 ENTRY(saved_rsi) .quad 0
ENTRY(saved_rdi) .quad 0 ENTRY(saved_rdi) .quad 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment