[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2] arm: xen: mm: use __GPF_DMA32 for arm64
From: Peng Fan <peng.fan@xxxxxxx> arm64 shares some code under arch/arm/xen, including mm.c. However ZONE_DMA is removed by commit ad67f5a6545("arm64: replace ZONE_DMA with ZONE_DMA32"). So introduce xen_set_gfp_dma for arm32/arm64 and using __GFP_DMA for the former and __GFP_DMA32 for the latter. Signed-off-by: Peng Fan <peng.fan@xxxxxxx> --- V2: Follow suggestion from Stefano, introduce static inline void xen_set_gfp_dma(gfp_t *flags) for arm32/arm64, and for arm64 using __GFP_DMA for the former and __GFP_DMA32 for the latter. arch/arm/include/asm/xen/page.h | 5 +++++ arch/arm/xen/mm.c | 2 +- arch/arm64/include/asm/xen/page.h | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 31bbc803cecb..d08309c45e6c 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h @@ -1 +1,6 @@ #include <xen/arm/page.h> + +static inline void xen_set_gfp_dma(gfp_t *flags) +{ + *flags |= __GFP_DMA; +} diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c index d33b77e9add3..828f49dc95f9 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c @@ -28,7 +28,7 @@ unsigned long xen_get_swiotlb_free_pages(unsigned int order) for_each_memblock(memory, reg) { if (reg->base < (phys_addr_t)0xffffffff) { - flags |= __GFP_DMA; + xen_set_gfp_dma(&flags); break; } } diff --git a/arch/arm64/include/asm/xen/page.h b/arch/arm64/include/asm/xen/page.h index 31bbc803cecb..5eeabf2c6494 100644 --- a/arch/arm64/include/asm/xen/page.h +++ b/arch/arm64/include/asm/xen/page.h @@ -1 +1,6 @@ #include <xen/arm/page.h> + +static inline void xen_set_gfp_dma(gfp_t *flags) +{ + *flags |= __GFP_DMA32; +} -- 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |