]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/dom0: Fix build with clang
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Mar 2020 17:57:37 +0000 (17:57 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Mar 2020 18:11:51 +0000 (18:11 +0000)
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"
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/dom0_build.c

index c41504f22d43c1cb5749e5477de782a539accafb..ee1d50acc6e2ddfd0652f07691ee18f9ec01b7f4 100644 (file)
@@ -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,