Skip to content

Commit ec066de

Browse files
MrVansstabellini
authored andcommitted
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 ad67f5a("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 <[email protected]> Acked-by: Stefano Stabellini <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]>
1 parent 04ccbdc commit ec066de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/arm/xen/mm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ unsigned long xen_get_swiotlb_free_pages(unsigned int order)
2828

2929
for_each_memblock(memory, reg) {
3030
if (reg->base < (phys_addr_t)0xffffffff) {
31-
flags |= __GFP_DMA;
31+
if (IS_ENABLED(CONFIG_ZONE_DMA32))
32+
flags |= __GFP_DMA32;
33+
else
34+
flags |= __GFP_DMA;
3235
break;
3336
}
3437
}

0 commit comments

Comments
 (0)