Skip to content

Commit 558ec8a

Browse files
committed
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
1 parent f7908a0 commit 558ec8a

File tree

5 files changed

+5
-28
lines changed

5 files changed

+5
-28
lines changed

arch/mips/include/asm/tlbflush.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
1515
*/
1616
extern void local_flush_tlb_all(void);
17-
extern void local_flush_tlb_mm(struct mm_struct *mm);
1817
extern void local_flush_tlb_range(struct vm_area_struct *vma,
1918
unsigned long start, unsigned long end);
2019
extern void local_flush_tlb_kernel_range(unsigned long start,
@@ -23,6 +22,8 @@ extern void local_flush_tlb_page(struct vm_area_struct *vma,
2322
unsigned long page);
2423
extern void local_flush_tlb_one(unsigned long vaddr);
2524

25+
#include <asm/mmu_context.h>
26+
2627
#ifdef CONFIG_SMP
2728

2829
extern void flush_tlb_all(void);
@@ -36,7 +37,7 @@ extern void flush_tlb_one(unsigned long vaddr);
3637
#else /* CONFIG_SMP */
3738

3839
#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)
4041
#define flush_tlb_range(vma, vmaddr, end) local_flush_tlb_range(vma, vmaddr, end)
4142
#define flush_tlb_kernel_range(vmaddr,end) \
4243
local_flush_tlb_kernel_range(vmaddr, end)

arch/mips/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ void flush_tlb_all(void)
487487

488488
static void flush_tlb_mm_ipi(void *mm)
489489
{
490-
local_flush_tlb_mm((struct mm_struct *)mm);
490+
drop_mmu_context((struct mm_struct *)mm);
491491
}
492492

493493
/*
@@ -540,7 +540,7 @@ void flush_tlb_mm(struct mm_struct *mm)
540540
cpu_context(cpu, mm) = 0;
541541
}
542542
}
543-
local_flush_tlb_mm(mm);
543+
drop_mmu_context(mm);
544544

545545
preempt_enable();
546546
}

arch/mips/mm/tlb-r3k.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ void local_flush_tlb_all(void)
6767
local_irq_restore(flags);
6868
}
6969

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-
8270
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
8371
unsigned long end)
8472
{

arch/mips/mm/tlb-r4k.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ void local_flush_tlb_all(void)
104104
}
105105
EXPORT_SYMBOL(local_flush_tlb_all);
106106

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-
114107
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
115108
unsigned long end)
116109
{

arch/mips/mm/tlb-r8k.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ void local_flush_tlb_all(void)
5050
local_irq_restore(flags);
5151
}
5252

53-
void local_flush_tlb_mm(struct mm_struct *mm)
54-
{
55-
drop_mmu_context(mm);
56-
}
57-
5853
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
5954
unsigned long end)
6055
{

0 commit comments

Comments
 (0)