]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
MIPS: mm: Add set_cpu_context() for ASID assignments
authorPaul Burton <paul.burton@mips.com>
Sat, 2 Feb 2019 01:43:25 +0000 (01:43 +0000)
committerPaul Burton <paul.burton@mips.com>
Mon, 4 Feb 2019 18:56:33 +0000 (10:56 -0800)
commit0b317c389c6771cbe1c5a12fe9322285a808a9bd
treec3fd606d9e26b144155b4d49650c13ad75008142
parent42d5b846574f0904dbaf9dbdea4f19402589cddf
MIPS: mm: Add set_cpu_context() for ASID assignments

When we gain MMID support we'll be storing MMIDs as atomic64_t values
and accessing them via atomic64_* functions. This necessitates that we
don't use cpu_context() as the left hand side of an assignment, ie. as a
modifiable lvalue. In preparation for this introduce a new
set_cpu_context() function & replace all assignments with cpu_context()
on their left hand side with an equivalent call to set_cpu_context().

To enforce that cpu_context() should not be used for assignments, we
rewrite it as a static inline function.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
arch/mips/include/asm/mmu_context.h
arch/mips/kernel/smp.c
arch/mips/kvm/emulate.c
arch/mips/kvm/trap_emul.c
arch/mips/mm/context.c