diff options
author | Paul Burton <paul.burton@mips.com> | 2019-02-02 01:43:19 +0000 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-02-04 10:56:18 -0800 |
commit | c9b2a3dc240c444b4f7b556e2cce756828720856 (patch) | |
tree | 973ec0ea4be746b49f52f03c1f7d8244bcd0cb80 /arch/mips/mm/tlb-r3k.c | |
parent | 67741ba3ba006558ac3541488c1db9dff9507e73 (diff) | |
download | linux-c9b2a3dc240c444b4f7b556e2cce756828720856.tar.gz |
MIPS: mm: Consolidate drop_mmu_context() has-ASID checks
If an mm does not have an ASID on the local CPU then drop_mmu_context()
is always redundant, since there's no context to "drop". Various callers
of drop_mmu_context() check whether the mm has been allocated an ASID
before making the call. Move that check into drop_mmu_context() and
remove it from callers to simplify them.
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Diffstat (limited to 'arch/mips/mm/tlb-r3k.c')
-rw-r--r-- | arch/mips/mm/tlb-r3k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index 05a5ddccd9da..60eb7a114440 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c @@ -69,14 +69,14 @@ void local_flush_tlb_all(void) void local_flush_tlb_mm(struct mm_struct *mm) { +#ifdef DEBUG_TLB int cpu = smp_processor_id(); - if (cpu_context(cpu, mm) != 0) { -#ifdef DEBUG_TLB + if (cpu_context(cpu, mm) != 0) printk("[tlbmm<%lu>]", (unsigned long)cpu_context(cpu, mm)); #endif - drop_mmu_context(mm); - } + + drop_mmu_context(mm); } void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, |