Skip to content

Commit

Permalink
arm: xen: mm: use __GPF_DMA32 for arm64
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
MrVan authored and sstabellini committed Oct 2, 2019
1 parent 04ccbdc commit ec066de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/xen/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit ec066de

Please sign in to comment.