aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-02-01 20:43:22 -0500
committerPaul Burton <paul.burton@mips.com>2019-02-04 13:56:24 -0500
commit558ec8ad71c9ec8fd67f388dd74149f9bd095878 (patch)
tree3b08863fcc817f012b48031ecfbe7f73ce77ea89
parentf7908a007e20fff3d666e0b98eae3b10afb7d533 (diff)
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
-rw-r--r--arch/mips/include/asm/tlbflush.h5
-rw-r--r--arch/mips/kernel/smp.c4
-rw-r--r--arch/mips/mm/tlb-r3k.c12
-rw-r--r--arch/mips/mm/tlb-r4k.c7
-rw-r--r--arch/mips/mm/tlb-r8k.c5
5 files changed, 5 insertions, 28 deletions
diff --git a/arch/mips/include/asm/tlbflush.h b/arch/mips/include/asm/tlbflush.h
index 40a361092491..9789e7a32def 100644
--- a/arch/mips/include/asm/tlbflush.h
+++ b/arch/mips/include/asm/tlbflush.h
@@ -14,7 +14,6 @@
14 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 14 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
15 */ 15 */
16extern void local_flush_tlb_all(void); 16extern void local_flush_tlb_all(void);
17extern void local_flush_tlb_mm(struct mm_struct *mm);
18extern void local_flush_tlb_range(struct vm_area_struct *vma, 17extern void local_flush_tlb_range(struct vm_area_struct *vma,
19 unsigned long start, unsigned long end); 18 unsigned long start, unsigned long end);
20extern void local_flush_tlb_kernel_range(unsigned long start, 19extern void local_flush_tlb_kernel_range(unsigned long start,
@@ -23,6 +22,8 @@ extern void local_flush_tlb_page(struct vm_area_struct *vma,
23 unsigned long page); 22 unsigned long page);
24extern void local_flush_tlb_one(unsigned long vaddr); 23extern void local_flush_tlb_one(unsigned long vaddr);
25 24
25#include <asm/mmu_context.h>
26
26#ifdef CONFIG_SMP 27#ifdef CONFIG_SMP
27 28
28extern void flush_tlb_all(void); 29extern void flush_tlb_all(void);
@@ -36,7 +37,7 @@ extern void flush_tlb_one(unsigned long vaddr);
36#else /* CONFIG_SMP */ 37#else /* CONFIG_SMP */
37 38
38#define flush_tlb_all() local_flush_tlb_all() 39#define flush_tlb_all() local_flush_tlb_all()
39#define flush_tlb_mm(mm) local_flush_tlb_mm(mm) 40#define flush_tlb_mm(mm) drop_mmu_context(mm)
40#define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, end) 41#define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, end)
41#define flush_tlb_kernel_range(vmaddr,end) \ 42#define flush_tlb_kernel_range(vmaddr,end) \
42 local_flush_tlb_kernel_range(vmaddr, end) 43 local_flush_tlb_kernel_range(vmaddr, end)
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index d84b9066b465..d7088ca31e43 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -487,7 +487,7 @@ void flush_tlb_all(void)
487 487
488static void flush_tlb_mm_ipi(void *mm) 488static 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,7 +540,7 @@ void flush_tlb_mm(struct mm_struct *mm)
540 cpu_context(cpu, mm) = 0; 540 cpu_context(cpu, mm) = 0;
541 } 541 }
542 } 542 }
543 local_flush_tlb_mm(mm); 543 drop_mmu_context(mm);
544 544
545 preempt_enable(); 545 preempt_enable();
546} 546}
diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c
index 60eb7a114440..50f207591b6d 100644
--- a/arch/mips/mm/tlb-r3k.c
+++ b/arch/mips/mm/tlb-r3k.c
@@ -67,18 +67,6 @@ void local_flush_tlb_all(void)
67 local_irq_restore(flags); 67 local_irq_restore(flags);
68} 68}
69 69
70void 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
82void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 70void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
83 unsigned long end) 71 unsigned long end)
84{ 72{
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 9fff08eabe8f..0114c43398f3 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -104,13 +104,6 @@ void local_flush_tlb_all(void)
104} 104}
105EXPORT_SYMBOL(local_flush_tlb_all); 105EXPORT_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. */
109void local_flush_tlb_mm(struct mm_struct *mm)
110{
111 drop_mmu_context(mm);
112}
113
114void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 107void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
115 unsigned long end) 108 unsigned long end)
116{ 109{
diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c
index c938d6b497ef..c1e9e144007e 100644
--- a/arch/mips/mm/tlb-r8k.c
+++ b/arch/mips/mm/tlb-r8k.c
@@ -50,11 +50,6 @@ void local_flush_tlb_all(void)
50 local_irq_restore(flags); 50 local_irq_restore(flags);
51} 51}
52 52
53void local_flush_tlb_mm(struct mm_struct *mm)
54{
55 drop_mmu_context(mm);
56}
57
58void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 53void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
59 unsigned long end) 54 unsigned long end)
60{ 55{