* [PATCH 1/1] x86_64: acpi/wakeup_64 cleanup
@ 2009-02-07 17:44 Jiri Slaby
2009-02-07 21:52 ` [PATCH v2 " Jiri Slaby
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2009-02-07 17:44 UTC (permalink / raw)
To: lenb; +Cc: pavel, rjw, linux-kernel, Jiri Slaby
- 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
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 | 24 +++++-------------------
1 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index bcc2934..d813da1 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -13,7 +13,6 @@
* Hooray, we are in Long 64-bit mode (but still running in low memory)
*/
ENTRY(wakeup_long64)
-wakeup_long64:
movq saved_magic, %rax
movq $0x123456789abcdef0, %rdx
cmpq %rdx, %rax
@@ -38,12 +37,7 @@ wakeup_long64:
bogus_64_magic:
jmp bogus_64_magic
- .align 2
- .p2align 4,,15
-.globl do_suspend_lowlevel
- .type do_suspend_lowlevel,@function
-do_suspend_lowlevel:
-.LFB5:
+ENTRY(do_suspend_lowlevel)
subq $8, %rsp
xorl %eax, %eax
call save_processor_state
@@ -67,7 +61,7 @@ do_suspend_lowlevel:
pushfq
popq pt_regs_flags(%rax)
- movq $.L97, saved_rip(%rip)
+ movq $resume_point, saved_rip(%rip)
movq %rsp, saved_rsp
movq %rbp, saved_rbp
@@ -79,13 +73,9 @@ do_suspend_lowlevel:
movl $3, %edi
xorl %eax, %eax
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 */
movq $saved_context, %rax
movq saved_context_cr4(%rax), %rbx
@@ -117,12 +107,8 @@ do_suspend_lowlevel:
xorl %eax, %eax
addq $8, %rsp
jmp restore_processor_state
-.LFE5:
-.Lfe5:
- .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel
-
+
.data
-ALIGN
ENTRY(saved_rbp) .quad 0
ENTRY(saved_rsi) .quad 0
ENTRY(saved_rdi) .quad 0
--
1.6.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
2009-02-07 17:44 [PATCH 1/1] x86_64: acpi/wakeup_64 cleanup Jiri Slaby
@ 2009-02-07 21:52 ` Jiri Slaby
2009-02-07 22:08 ` Cyrill Gorcunov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jiri Slaby @ 2009-02-07 21:52 UTC (permalink / raw)
To: lenb; +Cc: gorcunov, linux-kernel, Jiri Slaby, Pavel Machek,
Rafael J. Wysocki
- 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: 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 | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index bcc2934..b5dee6a 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -13,7 +13,6 @@
* Hooray, we are in Long 64-bit mode (but still running in low memory)
*/
ENTRY(wakeup_long64)
-wakeup_long64:
movq saved_magic, %rax
movq $0x123456789abcdef0, %rdx
cmpq %rdx, %rax
@@ -34,16 +33,12 @@ wakeup_long64:
movq saved_rip, %rax
jmp *%rax
+ENDPROC(wakeup_long64)
bogus_64_magic:
jmp bogus_64_magic
- .align 2
- .p2align 4,,15
-.globl do_suspend_lowlevel
- .type do_suspend_lowlevel,@function
-do_suspend_lowlevel:
-.LFB5:
+ENTRY(do_suspend_lowlevel)
subq $8, %rsp
xorl %eax, %eax
call save_processor_state
@@ -67,7 +62,7 @@ do_suspend_lowlevel:
pushfq
popq pt_regs_flags(%rax)
- movq $.L97, saved_rip(%rip)
+ movq $resume_point, saved_rip(%rip)
movq %rsp, saved_rsp
movq %rbp, saved_rbp
@@ -79,13 +74,9 @@ do_suspend_lowlevel:
movl $3, %edi
xorl %eax, %eax
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 */
movq $saved_context, %rax
movq saved_context_cr4(%rax), %rbx
@@ -117,12 +108,9 @@ do_suspend_lowlevel:
xorl %eax, %eax
addq $8, %rsp
jmp restore_processor_state
-.LFE5:
-.Lfe5:
- .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel
-
+ENDPROC(do_suspend_lowlevel)
+
.data
-ALIGN
ENTRY(saved_rbp) .quad 0
ENTRY(saved_rsi) .quad 0
ENTRY(saved_rdi) .quad 0
--
1.6.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
2009-02-07 21:52 ` [PATCH v2 " Jiri Slaby
@ 2009-02-07 22:08 ` Cyrill Gorcunov
2009-02-07 23:32 ` Rafael J. Wysocki
2009-02-08 8:10 ` Pavel Machek
2 siblings, 0 replies; 5+ messages in thread
From: Cyrill Gorcunov @ 2009-02-07 22:08 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, linux-kernel, Pavel Machek, Rafael J. Wysocki
[Jiri Slaby - Sat, Feb 07, 2009 at 10:52:38PM +0100]
| - 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: 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 | 26 +++++++-------------------
| 1 files changed, 7 insertions(+), 19 deletions(-)
|
| diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
| index bcc2934..b5dee6a 100644
| --- a/arch/x86/kernel/acpi/wakeup_64.S
| +++ b/arch/x86/kernel/acpi/wakeup_64.S
| @@ -13,7 +13,6 @@
| * Hooray, we are in Long 64-bit mode (but still running in low memory)
| */
| ENTRY(wakeup_long64)
| -wakeup_long64:
| movq saved_magic, %rax
| movq $0x123456789abcdef0, %rdx
| cmpq %rdx, %rax
| @@ -34,16 +33,12 @@ wakeup_long64:
|
| movq saved_rip, %rax
| jmp *%rax
| +ENDPROC(wakeup_long64)
|
| bogus_64_magic:
| jmp bogus_64_magic
|
| - .align 2
| - .p2align 4,,15
| -.globl do_suspend_lowlevel
| - .type do_suspend_lowlevel,@function
| -do_suspend_lowlevel:
| -.LFB5:
| +ENTRY(do_suspend_lowlevel)
| subq $8, %rsp
| xorl %eax, %eax
| call save_processor_state
| @@ -67,7 +62,7 @@ do_suspend_lowlevel:
| pushfq
| popq pt_regs_flags(%rax)
|
| - movq $.L97, saved_rip(%rip)
| + movq $resume_point, saved_rip(%rip)
|
| movq %rsp, saved_rsp
| movq %rbp, saved_rbp
| @@ -79,13 +74,9 @@ do_suspend_lowlevel:
| movl $3, %edi
| xorl %eax, %eax
| 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 */
| movq $saved_context, %rax
| movq saved_context_cr4(%rax), %rbx
| @@ -117,12 +108,9 @@ do_suspend_lowlevel:
| xorl %eax, %eax
| addq $8, %rsp
| jmp restore_processor_state
| -.LFE5:
| -.Lfe5:
| - .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel
| -
| +ENDPROC(do_suspend_lowlevel)
| +
| .data
| -ALIGN
| ENTRY(saved_rbp) .quad 0
| ENTRY(saved_rsi) .quad 0
| ENTRY(saved_rdi) .quad 0
| --
| 1.6.1.2
|
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Thanks Jiri!
- Cyrill -
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
2009-02-07 21:52 ` [PATCH v2 " Jiri Slaby
2009-02-07 22:08 ` Cyrill Gorcunov
@ 2009-02-07 23:32 ` Rafael J. Wysocki
2009-02-08 8:10 ` Pavel Machek
2 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2009-02-07 23:32 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, gorcunov, linux-kernel, Pavel Machek
On Saturday 07 February 2009, Jiri Slaby wrote:
> - 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: Jiri Slaby <jirislaby@gmail.com>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Pavel Machek <pavel@suse.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> arch/x86/kernel/acpi/wakeup_64.S | 26 +++++++-------------------
> 1 files changed, 7 insertions(+), 19 deletions(-)
>
> diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
> index bcc2934..b5dee6a 100644
> --- a/arch/x86/kernel/acpi/wakeup_64.S
> +++ b/arch/x86/kernel/acpi/wakeup_64.S
> @@ -13,7 +13,6 @@
> * Hooray, we are in Long 64-bit mode (but still running in low memory)
> */
> ENTRY(wakeup_long64)
> -wakeup_long64:
> movq saved_magic, %rax
> movq $0x123456789abcdef0, %rdx
> cmpq %rdx, %rax
> @@ -34,16 +33,12 @@ wakeup_long64:
>
> movq saved_rip, %rax
> jmp *%rax
> +ENDPROC(wakeup_long64)
>
> bogus_64_magic:
> jmp bogus_64_magic
>
> - .align 2
> - .p2align 4,,15
> -.globl do_suspend_lowlevel
> - .type do_suspend_lowlevel,@function
> -do_suspend_lowlevel:
> -.LFB5:
> +ENTRY(do_suspend_lowlevel)
> subq $8, %rsp
> xorl %eax, %eax
> call save_processor_state
> @@ -67,7 +62,7 @@ do_suspend_lowlevel:
> pushfq
> popq pt_regs_flags(%rax)
>
> - movq $.L97, saved_rip(%rip)
> + movq $resume_point, saved_rip(%rip)
>
> movq %rsp, saved_rsp
> movq %rbp, saved_rbp
> @@ -79,13 +74,9 @@ do_suspend_lowlevel:
> movl $3, %edi
> xorl %eax, %eax
> 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 */
> movq $saved_context, %rax
> movq saved_context_cr4(%rax), %rbx
> @@ -117,12 +108,9 @@ do_suspend_lowlevel:
> xorl %eax, %eax
> addq $8, %rsp
> jmp restore_processor_state
> -.LFE5:
> -.Lfe5:
> - .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel
> -
> +ENDPROC(do_suspend_lowlevel)
> +
> .data
> -ALIGN
> ENTRY(saved_rbp) .quad 0
> ENTRY(saved_rsi) .quad 0
> ENTRY(saved_rdi) .quad 0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/1] x86_64: acpi/wakeup_64 cleanup
2009-02-07 21:52 ` [PATCH v2 " Jiri Slaby
2009-02-07 22:08 ` Cyrill Gorcunov
2009-02-07 23:32 ` Rafael J. Wysocki
@ 2009-02-08 8:10 ` Pavel Machek
2 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2009-02-08 8:10 UTC (permalink / raw)
To: Jiri Slaby; +Cc: lenb, gorcunov, linux-kernel, Rafael J. Wysocki
On Sat 2009-02-07 22:52:38, Jiri Slaby wrote:
> - 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: Jiri Slaby <jirislaby@gmail.com>
> Cc: Len Brown <lenb@kernel.org>
Acked-by: Pavel Machek <pavel@suse.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-08 8:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07 17:44 [PATCH 1/1] x86_64: acpi/wakeup_64 cleanup Jiri Slaby
2009-02-07 21:52 ` [PATCH v2 " Jiri Slaby
2009-02-07 22:08 ` Cyrill Gorcunov
2009-02-07 23:32 ` Rafael J. Wysocki
2009-02-08 8:10 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox