projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ed1d91
)
dma-direct: respect DMA_ATTR_NO_WARN
author
Christoph Hellwig
<hch@lst.de>
Mon, 24 Sep 2018 11:10:34 +0000
(13:10 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Tue, 9 Oct 2018 13:08:46 +0000
(15:08 +0200)
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>
kernel/dma/direct.c
patch
|
blob
|
history
diff --git
a/kernel/dma/direct.c
b/kernel/dma/direct.c
index a5a943836c8ee1ef100d248a035602967b8a1875..87a6bc2a96c0c46ac422fbf77f6ca63803752c74 100644
(file)
--- 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,