diff --git a/xen/arch/x86/boot/reloc-trampoline.c b/xen/arch/x86/boot/reloc-trampoline.c index d5548eb08f85..e35e7c78aa86 100644 --- a/xen/arch/x86/boot/reloc-trampoline.c +++ b/xen/arch/x86/boot/reloc-trampoline.c @@ -2,13 +2,15 @@ #include #include + +#include #include extern const int32_t __trampoline_rel_start[], __trampoline_rel_stop[]; extern const int32_t __trampoline_seg_start[], __trampoline_seg_stop[]; #if defined(__i386__) -void reloc_trampoline32(void) +void asmlinkage reloc_trampoline32(void) #elif defined (__x86_64__) void reloc_trampoline64(void) #else diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 9d3f2b71447e..1d8902a9a724 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -4,6 +4,8 @@ * therefore can define arch specific global variables. */ #include + +#include #include #include #include @@ -103,8 +105,6 @@ static void __init efi_arch_relocate_image(unsigned long delta) } } -void reloc_trampoline64(void); - static void __init relocate_trampoline(unsigned long phys) { trampoline_phys = phys; diff --git a/xen/arch/x86/include/asm/boot-helpers.h b/xen/arch/x86/include/asm/boot-helpers.h new file mode 100644 index 000000000000..391e16a73056 --- /dev/null +++ b/xen/arch/x86/include/asm/boot-helpers.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Declarations for helper functions compiled for both 32bit and 64bit. + * + * The 32bit forms are only used from assembly, so no declarations are + * provided. + */ +#ifndef X86_BOOT_HELPERS_H +#define X86_BOOT_HELPERS_H + +void reloc_trampoline64(void); + +#endif /* X86_BOOT_HELPERS_H */