[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH ARM v10 2/2] arm: build system
On Tue, 2015-09-01 at 17:35 +0100, Ian Campbell wrote: > Lastly I'm afraid the build rune supplied in the commit message doesn't > work for me, lots of -Werror=int-to-pointer-cast, see attached output from: The patch below resolves this aspect for me. I suspect the use of & 0xffffffff is unnecessary and may also hide real bugs, but I didn't try touching it yet. With that I am left with: mm.c: In function âarch_init_gnttabâ: mm.c:130:105: error: assignment from incompatible pointer type [-Werror] set_xen_guest_handle(setup.frame_list, frames); The field setup.frame_list is (from include/xen/grant_table.h) struct gnttab_setup_table { /* IN parameters. */ domid_t dom; uint32_t nr_frames; /* OUT parameters. */ int16_t status; /* => enum grant_status */ #if __XEN_INTERFACE_VERSION__ < 0x00040300 XEN_GUEST_HANDLE(ulong) frame_list; #else XEN_GUEST_HANDLE(xen_pfn_t) frame_list; #endif }; and Config.mk says: XEN_INTERFACE_VERSION := 0x00030205 So setup.frame_list is (incorrectly) a ulong here, while frames is (correctly) of xen_pfn_t. I don't see how XEN_INTERFACE_VERSION := 0x00030205 can ever work on ARM. NaÃvely just bumping it to 0x00040500 just showed that lots of places would need updating to match that change. Ian. 8>--------- From 38ab51a7b03f560ba0900e5e8faf943620f628e0 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@xxxxxxxxxx> Date: Fri, 4 Sep 2015 11:38:39 +0100 Subject: [PATCH] arm: Use uintptr_t in to_phys/to_virt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids lots of: mm.c: In function âalloc_pagesâ: mm.c:297:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] map_alloc(PHYS_PFN(to_phys(alloc_ch)), 1UL<<order); Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- include/arm/arch_mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/arm/arch_mm.h b/include/arm/arch_mm.h index 085d4e5..f7fb66f 100644 --- a/include/arm/arch_mm.h +++ b/include/arm/arch_mm.h @@ -14,8 +14,8 @@ extern uint32_t physical_address_offset; /* Add this to a virtual address to get #define L1_PAGETABLE_SHIFT 12 -#define to_phys(x) (((paddr_t)(x)+physical_address_offset) & 0xffffffff) -#define to_virt(x) ((void *)(((x)-physical_address_offset) & 0xffffffff)) +#define to_phys(x) (((paddr_t)(uintptr_t)(x)+physical_address_offset) & 0xffffffff) +#define to_virt(x) ((void *)(((uintptr_t)(x)-physical_address_offset) & 0xffffffff)) #define PFN_UP(x) (unsigned long)(((x) + PAGE_SIZE-1) >> L1_PAGETABLE_SHIFT) #define PFN_DOWN(x) (unsigned long)((x) >> L1_PAGETABLE_SHIFT) -- 2.1.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |