Skip to contentSkip to conversation

x86/dom0: Fix build with clang

PATCH In review Andrew Cooper 2 participants 2 messages Mar 5, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/dom0: Fix build with clang

find_memory() isn't marked as __init, so if it isn't fully inlined, it ends up tripping:

Error: size of dom0_build.o:.text is 0x0c1

Fixes 73b47eea21 "x86/dom0: improve PVH initrd and metadata placement"

---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/hvm/dom0_build.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/hvm/dom0_build.c +2 -2
index c41504f22d..ee1d50acc6 100644
@@ -490,8 +490,8 @@ static int __init pvh_populate_p2m(struct domain *d)
 #undef MB1_PAGES
 }
 
-static paddr_t find_memory(const struct domain *d, const struct elf_binary *elf,
-                           size_t size)
+static paddr_t __init find_memory(
+    const struct domain *d, const struct elf_binary *elf, size_t size)
 {
     paddr_t kernel_start = (paddr_t)elf->dest_base & PAGE_MASK;
     paddr_t kernel_end = ROUNDUP((paddr_t)elf->dest_base + elf->dest_size,
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Andrew Cooper

find_memory() isn't marked as __init, so if it isn't fully inlined, it ends up tripping:

Error: size of dom0_build.o:.text is 0x0c1

Fixes 73b47eea21 "x86/dom0: improve PVH initrd and metadata placement"

Thanks!

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel