diff options
| author | Ryan Roberts <ryan.roberts@arm.com> | 2026-03-02 16:55:56 +0300 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2026-03-13 20:23:04 +0300 |
| commit | 64212d689306df27fb12363df2aab030cf767a4a (patch) | |
| tree | bac520553513bd40353de1f7a7c5ec0caff59c24 | |
| parent | c753d667d9596866e0b9608f52c91b5a540786cb (diff) | |
| download | linux-64212d689306df27fb12363df2aab030cf767a4a.tar.xz | |
arm64: mm: Refactor flush_tlb_page() to use __tlbi_level_asid()
Now that we have __tlbi_level_asid(), let's refactor the
*flush_tlb_page*() variants to use it rather than open coding.
The emitted tlbi(s) is/are intended to be exactly the same as before; no
TTL hint is provided. Although the spec for flush_tlb_page() allows for
setting the TTL hint to 3, it turns out that
flush_tlb_fix_spurious_fault_pmd() depends on
local_flush_tlb_page_nonotify() to invalidate the level 2 entry. This
will be fixed separately.
Reviewed-by: Linu Cherian <linu.cherian@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
| -rw-r--r-- | arch/arm64/include/asm/tlbflush.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index fd86647db24b..0a49a25a4fdc 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -346,12 +346,8 @@ static inline void flush_tlb_mm(struct mm_struct *mm) static inline void __local_flush_tlb_page_nonotify_nosync(struct mm_struct *mm, unsigned long uaddr) { - unsigned long addr; - dsb(nshst); - addr = __TLBI_VADDR(uaddr, ASID(mm)); - __tlbi(vale1, addr); - __tlbi_user(vale1, addr); + __tlbi_level_asid(vale1, uaddr, TLBI_TTL_UNKNOWN, ASID(mm)); } static inline void local_flush_tlb_page_nonotify(struct vm_area_struct *vma, @@ -373,12 +369,8 @@ static inline void local_flush_tlb_page(struct vm_area_struct *vma, static inline void __flush_tlb_page_nosync(struct mm_struct *mm, unsigned long uaddr) { - unsigned long addr; - dsb(ishst); - addr = __TLBI_VADDR(uaddr, ASID(mm)); - __tlbi(vale1is, addr); - __tlbi_user(vale1is, addr); + __tlbi_level_asid(vale1is, uaddr, TLBI_TTL_UNKNOWN, ASID(mm)); mmu_notifier_arch_invalidate_secondary_tlbs(mm, uaddr & PAGE_MASK, (uaddr & PAGE_MASK) + PAGE_SIZE); } |
