Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm/pmap make it possible to not use the icache evcnts



details:   https://anonhg.NetBSD.org/src/rev/8a859b7af131
branches:  trunk
changeset: 829959:8a859b7af131
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Feb 19 21:20:33 2018 +0000

description:
make it possible to not use the icache evcnts

diffstat:

 sys/uvm/pmap/pmap_tlb.c |  8 ++++----
 sys/uvm/pmap/pmap_tlb.h |  4 +++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r 2158cda3d548 -r 8a859b7af131 sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c   Mon Feb 19 20:52:09 2018 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c   Mon Feb 19 21:20:33 2018 +0000
@@ -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 @@
 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 @@
        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");
diff -r 2158cda3d548 -r 8a859b7af131 sys/uvm/pmap/pmap_tlb.h
--- a/sys/uvm/pmap/pmap_tlb.h   Mon Feb 19 20:52:09 2018 +0000
+++ b/sys/uvm/pmap/pmap_tlb.h   Mon Feb 19 21:20:33 2018 +0000
@@ -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 @@
 #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



Home | Main Index | Thread Index | Old Index