Skip to content

Commit

Permalink
dma-mapping: fix flags in dma_alloc_wc
Browse files Browse the repository at this point in the history
We really need the writecombine flag in dma_alloc_wc, fix a stupid
oversight.

Fixes: 7ed1d91 ("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>
  • Loading branch information
Christoph Hellwig authored and torvalds committed Dec 22, 2018
1 parent 23203e3 commit 0cd60eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/dma-mapping.h
Expand Up @@ -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;
Expand Down

0 comments on commit 0cd60eb

Please sign in to comment.