]> git.baikalelectronics.ru Git - kernel.git/commit
dma-direct: factor the swiotlb code out of __dma_direct_alloc_pages
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 07:39:12 +0000 (09:39 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 7 Dec 2021 11:50:10 +0000 (12:50 +0100)
commit0b6b629228143c32fd13047d181ae1bb88c3d47d
tree2a5f76c537ceb31036764480d9c382172e261267
parent5dee3f8c615489ff24af8fde6b01004c7e2282b9
dma-direct: factor the swiotlb code out of __dma_direct_alloc_pages

Add a new helper to deal with the swiotlb case.  This keeps the code
nicely boundled and removes the not required call to
dma_direct_optimal_gfp_mask for the swiotlb case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c