aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-22 03:21:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-22 11:46:27 -0500
commit0cd60eb1a7b5421e92a3489e1829bfb2243e21e1 (patch)
tree13e687e84af384b541a2f12fe0856c2a5107e6a7
parent23203e3f34c97f4ddd6e353adba45161880a52a4 (diff)
dma-mapping: fix flags in dma_alloc_wc
We really need the writecombine flag in dma_alloc_wc, fix a stupid oversight. Fixes: 7ed1d91a9e ("dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/dma-mapping.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 15bd41447025..d327bdd53716 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -796,7 +796,7 @@ static inline void dmam_release_declared_memory(struct device *dev)
796static inline void *dma_alloc_wc(struct device *dev, size_t size, 796static inline void *dma_alloc_wc(struct device *dev, size_t size,
797 dma_addr_t *dma_addr, gfp_t gfp) 797 dma_addr_t *dma_addr, gfp_t gfp)
798{ 798{
799 unsigned long attrs = DMA_ATTR_NO_WARN; 799 unsigned long attrs = DMA_ATTR_WRITE_COMBINE;
800 800
801 if (gfp & __GFP_NOWARN) 801 if (gfp & __GFP_NOWARN)
802 attrs |= DMA_ATTR_NO_WARN; 802 attrs |= DMA_ATTR_NO_WARN;