From: Christoph Hellwig Date: Sat, 22 Dec 2018 08:21:08 +0000 (+0100) Subject: dma-mapping: fix flags in dma_alloc_wc X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0cd60eb1a7b5421e92a3489e1829bfb2243e21e1;p=linux.git 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 Signed-off-by: Linus Torvalds --- diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 15bd41447025a..d327bdd53716f 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) static inline void *dma_alloc_wc(struct device *dev, size_t size, 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) attrs |= DMA_ATTR_NO_WARN;