Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm/pmap Don't call kcpuset_intersecting_p and then kcpu...



details:   https://anonhg.NetBSD.org/src/rev/f66c0ffed124
branches:  trunk
changeset: 338835:f66c0ffed124
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jun 11 05:28:42 2015 +0000

description:
Don't call kcpuset_intersecting_p and then kcpuset_ffs_intersecting since
that the last will tell use what we need to know.

diffstat:

 sys/uvm/pmap/pmap_tlb.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r cfeaa97fd22c -r f66c0ffed124 sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c   Thu Jun 11 05:27:07 2015 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c   Thu Jun 11 05:28:42 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $      */
+/*     $NetBSD: pmap_tlb.c,v 1.12 2015/06/11 05:28:42 matt Exp $       */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.11 2015/04/18 16:58:31 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.12 2015/06/11 05:28:42 matt Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -635,9 +635,10 @@
                struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
                kcpuset_remove(pm_active, ti->ti_kcpuset);
                TLBINFO_LOCK(ti);
-               if (pmap_tlb_intersecting_onproc_p(pm, ti)) {
-                       cpuid_t j = kcpuset_ffs_intersecting(pm->pm_onproc,
-                           ti->ti_kcpuset);
+               cpuid_t j = kcpuset_ffs_intersecting(pm->pm_onproc,
+                   ti->ti_kcpuset);
+               // post decrement since ffs returns bit + 1 or 0 if no bit
+               if (j-- > 0) {
                        if (kernel_p) {
                                ti->ti_tlbinvop =
                                    TLBINV_KERNEL_MAP(ti->ti_tlbinvop);



Home | Main Index | Thread Index | Old Index