Skip to content

Commit

Permalink
arm64: tlb: don't set the ttl value in flush_tlb_page_nosync
Browse files Browse the repository at this point in the history
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: e735b98 ("arm64: Add tlbi_user_level TLB invalidation helper")
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Zhenyu Ye <yezhenyu2@huawei.com>
Link: https://lore.kernel.org/r/20200710094158.468-1-yezhenyu2@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Zhenyu Ye authored and Catalin Marinas committed Jul 10, 2020
1 parent 34e36d8 commit 61c1165
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/arm64/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,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,
Expand Down

0 comments on commit 61c1165

Please sign in to comment.