xen/efi: Fix build with clang-5.0
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Dec 2017 16:55:38 +0000 (16:55 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 14 Dec 2017 10:59:26 +0000 (10:59 +0000)
The clang-5.0 build is reliably failing with:

  Error: size of boot.o:.text is 0x01

which is because efi_arch_flush_dcache_area() exists as a single ret
instruction.  Mark it as __init like everything else in the files.

Spotted by Travis.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/arm/efi/efi-boot.h
xen/arch/x86/efi/efi-boot.h

index 56de26e9184fbe1a5c565e3bdc58af4f5e6eff0b..ca655ff003c99f48ef50fc67eb486b7566a95a27 100644 (file)
@@ -597,7 +597,7 @@ static void __init efi_arch_video_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
 {
 }
 
-static void efi_arch_flush_dcache_area(const void *vaddr, UINTN size)
+static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN size)
 {
     __flush_dcache_area(vaddr, size);
 }
index 8d295ff9afe4c7a809910e6037b69fe7c52d1d87..d30f688a5ad3fa8ba80a8ad2ca57d6fe3a9b6cdc 100644 (file)
@@ -668,7 +668,7 @@ static bool __init efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable)
     return true; /* x86 always uses a config file */
 }
 
-static void efi_arch_flush_dcache_area(const void *vaddr, UINTN size) { }
+static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN size) { }
 
 void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
 {