Skip to content

Commit 6067d47

Browse files
committed
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
1 parent c9b2a3d commit 6067d47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/mips/include/asm/mmu_context.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ static inline void destroy_context(struct mm_struct *mm)
173173
#define activate_mm(prev, next) switch_mm(prev, next, current)
174174
#define deactivate_mm(tsk, mm) do { } while (0)
175175

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-
*/
180176
static inline void
181177
drop_mmu_context(struct mm_struct *mm)
182178
{
@@ -188,7 +184,11 @@ drop_mmu_context(struct mm_struct *mm)
188184
cpu = smp_processor_id();
189185
if (!cpu_context(cpu, mm)) {
190186
/* 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+
*/
192192
htw_stop();
193193
get_new_mmu_context(mm);
194194
write_c0_entryhi(cpu_asid(cpu, mm));

0 commit comments

Comments
 (0)