xen/efi: Fix build with clang-5.0
PATCH 1/1 xen/efi: Fix build with clang-5.0
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.
---
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
For future discussion, Why are these implementations not inline? Why are we being special and allowing a header file and define functions and globals like this?
--- xen/arch/arm/efi/efi-boot.h | 2 +- xen/arch/x86/efi/efi-boot.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/efi/efi-boot.h +1 -1
@@ -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); }
xen/arch/x86/efi/efi-boot.h +1 -1
@@ -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) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Andrew Cooper
The clang-5.0 build is reliably failing with:
Error: size of boot.o:.text is
0x01which is because
efi_arch_flush_dcache_area()exists as a single ret instruction. Mark it as__initlike everything else in the files.Spotted by Travis.
Signed-off-by Andrew Cooper <[email protected]>
Quoted 42 lines
---
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>For future discussion, Why are these implementations not inline? Why are we being special and allowing a header file and define functions and globals like this?
--- xen/arch/arm/efi/efi-boot.h | 2 +- xen/arch/x86/efi/efi-boot.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)xen/arch/arm/efi/efi-boot.h +1
-1@@ -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); }xen/arch/x86/efi/efi-boot.h +1
-1@@ -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) {Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Jan Beulich
Acked-byQuoted 6 lines
Quoted 1 line
Quoted 1 line · On 13.12.17 at 22:51, <[email protected]> wrote:
Quoted 4 lines · Andrew Cooper
The clang-5.0 build is reliably failing with:
Error: size of boot.o:.text is
0x01
Quoted 8 lines
Quoted 6 lines
which is because
efi_arch_flush_dcache_area()exists as a single ret instruction. Mark it as__initlike everything else in the files.Spotted by Travis.
Signed-off-by Andrew Cooper <[email protected]>Reviewed-by Stefano Stabellini <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel