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

MIPS: mm: Remove local_flush_tlb_mm()

All 3 variants of local_flush_tlb_mm() are now effectively simple calls
to drop_mmu_context(). Remove them and use drop_mmu_context() directly.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org

+5 -28
+3 -2
arch/mips/include/asm/tlbflush.h
··· 14 14 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 15 15 */ 16 16 extern void local_flush_tlb_all(void); 17 - extern void local_flush_tlb_mm(struct mm_struct *mm); 18 17 extern void local_flush_tlb_range(struct vm_area_struct *vma, 19 18 unsigned long start, unsigned long end); 20 19 extern void local_flush_tlb_kernel_range(unsigned long start, ··· 21 22 extern void local_flush_tlb_page(struct vm_area_struct *vma, 22 23 unsigned long page); 23 24 extern void local_flush_tlb_one(unsigned long vaddr); 25 + 26 + #include <asm/mmu_context.h> 24 27 25 28 #ifdef CONFIG_SMP 26 29 ··· 37 36 #else /* CONFIG_SMP */ 38 37 39 38 #define flush_tlb_all() local_flush_tlb_all() 40 - #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) 39 + #define flush_tlb_mm(mm) drop_mmu_context(mm) 41 40 #define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, end) 42 41 #define flush_tlb_kernel_range(vmaddr,end) \ 43 42 local_flush_tlb_kernel_range(vmaddr, end)
+2 -2
arch/mips/kernel/smp.c
··· 487 487 488 488 static void flush_tlb_mm_ipi(void *mm) 489 489 { 490 - local_flush_tlb_mm((struct mm_struct *)mm); 490 + drop_mmu_context((struct mm_struct *)mm); 491 491 } 492 492 493 493 /* ··· 540 540 cpu_context(cpu, mm) = 0; 541 541 } 542 542 } 543 - local_flush_tlb_mm(mm); 543 + drop_mmu_context(mm); 544 544 545 545 preempt_enable(); 546 546 }
-12
arch/mips/mm/tlb-r3k.c
··· 67 67 local_irq_restore(flags); 68 68 } 69 69 70 - void local_flush_tlb_mm(struct mm_struct *mm) 71 - { 72 - #ifdef DEBUG_TLB 73 - int cpu = smp_processor_id(); 74 - 75 - if (cpu_context(cpu, mm) != 0) 76 - printk("[tlbmm<%lu>]", (unsigned long)cpu_context(cpu, mm)); 77 - #endif 78 - 79 - drop_mmu_context(mm); 80 - } 81 - 82 70 void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 83 71 unsigned long end) 84 72 {
-7
arch/mips/mm/tlb-r4k.c
··· 104 104 } 105 105 EXPORT_SYMBOL(local_flush_tlb_all); 106 106 107 - /* All entries common to a mm share an asid. To effectively flush 108 - these entries, we just bump the asid. */ 109 - void local_flush_tlb_mm(struct mm_struct *mm) 110 - { 111 - drop_mmu_context(mm); 112 - } 113 - 114 107 void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 115 108 unsigned long end) 116 109 {
-5
arch/mips/mm/tlb-r8k.c
··· 50 50 local_irq_restore(flags); 51 51 } 52 52 53 - void local_flush_tlb_mm(struct mm_struct *mm) 54 - { 55 - drop_mmu_context(mm); 56 - } 57 - 58 53 void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 59 54 unsigned long end) 60 55 {