]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Invalidate the TLB corresponding to intermediate page table levels
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 11 Mar 2015 12:20:39 +0000 (12:20 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 14 Mar 2015 10:48:30 +0000 (10:48 +0000)
commit2666e63835f2fd7e499423aa6be99f0658024ce1
tree475933da723aba44de3a3703fc0629a72dd9c277
parent048509a32a5445b6d6ea284dbb400133944c6213
arm64: Invalidate the TLB corresponding to intermediate page table levels

The ARM architecture allows the caching of intermediate page table
levels and page table freeing requires a sequence like:

pmd_clear()
TLB invalidation
pte page freeing

With commit 35e6c7b0a6c6 (arm64: mm: enable HAVE_RCU_TABLE_FREE logic),
the page table freeing batching was moved from tlb_remove_page() to
tlb_remove_table(). The former takes care of TLB invalidation as this is
also shared with pte clearing and page cache page freeing. The latter,
however, does not invalidate the TLBs for intermediate page table levels
as it probably relies on the architecture code to do it if required.
When the mm->mm_users < 2, tlb_remove_table() does not do any batching
and page table pages are freed before tlb_finish_mmu() which performs
the actual TLB invalidation.

This patch introduces __tlb_flush_pgtable() for arm64 and calls it from
the {pte,pmd,pud}_free_tlb() directly without relying on deferred page
table freeing.

Fixes: 35e6c7b0a6c6 arm64: mm: enable HAVE_RCU_TABLE_FREE logic
Reported-by: Jon Masters <jcm@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Tested-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/tlb.h
arch/arm64/include/asm/tlbflush.h