Skip to content

Commit

Permalink
MIPS: mm: Move drop_mmu_context() comment into appropriate block
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Paul Burton committed Feb 4, 2019
1 parent c9b2a3d commit 6067d47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/mips/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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));
Expand Down

0 comments on commit 6067d47

Please sign in to comment.