diff options
author | Christoph Hellwig | 2018-09-24 13:10:34 +0200 |
---|---|---|
committer | Christoph Hellwig | 2018-10-09 15:08:46 +0200 |
commit | b9fd04262a8abc366f40a9e97598e94591352c26 (patch) | |
tree | ce83cdf3e2396cdd66310f91130055ff87d67550 /kernel/dma | |
parent | 7ed1d91a9ed61afe438ba51cbf49cb567ab7dca8 (diff) |
dma-direct: respect DMA_ATTR_NO_WARN
Respect the DMA_ATTR_NO_WARN flags for allocations in dma-direct.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'kernel/dma')
-rw-r--r-- | kernel/dma/direct.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index a5a943836c8e..87a6bc2a96c0 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -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, |