linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@mips.com>
To: "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>
Cc: Paul Burton <pburton@wavecomp.com>
Subject: [PATCH 06/14] MIPS: mm: Move drop_mmu_context() comment into appropriate block
Date: Sat, 2 Feb 2019 01:43:20 +0000	[thread overview]
Message-ID: <20190202014242.30680-7-paul.burton@mips.com> (raw)
In-Reply-To: <20190202014242.30680-1-paul.burton@mips.com>

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>
---

 arch/mips/include/asm/mmu_context.h | 10 +++++-----
 1 file 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));
-- 
2.20.1


  parent reply	other threads:[~2019-02-02  1:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02  1:43 [PATCH 00/14] MIPS: MemoryMapID (MMID) & GINVT Support Paul Burton
2019-02-02  1:43 ` [PATCH 01/14] MIPS: mm: Define activate_mm() using switch_mm() Paul Burton
2019-02-02  1:43 ` [PATCH 02/14] MIPS: mm: Remove redundant drop_mmu_context() cpu argument Paul Burton
2019-02-02  1:43 ` [PATCH 03/14] MIPS: mm: Remove redundant get_new_mmu_context() " Paul Burton
2019-02-02  1:43 ` [PATCH 04/14] MIPS: mm: Avoid HTW stop/start when dropping an inactive mm Paul Burton
2019-02-02  1:43 ` [PATCH 05/14] MIPS: mm: Consolidate drop_mmu_context() has-ASID checks Paul Burton
2019-02-02  1:43 ` Paul Burton [this message]
2019-02-02  1:43 ` [PATCH 07/14] MIPS: mm: Remove redundant preempt_disable in local_flush_tlb_mm() Paul Burton
2019-02-02  1:43 ` [PATCH 08/14] MIPS: mm: Remove local_flush_tlb_mm() Paul Burton
2019-02-02  1:43 ` [PATCH 09/14] MIPS: mm: Split obj-y to a file per line Paul Burton
2019-02-02  1:43 ` [PATCH 10/14] MIPS: mm: Un-inline get_new_mmu_context Paul Burton
2019-02-02  1:43 ` [PATCH 12/14] MIPS: mm: Add set_cpu_context() for ASID assignments Paul Burton
2019-02-02  1:43 ` [PATCH 11/14] MIPS: mm: Unify ASID version checks Paul Burton
2019-02-02  1:43 ` [PATCH 13/14] MIPS: Add GINVT instruction helpers Paul Burton
2019-02-02  1:43 ` [PATCH 14/14] MIPS: MemoryMapID (MMID) Support Paul Burton
2019-02-04 21:18 ` [PATCH 00/14] MIPS: MemoryMapID (MMID) & GINVT Support Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190202014242.30680-7-paul.burton@mips.com \
    --to=paul.burton@mips.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=pburton@wavecomp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).