Skip to contentSkip to conversation

arm64: tlb: don't set the ttl value in flush_tlb_page_nosync

PATCH Applied Zhenyu Ye 2 participants 2 messages Jul 10, 2020

Subsystems (3)
lore
Share & tools
lore

Zhenyu Ye

author
#0 lore raw

PATCH 1/1 arm64: tlb: don't set the ttl value in flush_tlb_page_nosync

flush_tlb_page_nosync() may be called from pmd level, so we can not set the ttl = 3 here.

The callstack is as follows:

pmdp_set_access_flags
ptep_set_access_flags
flush_tlb_fix_spurious_fault
flush_tlb_page
flush_tlb_page_nosync

Fixes e735b98a5fe0 ("arm64: Add tlbi_user_level TLB invalidation helper")
---
 arch/arm64/include/asm/tlbflush.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm64/include/asm/tlbflush.h +2 -3
index edfec8139ef8..7528c84a94ef 100644
@@ -252,9 +252,8 @@ static inline void flush_tlb_page_nosync(struct vm_area_struct *vma,
 	unsigned long addr = __TLBI_VADDR(uaddr, ASID(vma->vm_mm));
 
 	dsb(ishst);
-	/* This function is only called on a small page */
-	__tlbi_level(vale1is, addr, 3);
-	__tlbi_user_level(vale1is, addr, 3);
+	__tlbi(vale1is, addr);
+	__tlbi_user(vale1is, addr);
 }
 
 static inline void flush_tlb_page(struct vm_area_struct *vma,
Signature · 1 line
2.19.1
maintainer Applied
#1 lore raw
Quoted 10 lines · Zhenyu Ye

flush_tlb_page_nosync() may be called from pmd level, so we can not set the ttl = 3 here.

The callstack is as follows:

pmdp_set_access_flags
ptep_set_access_flags
flush_tlb_fix_spurious_fault
flush_tlb_page
flush_tlb_page_nosync

Applied to arm64 (for-next/tlbi), thanks!

[1/1] arm64: tlb: don't set the ttl value in flush_tlb_page_nosync

      https://git.kernel.org/arm64/c/61c11656b67b
Signature · 1 line
Catalin