From c9b2a3dc240c444b4f7b556e2cce756828720856 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sat, 2 Feb 2019 01:43:19 +0000 Subject: 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 Cc: linux-mips@vger.kernel.org --- arch/mips/mm/tlb-r4k.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'arch/mips/mm/tlb-r4k.c') diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 6c99dfff71b2..ba76b0c11d38 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -108,16 +108,8 @@ EXPORT_SYMBOL(local_flush_tlb_all); these entries, we just bump the asid. */ void local_flush_tlb_mm(struct mm_struct *mm) { - int cpu; - preempt_disable(); - - cpu = smp_processor_id(); - - if (cpu_context(cpu, mm) != 0) { - drop_mmu_context(mm); - } - + drop_mmu_context(mm); preempt_enable(); } -- cgit v1.2.3-58-ga151