Module Name:    src
Committed By:   matt
Date:           Thu Jun 11 05:28:42 UTC 2015

Modified Files:
        src/sys/uvm/pmap: pmap_tlb.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/uvm/pmap/pmap_tlb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.11 src/sys/uvm/pmap/pmap_tlb.c:1.12
--- src/sys/uvm/pmap/pmap_tlb.c:1.11	Sat Apr 18 16:58:31 2015
+++ src/sys/uvm/pmap/pmap_tlb.c	Thu Jun 11 05:28:42 2015
@@ -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 @@ pmap_tlb_shootdown_bystanders(pmap_t pm)
 		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);

Reply via email to