Skip to content

Commit db7ddef

Browse files
npiggintorvalds
authored andcommitted
mm: move tlb_table_flush to tlb_flush_mmu_free
There is no need to call this from tlb_flush_mmu_tlbonly, it logically belongs with tlb_flush_mmu_free. This makes future fixes simpler. [ This was originally done to allow code consolidation for the mmu_notifier fix, but it also ends up helping simplify the HAVE_RCU_TABLE_INVALIDATE fix. - Linus ] Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Acked-by: Will Deacon <will.deacon@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 52a288c commit db7ddef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/memory.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,16 @@ static void tlb_flush_mmu_tlbonly(struct mmu_gather *tlb)
245245

246246
tlb_flush(tlb);
247247
mmu_notifier_invalidate_range(tlb->mm, tlb->start, tlb->end);
248-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
249-
tlb_table_flush(tlb);
250-
#endif
251248
__tlb_reset_range(tlb);
252249
}
253250

254251
static void tlb_flush_mmu_free(struct mmu_gather *tlb)
255252
{
256253
struct mmu_gather_batch *batch;
257254

255+
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
256+
tlb_table_flush(tlb);
257+
#endif
258258
for (batch = &tlb->local; batch && batch->nr; batch = batch->next) {
259259
free_pages_and_swap_cache(batch->pages, batch->nr);
260260
batch->nr = 0;

0 commit comments

Comments
 (0)