[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h



commit db9c4ad1b1abaef3c38027b9b2700d9250d13125
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Fri Jan 15 19:29:47 2021 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Jan 15 12:05:29 2021 -0800

    xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h
    
    Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split
    out mfn_t / gfn_t / pfn_t definitions and helpers":
    
    In file included from livepatch.c:13:0:
    /oss/xen/xen/include/asm/mm.h:32:28: error: field â??listâ?? has incomplete 
type
         struct page_list_entry list;
                                ^~~~
    /oss/xen/xen/include/asm/mm.h:53:43: error: â??MAX_ORDERâ?? undeclared here 
(not in a function); did you mean â??PFN_ORDERâ???
                     unsigned long first_dirty:MAX_ORDER + 1;
                                               ^~~~~~~~~
                                               PFN_ORDER
    /oss/xen/xen/include/asm/mm.h:53:31: error: bit-field â??first_dirtyâ?? 
width not an integer constant
                     unsigned long first_dirty:MAX_ORDER + 1;
                                   ^~~~~~~~~~~
    
    This is happening because asm/mm.h is included directly by livepatch.c.
    Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined.
    
    Resolve the build failure by including xen/mm.h rather than asm/mm.h.
    
    Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and 
helpers")
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/livepatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
index 915e9d926a..75e8adcfd6 100644
--- a/xen/arch/arm/livepatch.c
+++ b/xen/arch/arm/livepatch.c
@@ -6,11 +6,11 @@
 #include <xen/lib.h>
 #include <xen/livepatch_elf.h>
 #include <xen/livepatch.h>
+#include <xen/mm.h>
 #include <xen/vmap.h>
 
 #include <asm/cpufeature.h>
 #include <asm/livepatch.h>
-#include <asm/mm.h>
 
 /* Override macros from asm/page.h to make them work with mfn_t */
 #undef virt_to_mfn
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.