Commit b9fd0426 authored by Christoph Hellwig's avatar Christoph Hellwig

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
...@@ -114,6 +114,9 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size, ...@@ -114,6 +114,9 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size,
u64 phys_mask; u64 phys_mask;
void *ret; void *ret;
if (attrs & DMA_ATTR_NO_WARN)
gfp |= __GFP_NOWARN;
/* we always manually zero the memory once we are done: */ /* we always manually zero the memory once we are done: */
gfp &= ~__GFP_ZERO; gfp &= ~__GFP_ZERO;
gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask, gfp |= __dma_direct_optimal_gfp_mask(dev, dev->coherent_dma_mask,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment