iommu/dma: Merge the CMA and alloc_pages allocation paths
authorChristoph Hellwig <hch@lst.de>
Mon, 20 May 2019 07:29:39 +0000 (09:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 15:31:11 +0000 (17:31 +0200)
commit9a4ab94afcc4738d65ecfdff726a4a14abde1b98
treef7404d5985641b887fa810540f6de489414fa676
parent8680aa5a58abfe6087a3d8248c02232d3e05dc80
iommu/dma: Merge the CMA and alloc_pages allocation paths

Instead of having a separate code path for the non-blocking alloc_pages
and CMA allocations paths merge them into one.  There is a slight
behavior change here in that we try the page allocator if CMA fails.
This matches what dma-direct and other iommu drivers do and will be
needed to use the dma-iommu code on architectures without DMA remapping
later on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c