diff mbox series

[v7,03/11] x86/ACPI: annotate assembly function/data with type and size

Message ID 4f828e91-aa90-4b44-b778-234812e4f8e1@suse.com (mailing list archive)
State New
Headers show
Series (mostly) x86+Arm32: add/convert entry point annotations | expand

Commit Message

Jan Beulich Oct. 1, 2024, 3:14 p.m. UTC
Use the generic framework from xen/linkage.h.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v7: Make do_suspend_lowlevel() a single function.
v6: New.

Comments

Andrew Cooper Oct. 1, 2024, 4:51 p.m. UTC | #1
On 01/10/2024 4:14 pm, Jan Beulich wrote:
> Use the generic framework from xen/linkage.h.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> although...

> ---
> v7: Make do_suspend_lowlevel() a single function.
> v6: New.
>
> --- 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
> @@ -43,7 +43,7 @@ ENTRY(do_suspend_lowlevel)
>           *
>           * Everything else, including the stack, needs restoring.
>           */
> -ENTRY(s3_resume)
> +LABEL(s3_resume)
>          lgdt    boot_gdtr(%rip)
>  
>          mov     saved_cr0(%rip), %rax
> @@ -132,6 +132,7 @@ ENTRY(s3_resume)
>          pop     %rbx
>          pop     %rbp
>          ret
> +END(do_suspend_lowlevel)
>  
>  .data
>          .align 16
> @@ -142,5 +143,4 @@ saved_cr0:      .quad   0
>  saved_ssp:      .quad   0
>  #endif

... we do need something for these 3 variables, or they want to move
into a C file.

~Andrew
Jan Beulich Oct. 2, 2024, 5:56 a.m. UTC | #2
On 01.10.2024 18:51, Andrew Cooper wrote:
> On 01/10/2024 4:14 pm, Jan Beulich wrote:
>> Use the generic framework from xen/linkage.h.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> although...

Thanks.

>> @@ -132,6 +132,7 @@ ENTRY(s3_resume)
>>          pop     %rbx
>>          pop     %rbp
>>          ret
>> +END(do_suspend_lowlevel)
>>  
>>  .data
>>          .align 16
>> @@ -142,5 +143,4 @@ saved_cr0:      .quad   0
>>  saved_ssp:      .quad   0
>>  #endif
> 
> ... we do need something for these 3 variables, or they want to move
> into a C file.

We have DATA_LOCAL(). Moving to a C file would be odd, as they're not used
outside of this file (and hence aren't global).

Jan
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
@@ -43,7 +43,7 @@  ENTRY(do_suspend_lowlevel)
          *
          * Everything else, including the stack, needs restoring.
          */
-ENTRY(s3_resume)
+LABEL(s3_resume)
         lgdt    boot_gdtr(%rip)
 
         mov     saved_cr0(%rip), %rax
@@ -132,6 +132,7 @@  ENTRY(s3_resume)
         pop     %rbx
         pop     %rbp
         ret
+END(do_suspend_lowlevel)
 
 .data
         .align 16
@@ -142,5 +143,4 @@  saved_cr0:      .quad   0
 saved_ssp:      .quad   0
 #endif
 
-GLOBAL(saved_magic)
-        .long   0x9abcdef0
+ASM_INT(saved_magic, 0x9abcdef0)