diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2014-03-12 12:28:09 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-03-13 07:22:29 -0400 |
commit | 71fdb6bf61bf0692f004f9daf5650392c0cfe300 (patch) | |
tree | 9a3f7110c06475f49c97d766f7d0c32f7de6135e | |
parent | de2db7432917a82b62d55bb59635586eeca6d1bd (diff) |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 2d3cede62709..72c9ac38cdd9 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, | |||
199 | pte_t *ptep, pte_t pte) | 199 | pte_t *ptep, pte_t pte) |
200 | { | 200 | { |
201 | if (pte_valid_user(pte)) { | 201 | if (pte_valid_user(pte)) { |
202 | if (pte_exec(pte)) | 202 | if (!pte_special(pte) && pte_exec(pte)) |
203 | __sync_icache_dcache(pte, addr); | 203 | __sync_icache_dcache(pte, addr); |
204 | if (pte_dirty(pte) && pte_write(pte)) | 204 | if (pte_dirty(pte) && pte_write(pte)) |
205 | pte_val(pte) &= ~PTE_RDONLY; | 205 | pte_val(pte) &= ~PTE_RDONLY; |