From f332371e6ed08632f07ffb9dc7dde5321c2b327a Mon Sep 17 00:00:00 2001 From: Stanimir Varbanov Date: Wed, 29 Apr 2015 14:38:01 +0300 Subject: [PATCH] arm64: dma-mapping: fix DMA_ATTR_STRONGLY_ORDERED in __get_dma_pgprot Signed-off-by: Stanimir Varbanov --- arch/arm64/mm/dma-mapping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index aac69ad48975..3467425b259c 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -37,10 +37,12 @@ static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, bool coherent) { - if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) + if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) return pgprot_writecombine(prot); else if (dma_get_attr(DMA_ATTR_STRONGLY_ORDERED, attrs)) prot = pgprot_noncached(prot); + else if (!coherent) + return pgprot_writecombine(prot); return prot; } -- 2.39.5