dma-mapping: reject __GFP_COMP in dma_alloc_attrs
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Nov 2022 07:37:17 +0000 (08:37 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 21 Nov 2022 08:37:20 +0000 (09:37 +0100)
commitffcb754584603adf7039d7972564fbf6febdc542
treeffcb4184b490a6559a16baea06020804da298c80
parent3306877aff07363f9bede7f9edf2c4ea4f5b20be
dma-mapping: reject __GFP_COMP in dma_alloc_attrs

DMA allocations can never be turned back into a page pointer, so
requesting compound pages doesn't make sense and it can't even be
supported at all by various backends.

Reject __GFP_COMP with a warning in dma_alloc_attrs, and stop clearing
the flag in the arm dma ops and dma-iommu.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
arch/arm/mm/dma-mapping.c
drivers/iommu/dma-iommu.c
kernel/dma/mapping.c