aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-02-01 20:43:20 -0500
committerPaul Burton <paul.burton@mips.com>2019-02-04 13:56:20 -0500
commit6067d47e36f4a3aa691f7b1f91e438cd289ecb8f (patch)
tree6797df57ae1f39d08ce87c85c023d2173049aeba
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
-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)
173#define activate_mm(prev, next) switch_mm(prev, next, current) 173#define activate_mm(prev, next) switch_mm(prev, next, current)
174#define deactivate_mm(tsk, mm) do { } while (0) 174#define deactivate_mm(tsk, mm) do { } while (0)
175 175
176/*
177 * If mm is currently active_mm, we can't really drop it. Instead,
178 * we will get a new one for it.
179 */
180static inline void 176static inline void
181drop_mmu_context(struct mm_struct *mm) 177drop_mmu_context(struct mm_struct *mm)
182{ 178{
@@ -188,7 +184,11 @@ drop_mmu_context(struct mm_struct *mm)
188 cpu = smp_processor_id(); 184 cpu = smp_processor_id();
189 if (!cpu_context(cpu, mm)) { 185 if (!cpu_context(cpu, mm)) {
190 /* no-op */ 186 /* no-op */
191 } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) { 187 } else if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
188 /*
189 * mm is currently active, so we can't really drop it.
190 * Instead we bump the ASID.
191 */
192 htw_stop(); 192 htw_stop();
193 get_new_mmu_context(mm); 193 get_new_mmu_context(mm);
194 write_c0_entryhi(cpu_asid(cpu, mm)); 194 write_c0_entryhi(cpu_asid(cpu, mm));