Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range

This patch makes sure we update the mmu_gather page size even if we are
requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
paths like __tlb_remove_page_size that explicitly check for removing range page
size to be same as mmu gather page size.

Fixes: 5a6099346c41 ("powerpc/64s/radix: tlb do not flush on page size when fullmm")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
0b6aa1a2 fce278af

+2 -4
+2 -4
arch/powerpc/include/asm/tlb.h
··· 49 49 static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb, 50 50 unsigned int page_size) 51 51 { 52 - if (tlb->fullmm) 53 - return; 54 - 55 52 if (!tlb->page_size) 56 53 tlb->page_size = page_size; 57 54 else if (tlb->page_size != page_size) { 58 - tlb_flush_mmu(tlb); 55 + if (!tlb->fullmm) 56 + tlb_flush_mmu(tlb); 59 57 /* 60 58 * update the page size after flush for the new 61 59 * mmu_gather.