Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mvme68k/mvme68k Do the same as mac68k/pmap.c:1.70 t...
details: https://anonhg.NetBSD.org/src/rev/333644453e45
branches: trunk
changeset: 509195:333644453e45
user: scw <scw%NetBSD.org@localhost>
date: Sun Apr 29 07:41:58 2001 +0000
description:
Do the same as mac68k/pmap.c:1.70 to prevent wired pages being
removed by pmap_collect().
diffstat:
sys/arch/mvme68k/mvme68k/pmap.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diffs (57 lines):
diff -r 7b1d735ef06b -r 333644453e45 sys/arch/mvme68k/mvme68k/pmap.c
--- a/sys/arch/mvme68k/mvme68k/pmap.c Sun Apr 29 06:54:03 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap.c Sun Apr 29 07:41:58 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.56 2001/04/24 04:31:04 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.57 2001/04/29 07:41:58 scw Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -313,6 +313,7 @@
* Internal routines
*/
void pmap_remove_mapping __P((pmap_t, vaddr_t, pt_entry_t *, int));
+void pmap_do_remove __P((pmap_t, vaddr_t, vaddr_t, int));
boolean_t pmap_testbit __P((paddr_t, int));
boolean_t pmap_changebit __P((paddr_t, int, int));
void pmap_enter_ptpage __P((pmap_t, vaddr_t));
@@ -912,6 +913,16 @@
pmap_t pmap;
vaddr_t sva, eva;
{
+
+ pmap_do_remove(pmap, sva, eva, 1);
+}
+
+void
+pmap_do_remove(pmap, sva, eva, remove_wired)
+ pmap_t pmap;
+ vaddr_t sva, eva;
+ int remove_wired;
+{
vaddr_t nssva;
pt_entry_t *pte;
int flags;
@@ -937,10 +948,12 @@
}
/*
* Invalidate every valid mapping within this segment.
+ * If remove_wired is zero, skip the wired pages.
*/
pte = pmap_pte(pmap, sva);
while (sva < nssva) {
- if (pmap_pte_v(pte)) {
+ if (pmap_pte_v(pte) &&
+ (remove_wired || !pmap_pte_w(pte))) {
pmap_remove_mapping(pmap, sva, pte, flags);
}
pte++;
@@ -1584,7 +1597,7 @@
* entire address space. Note: pmap_remove() performs
* all necessary locking.
*/
- pmap_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS);
+ pmap_do_remove(pmap, VM_MIN_ADDRESS, VM_MAX_ADDRESS, 0);
pmap_update();
}
Home |
Main Index |
Thread Index |
Old Index