diff options
| -rw-r--r-- | arch/arm64/include/asm/pgtable.h | 2 | ||||
| -rw-r--r-- | arch/arm64/mm/dma-mapping.c | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index ae10350f75ec..da92265bd798 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -280,8 +280,6 @@ static inline int has_transparent_hugepage(void) | |||
| 280 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) | 280 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) |
| 281 | #define pgprot_writecombine(prot) \ | 281 | #define pgprot_writecombine(prot) \ |
| 282 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) | 282 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) |
| 283 | #define pgprot_dmacoherent(prot) \ | ||
| 284 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) | ||
| 285 | #define __HAVE_PHYS_MEM_ACCESS_PROT | 283 | #define __HAVE_PHYS_MEM_ACCESS_PROT |
| 286 | struct file; | 284 | struct file; |
| 287 | extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | 285 | extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, |
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 5bba6be1a3f1..0ba347e59f06 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
| @@ -33,10 +33,8 @@ EXPORT_SYMBOL(dma_ops); | |||
| 33 | static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, | 33 | static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, |
| 34 | bool coherent) | 34 | bool coherent) |
| 35 | { | 35 | { |
| 36 | if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) | 36 | if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) |
| 37 | return pgprot_writecombine(prot); | 37 | return pgprot_writecombine(prot); |
| 38 | else if (!coherent) | ||
| 39 | return pgprot_dmacoherent(prot); | ||
| 40 | return prot; | 38 | return prot; |
| 41 | } | 39 | } |
| 42 | 40 | ||
