Skip to content

Commit 73301e4

Browse files
Gavin Shanwilldeacon
authored andcommitted
arm64: tlb: Allow range operation for MAX_TLBI_RANGE_PAGES
MAX_TLBI_RANGE_PAGES pages is covered by SCALE#3 and NUM#31 and it's supported now. Allow TLBI RANGE operation when the number of pages is equal to MAX_TLBI_RANGE_PAGES in __flush_tlb_range_nosync(). Suggested-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Shaoqin Huang <shahuang@redhat.com> Link: https://lore.kernel.org/r/20240405035852.1532010-4-gshan@redhat.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent e07255d commit 73301e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/include/asm/tlbflush.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,11 @@ static inline void __flush_tlb_range_nosync(struct vm_area_struct *vma,
446446
* When not uses TLB range ops, we can handle up to
447447
* (MAX_DVM_OPS - 1) pages;
448448
* When uses TLB range ops, we can handle up to
449-
* (MAX_TLBI_RANGE_PAGES - 1) pages.
449+
* MAX_TLBI_RANGE_PAGES pages.
450450
*/
451451
if ((!system_supports_tlb_range() &&
452452
(end - start) >= (MAX_DVM_OPS * stride)) ||
453-
pages >= MAX_TLBI_RANGE_PAGES) {
453+
pages > MAX_TLBI_RANGE_PAGES) {
454454
flush_tlb_mm(vma->vm_mm);
455455
return;
456456
}

0 commit comments

Comments
 (0)