diff mbox series

[v6,4/7] x86/ACPI: annotate assembly functions with type and size

Message ID cbc04b39-44cd-4f1f-a011-5d9d313f24d3@suse.com (mailing list archive)
State New
Headers show
Series [v6,1/7] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions | expand

Commit Message

Jan Beulich Feb. 7, 2024, 1:37 p.m. UTC
Use the generic framework from xen/linkage.h.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
The .Lsuspend_err label is used in a cross-function manner here, but
it's not clear to me what - if anything - to do about this.
---
v6: New.

Comments

Andrew Cooper Feb. 7, 2024, 2 p.m. UTC | #1
On 07/02/2024 1:37 pm, Jan Beulich wrote:
> Use the generic framework from xen/linkage.h.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> The .Lsuspend_err label is used in a cross-function manner here, but
> it's not clear to me what - if anything - to do about this.

Well - again like VMX, this is special CODE.

It really is one function, do_suspend_lowlevel() - see how it's caller
uses it, with a magic position in the middle that is joined by the S3 path.

s3_resume should be a CODE too, or whatever we call a not-LABEL.

~Andrew
diff mbox series

Patch

--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -7,7 +7,7 @@ 
         .text
         .code64
 
-ENTRY(do_suspend_lowlevel)
+FUNC(do_suspend_lowlevel)
         push    %rbp
         push    %rbx
         push    %r12
@@ -32,6 +32,7 @@  ENTRY(do_suspend_lowlevel)
 
         /* It seems we didn't suspend.  Get out of here. */
         jmp     .Lsuspend_err
+END(do_suspend_lowlevel)
 
         /*
          * do_suspend_lowlevel() is arranged to behave as a regular function
@@ -43,7 +44,7 @@  ENTRY(do_suspend_lowlevel)
          *
          * Everything else, including the stack, needs restoring.
          */
-ENTRY(s3_resume)
+FUNC(s3_resume)
         lgdt    boot_gdtr(%rip)
 
         mov     saved_cr0(%rip), %rax
@@ -132,6 +133,7 @@  ENTRY(s3_resume)
         pop     %rbx
         pop     %rbp
         ret
+END(s3_resume)
 
 .data
         .align 16
@@ -142,5 +144,4 @@  saved_cr0:      .quad   0
 saved_ssp:      .quad   0
 #endif
 
-GLOBAL(saved_magic)
-        .long   0x9abcdef0
+ASM_INT(saved_magic, 0x9abcdef0)