From: Will Deacon Date: Fri, 24 Aug 2012 14:23:06 +0000 (+0100) Subject: ARM: 7503/1: mm: only flush both pmd entries for classic MMU X-Git-Tag: upstream/snapshot3+hdmi~6721^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df547e08e800275a431e560a7f0a6b6f24ab2904;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ARM: 7503/1: mm: only flush both pmd entries for classic MMU LPAE does not use two pmd entries for a pte, so the additional tlb flushing is not required. Signed-off-by: Will Deacon Signed-off-by: Russell King --- diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 314d466..99a1951 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h @@ -199,6 +199,9 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, { pgtable_page_dtor(pte); +#ifdef CONFIG_ARM_LPAE + tlb_add_flush(tlb, addr); +#else /* * With the classic ARM MMU, a pte page has two corresponding pmd * entries, each covering 1MB. @@ -206,6 +209,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, addr &= PMD_MASK; tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); tlb_add_flush(tlb, addr + SZ_1M); +#endif tlb_remove_page(tlb, pte); }