aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-03-12 12:07:06 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2014-03-13 07:22:21 -0400
commitde2db7432917a82b62d55bb59635586eeca6d1bd (patch)
treec6b64c335eec30b34bfa9d72c7c8ba9afe8418d1
parentd152d22a18c240286c19997a6249ee76ea055926 (diff)
arm64: Make DMA coherent and strongly ordered mappings not executable
pgprot_{dmacoherent,writecombine,noncached} don't need to generate executable mappings with side-effects like __sync_icache_dcache() being called when the mapping is in user space. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Tested-by: Laura Abbott <lauraa@codeaurora.org> Tested-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Cc: <stable@vger.kernel.org>
-rw-r--r--arch/arm64/include/asm/pgtable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index b524dcd17243..2d3cede62709 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -286,11 +286,11 @@ static inline int has_transparent_hugepage(void)
286 * Mark the prot value as uncacheable and unbufferable. 286 * Mark the prot value as uncacheable and unbufferable.
287 */ 287 */
288#define pgprot_noncached(prot) \ 288#define pgprot_noncached(prot) \
289 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE)) 289 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
290#define pgprot_writecombine(prot) \ 290#define pgprot_writecombine(prot) \
291 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) 291 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
292#define pgprot_dmacoherent(prot) \ 292#define pgprot_dmacoherent(prot) \
293 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) 293 __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
294#define __HAVE_PHYS_MEM_ACCESS_PROT 294#define __HAVE_PHYS_MEM_ACCESS_PROT
295struct file; 295struct file;
296extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, 296extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,