|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/S3: Expand macros in wakeup_prot.S
commit 7a011e2b8bc87a928c1060ccff22dcad126d09a6
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Dec 13 17:56:02 2019 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Dec 18 11:42:54 2019 +0000
x86/S3: Expand macros in wakeup_prot.S
Most users have been dropped, and they do nothing but obfuscate the
assembly.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/acpi/wakeup_prot.S | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index a81849fd2b..0ce96e26a9 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -2,14 +2,6 @@
.text
.code64
-#define GREG(x) %r##x
-#define SAVED_GREG(x) saved_r##x(%rip)
-#define DECLARE_GREG(x) saved_r##x: .quad 0
-#define SAVE_GREG(x) movq GREG(x), SAVED_GREG(x)
-#define LOAD_GREG(x) movq SAVED_GREG(x), GREG(x)
-
-#define REF(x) x(%rip)
-
ENTRY(do_suspend_lowlevel)
push %rbp
push %rbx
@@ -18,10 +10,10 @@ ENTRY(do_suspend_lowlevel)
push %r14
push %r15
- SAVE_GREG(sp)
+ mov %rsp, saved_rsp(%rip)
- mov %cr0, GREG(ax)
- mov GREG(ax), REF(saved_cr0)
+ mov %cr0, %rax
+ mov %rax, saved_cr0(%rip)
call save_rest_processor_state
@@ -45,12 +37,12 @@ ENTRY(do_suspend_lowlevel)
ENTRY(s3_resume)
lgdt boot_gdtr(%rip)
- mov REF(saved_cr0), GREG(ax)
- mov GREG(ax), %cr0
+ mov saved_cr0(%rip), %rax
+ mov %rax, %cr0
mov $__HYPERVISOR_DS64, %eax
mov %eax, %ss
- LOAD_GREG(sp)
+ mov saved_rsp(%rip), %rsp
/* Reload code selector */
pushq $__HYPERVISOR_CS
@@ -73,10 +65,8 @@ ENTRY(s3_resume)
.data
.align 16
+saved_rsp: .quad 0
+saved_cr0: .quad 0
+
GLOBAL(saved_magic)
.long 0x9abcdef0
-
- .align 8
-DECLARE_GREG(sp)
-
-saved_cr0: .quad 0
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |