Module Name:    src
Committed By:   jdolecek
Date:           Mon Feb 19 21:20:34 UTC 2018

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

Log Message:
make it possible to not use the icache evcnts


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

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.22 src/sys/uvm/pmap/pmap_tlb.c:1.23
--- src/sys/uvm/pmap/pmap_tlb.c:1.22	Sat Oct 28 00:37:13 2017
+++ src/sys/uvm/pmap/pmap_tlb.c	Mon Feb 19 21:20:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.22 2017/10/28 00:37:13 pgoyette Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek 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.22 2017/10/28 00:37:13 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.23 2018/02/19 21:20:33 jdolecek Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -296,7 +296,7 @@ pmap_tlb_pai_reset(struct pmap_tlb_info 
 void
 pmap_tlb_info_evcnt_attach(struct pmap_tlb_info *ti)
 {
-#if defined(MULTIPROCESSOR)
+#if defined(MULTIPROCESSOR) && !defined(PMAP_TLB_NO_SYNCI_EVCNT)
 	evcnt_attach_dynamic_nozero(&ti->ti_evcnt_synci_desired,
 	    EVCNT_TYPE_MISC, NULL,
 	    ti->ti_name, "icache syncs desired");
@@ -315,7 +315,7 @@ pmap_tlb_info_evcnt_attach(struct pmap_t
 	evcnt_attach_dynamic_nozero(&ti->ti_evcnt_synci_deferred,
 	    EVCNT_TYPE_MISC, &ti->ti_evcnt_synci_desired,
 	    ti->ti_name, "icache pages deferred");
-#endif /* MULTIPROCESSOR */
+#endif /* MULTIPROCESSOR && !PMAP_TLB_NO_SYNCI_EVCNT */
 	evcnt_attach_dynamic_nozero(&ti->ti_evcnt_asid_reinits,
 	    EVCNT_TYPE_MISC, NULL,
 	    ti->ti_name, "asid pool reinit");

Index: src/sys/uvm/pmap/pmap_tlb.h
diff -u src/sys/uvm/pmap/pmap_tlb.h:1.11 src/sys/uvm/pmap/pmap_tlb.h:1.12
--- src/sys/uvm/pmap/pmap_tlb.h:1.11	Sat Jun 24 05:31:03 2017
+++ src/sys/uvm/pmap/pmap_tlb.h	Mon Feb 19 21:20:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.h,v 1.11 2017/06/24 05:31:03 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.h,v 1.12 2018/02/19 21:20:33 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -129,12 +129,14 @@ struct pmap_tlb_info {
 #else
 #define tlbinfo_index(ti)	((void)(ti), 0)
 #endif
+#if !defined(PMAP_TLB_NO_SYNCI_EVCNT)
 	struct evcnt ti_evcnt_synci_asts;
 	struct evcnt ti_evcnt_synci_all;
 	struct evcnt ti_evcnt_synci_pages;
 	struct evcnt ti_evcnt_synci_deferred;
 	struct evcnt ti_evcnt_synci_desired;
 	struct evcnt ti_evcnt_synci_duplicate;
+#endif /* !PMAP_TLB_NO_SYNCI_EVCNT */
 #else
 #define tlbinfo_index(ti)	((void)(ti), 0)
 #endif

Reply via email to