提交 0cd60eb1 编写于 作者: C Christoph Hellwig 提交者: Linus Torvalds

dma-mapping: fix flags in dma_alloc_wc

We really need the writecombine flag in dma_alloc_wc, fix a stupid
oversight.

Fixes: 7ed1d91a ("dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN")
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 23203e3f
...@@ -796,7 +796,7 @@ static inline void dmam_release_declared_memory(struct device *dev) ...@@ -796,7 +796,7 @@ static inline void dmam_release_declared_memory(struct device *dev)
static inline void *dma_alloc_wc(struct device *dev, size_t size, static inline void *dma_alloc_wc(struct device *dev, size_t size,
dma_addr_t *dma_addr, gfp_t gfp) dma_addr_t *dma_addr, gfp_t gfp)
{ {
unsigned long attrs = DMA_ATTR_NO_WARN; unsigned long attrs = DMA_ATTR_WRITE_COMBINE;
if (gfp & __GFP_NOWARN) if (gfp & __GFP_NOWARN)
attrs |= DMA_ATTR_NO_WARN; attrs |= DMA_ATTR_NO_WARN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册