summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-02-02 01:43:20 +0000
committerPaul Burton <paul.burton@mips.com>2019-02-04 10:56:20 -0800
commit6067d47e36f4a3aa691f7b1f91e438cd289ecb8f (patch)
tree6797df57ae1f39d08ce87c85c023d2173049aeba /arch/mips
parentc9b2a3dc240c444b4f7b556e2cce756828720856 (diff)
MIPS: mm: Move drop_mmu_context() comment into appropriate block
drop_mmu_context() is preceded by a comment indicating what happens if the mm provided is currently active on the local CPU. Move that comment into the block that executes in this case, adjusting slightly to reflect its new location. Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: linux-mips@vger.kernel.org
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/mmu_context.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h
index 1b8392dcd354..752ebda82cdd 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -173,10 +173,6 @@ static inline void destroy_context(struct mm_struct *mm)
#define activate_mm(prev, next) switch_mm(prev, next, current)
#define deactivate_mm(tsk, mm) do { } while (0)
-/*
- * If mm is currently active_mm, we can't really drop it. Instead,
- * we will get a new one for it.
- */
static inline void
drop_mmu_context(struct mm_struct *mm)
{
@@ -188,7 +184,11 @@ drop_mmu_context(struct mm_struct *mm)
cpu = smp_processor_id();
if (!cpu_context(cpu, mm)) {
/* no-op */
- } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
+ } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
+ /*
+ * mm is currently active, so we can't really drop it.
+ * Instead we bump the ASID.
+ */
htw_stop();
get_new_mmu_context(mm);
write_c0_entryhi(cpu_asid(cpu, mm));