diff mbox series

[kvm-unit-tests,v2,14/23] lib: Avoid ms_abi for calls related to EFI on arm64

Message ID 20220506205605.359830-15-nikos.nikoleris@arm.com (mailing list archive)
State New, archived
Headers show
Series EFI and ACPI support for arm64 | expand

Commit Message

Nikos Nikoleris May 6, 2022, 8:55 p.m. UTC
x86_64 requires that EFI calls use the ms_abi calling convention. For
arm64 this is unnecessary.

Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
---
 lib/linux/efi.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Andrew Jones May 20, 2022, 2:02 p.m. UTC | #1
On Fri, May 06, 2022 at 09:55:56PM +0100, Nikos Nikoleris wrote:
> x86_64 requires that EFI calls use the ms_abi calling convention. For
> arm64 this is unnecessary.
> 
> Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
> ---
>  lib/linux/efi.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/linux/efi.h b/lib/linux/efi.h
> index e3aba1d..594eaca 100644
> --- a/lib/linux/efi.h
> +++ b/lib/linux/efi.h
> @@ -33,7 +33,11 @@ typedef u16 efi_char16_t;		/* UNICODE character */
>  typedef u64 efi_physical_addr_t;
>  typedef void *efi_handle_t;
>  
> +#ifdef __x86_64__
>  #define __efiapi __attribute__((ms_abi))
> +#else
> +#define __efiapi
> +#endif
>  
>  /*
>   * The UEFI spec and EDK2 reference implementation both define EFI_GUID as
> -- 
> 2.25.1
>

Reviewed-by: Andrew Jones <drjones@redhat.com>
diff mbox series

Patch

diff --git a/lib/linux/efi.h b/lib/linux/efi.h
index e3aba1d..594eaca 100644
--- a/lib/linux/efi.h
+++ b/lib/linux/efi.h
@@ -33,7 +33,11 @@  typedef u16 efi_char16_t;		/* UNICODE character */
 typedef u64 efi_physical_addr_t;
 typedef void *efi_handle_t;
 
+#ifdef __x86_64__
 #define __efiapi __attribute__((ms_abi))
+#else
+#define __efiapi
+#endif
 
 /*
  * The UEFI spec and EDK2 reference implementation both define EFI_GUID as