]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: dma-mapping: fix DMA_ATTR_STRONGLY_ORDERED in __get_dma_pgprot
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Wed, 29 Apr 2015 11:38:01 +0000 (14:38 +0300)
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 09:54:40 +0000 (09:54 +0000)
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
arch/arm64/mm/dma-mapping.c

index aac69ad4897545b423e14975bf8906b43ba8c0ee..3467425b259c5f05a10458ed1da7ae4a73330aff 100644 (file)
 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;
 }