Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Change the way how pmap_protect() modifie...



details:   https://anonhg.NetBSD.org/src/rev/3bb7c56b5fc4
branches:  trunk
changeset: 484994:3bb7c56b5fc4
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Sun Apr 16 10:16:19 2000 +0000

description:
Change the way how pmap_protect() modifies the protection of KSEG2
space using MIPS_TBRPL() call.  It avoils to 'vistimize' a possibly
useful TLB entry. XXX MachTLBUpdate() will be retired, soon.

diffstat:

 sys/arch/mips/mips/pmap.c |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r eca2ec794b74 -r 3bb7c56b5fc4 sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Sun Apr 16 10:08:32 2000 +0000
+++ b/sys/arch/mips/mips/pmap.c Sun Apr 16 10:16:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.92 2000/04/12 01:05:36 nisimura Exp $       */
+/*     $NetBSD: pmap.c,v 1.93 2000/04/16 10:16:19 nisimura Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2000/04/12 01:05:36 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.93 2000/04/16 10:16:19 nisimura Exp $");
 
 /*
  *     Manages physical address maps.
@@ -901,13 +901,18 @@
                        entry = pte->pt_entry;
                        if (!mips_pg_v(entry))
                                continue;
-                       entry = (entry & ~(mips_pg_m_bit() |
-                           mips_pg_ro_bit())) | p;
+                       entry &= ~(mips_pg_m_bit() | mips_pg_ro_bit());
+                       entry |= p;
                        pte->pt_entry = entry;
-                       /*
-                        * Update the TLB if the given address is in the cache.
-                        */
+#if defined(MIPS1) && !defined(MIPS3)
+                       {
+                       extern void mips1_TBRPL(vaddr_t, vaddr_t, paddr_t);
+                       /* replace PTE iff sva is found in TLB */
+                       mips1_TBRPL(sva, sva, entry);
+                       }
+#else
                        MachTLBUpdate(sva, entry);
+#endif
                }
                return;
        }



Home | Main Index | Thread Index | Old Index