Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap There's no need to call pmap_tlb_invalidate_add...
details: https://anonhg.NetBSD.org/src/rev/b70280dd78f7
branches: trunk
changeset: 356170:b70280dd78f7
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Sep 07 06:29:47 2017 +0000
description:
There's no need to call pmap_tlb_invalidate_addr if pmap_remove_all was
called and PMAP_DEFERRED_ACTIVATE is set.
diffstat:
sys/uvm/pmap/pmap.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diffs (53 lines):
diff -r 3bcb6f75473f -r b70280dd78f7 sys/uvm/pmap/pmap.c
--- a/sys/uvm/pmap/pmap.c Thu Sep 07 04:40:56 2017 +0000
+++ b/sys/uvm/pmap/pmap.c Thu Sep 07 06:29:47 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.35 2017/06/24 07:30:17 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.36 2017/09/07 06:29:47 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2017/06/24 07:30:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.36 2017/09/07 06:29:47 skrll Exp $");
/*
* Manages physical address maps.
@@ -774,10 +774,12 @@
pmap_md_tlb_miss_lock_enter();
const pt_entry_t npte = pte_nv_entry(is_kernel_pmap_p);
pte_set(ptep, npte);
- /*
- * Flush the TLB for the given address.
- */
- pmap_tlb_invalidate_addr(pmap, va);
+ if (__predict_true(!(pmap->pm_flags & PMAP_DEFERRED_ACTIVATE))) {
+ /*
+ * Flush the TLB for the given address.
+ */
+ pmap_tlb_invalidate_addr(pmap, va);
+ }
pmap_md_tlb_miss_lock_exit();
/*
@@ -903,10 +905,13 @@
}
pmap_md_tlb_miss_lock_enter();
pte_set(ptep, npte);
- /*
- * Flush the TLB for the given address.
- */
- pmap_tlb_invalidate_addr(pmap, sva);
+ if (__predict_true(!(pmap->pm_flags & PMAP_DEFERRED_ACTIVATE))) {
+
+ /*
+ * Flush the TLB for the given address.
+ */
+ pmap_tlb_invalidate_addr(pmap, sva);
+ }
pmap_md_tlb_miss_lock_exit();
}
Home |
Main Index |
Thread Index |
Old Index