aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-09-16 09:51:33 +0000
committerStefano Stabellini <sstabellini@kernel.org>2019-10-01 18:50:07 -0700
commitec066de1a567169c4737a5933218c329cedf52bd (patch)
treeb57ef9e45187890897c15885e13e144abe0f3233 /arch
parentxen/balloon: Clear PG_offline in balloon_retrieve() (diff)
downloadlinux-dev-ec066de1a567169c4737a5933218c329cedf52bd.tar.xz
linux-dev-ec066de1a567169c4737a5933218c329cedf52bd.zip
arm: xen: mm: use __GPF_DMA32 for arm64
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 add a check if CONFIG_ZONE_DMA32 is enabled use __GFP_DMA32. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/xen/mm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c
index d33b77e9add3..018093fef80a 100644
--- a/arch/arm/xen/mm.c
+++ b/arch/arm/xen/mm.c
@@ -28,7 +28,10 @@ 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;
+ if (IS_ENABLED(CONFIG_ZONE_DMA32))
+ flags |= __GFP_DMA32;
+ else
+ flags |= __GFP_DMA;
break;
}
}