Commit 6067d47e authored by Paul Burton's avatar Paul Burton

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: default avatarPaul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
parent c9b2a3dc
...@@ -173,10 +173,6 @@ static inline void destroy_context(struct mm_struct *mm) ...@@ -173,10 +173,6 @@ static inline void destroy_context(struct mm_struct *mm)
#define activate_mm(prev, next) switch_mm(prev, next, current) #define activate_mm(prev, next) switch_mm(prev, next, current)
#define deactivate_mm(tsk, mm) do { } while (0) #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 static inline void
drop_mmu_context(struct mm_struct *mm) drop_mmu_context(struct mm_struct *mm)
{ {
...@@ -189,6 +185,10 @@ drop_mmu_context(struct mm_struct *mm) ...@@ -189,6 +185,10 @@ drop_mmu_context(struct mm_struct *mm)
if (!cpu_context(cpu, mm)) { if (!cpu_context(cpu, mm)) {
/* no-op */ /* 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(); htw_stop();
get_new_mmu_context(mm); get_new_mmu_context(mm);
write_c0_entryhi(cpu_asid(cpu, mm)); write_c0_entryhi(cpu_asid(cpu, mm));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment