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

mm: update legacy flush_tlb_* to use vma

1. These tlb flush functions have been using vma instead mm long time
ago, but there is still some comments use mm as parameter.

2. the actual struct we use is vm_area_struct instead of vma_struct.

3. remove unused flush_kern_tlb_page.

Link: https://lkml.kernel.org/r/87k0oaq311.wl-chenli@uniontech.com
Signed-off-by: Chen Li <chenli@uniontech.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Chen Li and committed by
Linus Torvalds
5673a60b 33e3575c

+10 -17
+3 -10
arch/arm/include/asm/tlbflush.h
··· 253 253 * space. 254 254 * - mm - mm_struct describing address space 255 255 * 256 - * flush_tlb_range(mm,start,end) 256 + * flush_tlb_range(vma,start,end) 257 257 * 258 258 * Invalidate a range of TLB entries in the specified 259 259 * address space. ··· 261 261 * - start - start address (may not be aligned) 262 262 * - end - end address (exclusive, may not be aligned) 263 263 * 264 - * flush_tlb_page(vaddr,vma) 264 + * flush_tlb_page(vma, uaddr) 265 265 * 266 266 * Invalidate the specified page in the specified address range. 267 + * - vma - vm_area_struct describing address range 267 268 * - vaddr - virtual address (may not be aligned) 268 - * - vma - vma_struct describing address range 269 - * 270 - * flush_kern_tlb_page(kaddr) 271 - * 272 - * Invalidate the TLB entry for the specified page. The address 273 - * will be in the kernels virtual memory space. Current uses 274 - * only require the D-TLB to be invalidated. 275 - * - kaddr - Kernel virtual memory address 276 269 */ 277 270 278 271 /*
+1 -1
arch/arm/mm/tlb-v6.S
··· 24 24 * 25 25 * - start - start address (may not be aligned) 26 26 * - end - end address (exclusive, may not be aligned) 27 - * - vma - vma_struct describing address range 27 + * - vma - vm_area_struct describing address range 28 28 * 29 29 * It is assumed that: 30 30 * - the "Invalidate single entry" instruction will invalidate
+1 -1
arch/arm/mm/tlb-v7.S
··· 23 23 * 24 24 * - start - start address (may not be aligned) 25 25 * - end - end address (exclusive, may not be aligned) 26 - * - vma - vma_struct describing address range 26 + * - vma - vm_area_struct describing address range 27 27 * 28 28 * It is assumed that: 29 29 * - the "Invalidate single entry" instruction will invalidate
+1 -1
arch/ia64/kernel/efi_stub.S
··· 7 7 * 8 8 * This stub allows us to make EFI calls in physical mode with interrupts 9 9 * turned off. We need this because we can't call SetVirtualMap() until 10 - * the kernel has booted far enough to allow allocation of struct vma_struct 10 + * the kernel has booted far enough to allow allocation of struct vm_area_struct 11 11 * entries (which we would need to map stuff with memory attributes other 12 12 * than uncached or writeback...). Since the GetTime() service gets called 13 13 * earlier than that, we need to be able to make physical mode EFI calls from
+1 -1
arch/m68k/include/asm/tlbflush.h
··· 263 263 BUG(); 264 264 } 265 265 266 - static inline void flush_tlb_range(struct mm_struct *mm, 266 + static inline void flush_tlb_range(struct vm_area_struct *vma, 267 267 unsigned long start, unsigned long end) 268 268 { 269 269 BUG();
+1 -1
arch/openrisc/include/asm/tlbflush.h
··· 25 25 * - flush_tlb_all() flushes all processes TLBs 26 26 * - flush_tlb_mm(mm) flushes the specified mm context TLB's 27 27 * - flush_tlb_page(vma, vmaddr) flushes one page 28 - * - flush_tlb_range(mm, start, end) flushes a range of pages 28 + * - flush_tlb_range(vma, start, end) flushes a range of pages 29 29 */ 30 30 extern void local_flush_tlb_all(void); 31 31 extern void local_flush_tlb_mm(struct mm_struct *mm);
+2 -2
arch/xtensa/include/asm/tlbflush.h
··· 26 26 * 27 27 * - flush_tlb_all() flushes all processes TLB entries 28 28 * - flush_tlb_mm(mm) flushes the specified mm context TLB entries 29 - * - flush_tlb_page(mm, vmaddr) flushes a single page 30 - * - flush_tlb_range(mm, start, end) flushes a range of pages 29 + * - flush_tlb_page(vma, page) flushes a single page 30 + * - flush_tlb_range(vma, vmaddr, end) flushes a range of pages 31 31 */ 32 32 33 33 void local_flush_tlb_all(void);