Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/alpha/alpha Pull up 1.88 -> 1.89: fix TBI opti...



details:   https://anonhg.NetBSD.org/src/rev/d4dc6ef0ca84
branches:  netbsd-1-4
changeset: 468131:d4dc6ef0ca84
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Apr 09 00:40:13 1999 +0000

description:
Pull up 1.88 -> 1.89: fix TBI optimization bug.

diffstat:

 sys/arch/alpha/alpha/pmap.c |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (67 lines):

diff -r e8cebf1f4d43 -r d4dc6ef0ca84 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Thu Apr 08 21:44:00 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Fri Apr 09 00:40:13 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.88 1999/03/29 05:31:24 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.88.2.1 1999/04/09 00:40:13 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.88 1999/03/29 05:31:24 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.88.2.1 1999/04/09 00:40:13 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1569,7 +1569,7 @@
        vm_prot_t access_type;
 {
        boolean_t managed;
-       pt_entry_t *pte, npte;
+       pt_entry_t *pte, npte, opte;
        paddr_t opa;
        boolean_t tflush = TRUE;
        boolean_t hadasm = FALSE;       /* XXX gcc -Wuninitialized */
@@ -1663,6 +1663,9 @@
                pte = pmap_l3pte(pmap, va, l2pte);
        }
 
+       /* Remember all of the old PTE; used for TBI check later. */
+       opte = *pte;
+
        /*
         * Check to see if the old mapping is valid.  If not, validate the
         * new one immediately.
@@ -1715,15 +1718,6 @@
                }
 
                /*
-                * Check to see if the PALcode portion of the
-                * PTE is the same.  If so, no TLB invalidation
-                * is necessary.
-                */
-               if (PG_PALCODE(pmap_pte_prot(pte)) ==
-                   PG_PALCODE(pte_prot(pmap, prot)))
-                       tflush = FALSE;
-
-               /*
                 * Set the PTE.
                 */
                goto validate;
@@ -1803,6 +1797,13 @@
 #endif
 
        /*
+        * If the PALcode portion of the new PTE is the same as the
+        * old PTE, no TBI is necessary.
+        */
+       if (PG_PALCODE(opte) == PG_PALCODE(npte))
+               tflush = FALSE;
+
+       /*
         * Set the new PTE.
         */
        *pte = npte;



Home | Main Index | Thread Index | Old Index