[Xen-devel] [PATCH] x86/dom0: Fix build with clang

Andrew Cooper posted 1 patch 4 years, 1 month ago
Failed in applying to current master (apply log)
xen/arch/x86/hvm/dom0_build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Xen-devel] [PATCH] x86/dom0: Fix build with clang
Posted by Andrew Cooper 4 years, 1 month ago
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>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/hvm/dom0_build.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index c41504f22d..ee1d50acc6 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -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,
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH] x86/dom0: Fix build with clang
Posted by Roger Pau Monné 4 years, 1 month ago
On Thu, Mar 05, 2020 at 06:00:09PM +0000, Andrew Cooper wrote:
> 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>

Thanks!

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel