Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 reduce intendation in pmap_activate(), NFCI



details:   https://anonhg.NetBSD.org/src/rev/5a1a5727eb96
branches:  trunk
changeset: 830307:5a1a5727eb96
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Mar 04 11:01:48 2018 +0000

description:
reduce intendation in pmap_activate(), NFCI

diffstat:

 sys/arch/x86/x86/pmap.c |  35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diffs (57 lines):

diff -r 946fbb0e3ccc -r 5a1a5727eb96 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Sun Mar 04 10:59:11 2018 +0000
+++ b/sys/arch/x86/x86/pmap.c   Sun Mar 04 11:01:48 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $      */
+/*     $NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.286 2018/03/04 10:59:11 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.287 2018/03/04 11:01:48 jdolecek Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -2855,22 +2855,23 @@
 
        ci = curcpu();
 
-       if (l == ci->ci_curlwp) {
-               KASSERT(ci->ci_want_pmapload == 0);
-               KASSERT(ci->ci_tlbstate != TLBSTATE_VALID);
-
-               /*
-                * no need to switch to kernel vmspace because
-                * it's a subset of any vmspace.
-                */
-
-               if (pmap == pmap_kernel()) {
-                       ci->ci_want_pmapload = 0;
-                       return;
-               }
-
-               ci->ci_want_pmapload = 1;
+       if (l != ci->ci_curlwp)
+               return;
+
+       KASSERT(ci->ci_want_pmapload == 0);
+       KASSERT(ci->ci_tlbstate != TLBSTATE_VALID);
+
+       /*
+        * no need to switch to kernel vmspace because
+        * it's a subset of any vmspace.
+        */
+
+       if (pmap == pmap_kernel()) {
+               ci->ci_want_pmapload = 0;
+               return;
        }
+
+       ci->ci_want_pmapload = 1;
 }
 
 #if defined(XEN) && defined(__x86_64__)



Home | Main Index | Thread Index | Old Index