summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-03-12 16:28:09 +0000
committerChanho Park <chanho61.park@samsung.com>2014-04-16 21:36:49 +0900
commita492503aecbdb05de78a697013645aa1d58c9f89 (patch)
tree27bc3a22f7cf218afb3c952fdba78b24c514677e
parent6183a40e137f8f104acd5527ccd6658044e710d8 (diff)
downloadlinux-3.10-a492503aecbdb05de78a697013645aa1d58c9f89.tar.gz
linux-3.10-a492503aecbdb05de78a697013645aa1d58c9f89.tar.bz2
linux-3.10-a492503aecbdb05de78a697013645aa1d58c9f89.zip
arm64: Do not synchronise I and D caches for special ptes
Special pte mappings are not intended to be executable and do not even have an associated struct page. This patch ensures that we do not call __sync_icache_dcache() on such ptes. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: Steve Capper <Steve.Capper@arm.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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 2d3cede6270..72c9ac38cdd 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -199,7 +199,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte)
{
if (pte_valid_user(pte)) {
- if (pte_exec(pte))
+ if (!pte_special(pte) && pte_exec(pte))
__sync_icache_dcache(pte, addr);
if (pte_dirty(pte) && pte_write(pte))
pte_val(pte) &= ~PTE_RDONLY;