Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9fd0426 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

dma-direct: respect DMA_ATTR_NO_WARN



Respect the DMA_ATTR_NO_WARN flags for allocations in dma-direct.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
parent 7ed1d91a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size,
	u64 phys_mask;
	void *ret;

	if (attrs & DMA_ATTR_NO_WARN)
		gfp |= __GFP_NOWARN;

	/* we always manually zero the memory once we are done: */
	gfp &= ~__GFP_ZERO;
	gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask,