Commit ae8eba8b authored by Will Deacon's avatar Will Deacon Committed by Peter Zijlstra
Browse files

tlb: mmu_gather: Remove unused start/end arguments from tlb_finish_mmu()



Since commit 7a30df49 ("mm: mmu_gather: remove __tlb_reset_range()
for force flush"), the 'start' and 'end' arguments to tlb_finish_mmu()
are no longer used, since we flush the whole mm in case of a nested
invalidation.

Remove the unused arguments and update all callers.

Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarYu Zhao <yuzhao@google.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Link: https://lkml.kernel.org/r/20210127235347.1402-3-will@kernel.org
parent 912efa17
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
 *	    tlb_end_vma(tlb, vma);
 *	  }
 *	}
 *	tlb_finish_mmu(tlb, start, end);	// finish unmap for address space MM
 *	tlb_finish_mmu(tlb);				// finish unmap for address space MM
 */
#include <linux/mm.h>
#include <linux/pagemap.h>
+1 −1
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ static void free_ldt_pgtables(struct mm_struct *mm)

	tlb_gather_mmu(&tlb, mm, start, end);
	free_pgd_range(&tlb, start, end, start, end);
	tlb_finish_mmu(&tlb, start, end);
	tlb_finish_mmu(&tlb);
#endif
}

+1 −1
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
		free_pgd_range(&tlb, old_start, old_end, new_end,
			vma->vm_next ? vma->vm_next->vm_start : USER_PGTABLES_CEILING);
	}
	tlb_finish_mmu(&tlb, old_start, old_end);
	tlb_finish_mmu(&tlb);

	/*
	 * Shrink the vma to just the new range.  Always succeeds.
+1 −2
Original line number Diff line number Diff line
@@ -590,8 +590,7 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm)
struct mmu_gather;
extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
				unsigned long start, unsigned long end);
extern void tlb_finish_mmu(struct mmu_gather *tlb,
				unsigned long start, unsigned long end);
extern void tlb_finish_mmu(struct mmu_gather *tlb);

static inline void init_tlb_flush_pending(struct mm_struct *mm)
{
+1 −1
Original line number Diff line number Diff line
@@ -3985,7 +3985,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,

	tlb_gather_mmu(&tlb, mm, tlb_start, tlb_end);
	__unmap_hugepage_range(&tlb, vma, start, end, ref_page);
	tlb_finish_mmu(&tlb, tlb_start, tlb_end);
	tlb_finish_mmu(&tlb);
}

/*
Loading