MIPS: mm: Consolidate drop_mmu_context() has-ASID checks
authorPaul Burton <paul.burton@mips.com>
Sat, 2 Feb 2019 01:43:19 +0000 (01:43 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 4 Feb 2019 18:56:18 +0000 (10:56 -0800)
commitc9b2a3dc240c444b4f7b556e2cce756828720856
tree973ec0ea4be746b49f52f03c1f7d8244bcd0cb80
parent67741ba3ba006558ac3541488c1db9dff9507e73
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
arch/mips/include/asm/mmu_context.h
arch/mips/mm/c-r4k.c
arch/mips/mm/tlb-r3k.c
arch/mips/mm/tlb-r4k.c
arch/mips/mm/tlb-r8k.c