Source-Changes-HG archive

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

[src/trunk]: src/sys/arch pmap_update() should not be equated with "flush ent...



details:   https://anonhg.NetBSD.org/src/rev/2dc9fb5f8e00
branches:  trunk
changeset: 508886:2dc9fb5f8e00
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Apr 21 17:25:01 2001 +0000

description:
pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations.  Since these pmaps don't
defer anything, pmap_update() is a noop.

diffstat:

 sys/arch/amiga/amiga/pmap.c        |  18 ++++--------------
 sys/arch/atari/atari/pmap.c        |  12 +-----------
 sys/arch/hp300/hp300/pmap.c        |   4 +---
 sys/arch/luna68k/luna68k/pmap.c    |   6 +-----
 sys/arch/mac68k/mac68k/bus_space.c |   4 ++--
 sys/arch/mac68k/mac68k/pmap.c      |   4 +---
 sys/arch/mvme68k/mvme68k/pmap.c    |  10 +---------
 sys/arch/news68k/news68k/pmap.c    |   4 +---
 sys/arch/next68k/next68k/pmap.c    |   8 ++------
 sys/arch/sh3/include/pmap.h        |  15 +++++++++------
 sys/arch/sh3/sh3/pmap.c            |  12 ++++++------
 sys/arch/sh3/sh3/vm_machdep.c      |   4 ++--
 sys/arch/sparc/sparc/pmap.c        |   9 ++-------
 sys/arch/vax/include/pmap.h        |   4 ++--
 sys/arch/x68k/x68k/pmap.c          |   9 +--------
 15 files changed, 36 insertions(+), 87 deletions(-)

diffs (truncated from 383 to 300 lines):

diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/amiga/amiga/pmap.c
--- a/sys/arch/amiga/amiga/pmap.c       Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/amiga/amiga/pmap.c       Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.83 2001/03/15 06:10:34 chs Exp $    */
+/*     $NetBSD: pmap.c,v 1.84 2001/04/21 17:25:01 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1544,25 +1544,15 @@
 
 /*
  *     Require that all active physical maps contain no
- *     incorrect entries NOW.  [This update includes
- *     forcing updates of any address map caching.]
+ *     incorrect entries NOW.
  *
  *     Generally used to insure that a thread about
  *     to run will see a semantically correct world.
  */
 void pmap_update()
 {
-#ifdef DEBUG
-       if (pmapdebug & PDB_FOLLOW)
-               printf("pmap_update()\n");
-#endif
-#if defined(M68060)
-#if defined(M68040) || defined(M68030) || defined(M68020)
-       if (cputype == CPU_68060)
-#endif
-               DCIA();
-#endif
-       TBIA();
+
+       /* Nothing (yet) */
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/atari/atari/pmap.c
--- a/sys/arch/atari/atari/pmap.c       Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/atari/atari/pmap.c       Sat Apr 21 17:25:01 2001 +0000
@@ -1495,23 +1495,13 @@
 
 /*
  *     Require that all active physical maps contain no
- *     incorrect entries NOW.  [This update includes
- *     forcing updates of any address map caching.]
+ *     incorrect entries NOW.
  *
  *     Generally used to insure that a thread about
  *     to run will see a semantically correct world.
  */
 void pmap_update()
 {
-#ifdef DEBUG
-       if (pmapdebug & PDB_FOLLOW)
-               printf("pmap_update()\n");
-#endif
-#if defined(M68060)
-       if (cputype == CPU_68060)
-               DCIA();
-#endif
-       TBIA();
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/hp300/hp300/pmap.c
--- a/sys/arch/hp300/hp300/pmap.c       Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/hp300/hp300/pmap.c       Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.88 2001/03/15 06:10:38 chs Exp $    */
+/*     $NetBSD: pmap.c,v 1.89 2001/04/21 17:25:03 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1587,8 +1587,6 @@
 {
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
-
-       TBIA();         /* XXX should not be here. */
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/luna68k/luna68k/pmap.c
--- a/sys/arch/luna68k/luna68k/pmap.c   Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/luna68k/luna68k/pmap.c   Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.8 2001/03/15 06:10:41 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.9 2001/04/21 17:25:03 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -1435,10 +1435,6 @@
 {
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
-
-#if defined(M68040)
-       TBIA_40();
-#endif
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/mac68k/mac68k/bus_space.c
--- a/sys/arch/mac68k/mac68k/bus_space.c        Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/mac68k/mac68k/bus_space.c        Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.c,v 1.13 2000/11/16 07:04:12 scottr Exp $    */
+/*     $NetBSD: bus_space.c,v 1.14 2001/04/21 17:25:04 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -131,7 +131,7 @@
                        *pte &= ~PG_CI;
                else
                        *pte |= PG_CI;
-               pmap_update();
+               TBIS(va);
        }
  
        return 0;
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/mac68k/mac68k/pmap.c
--- a/sys/arch/mac68k/mac68k/pmap.c     Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/mac68k/mac68k/pmap.c     Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.71 2001/03/15 06:10:42 chs Exp $    */
+/*     $NetBSD: pmap.c,v 1.72 2001/04/21 17:25:04 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1460,8 +1460,6 @@
 {
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
-
-       TBIA();         /* XXX should not be here. */
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/mvme68k/mvme68k/pmap.c
--- a/sys/arch/mvme68k/mvme68k/pmap.c   Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap.c   Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.52 2001/03/15 06:10:44 chs Exp $        */
+/*     $NetBSD: pmap.c,v 1.53 2001/04/21 17:25:05 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1575,14 +1575,6 @@
 {
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
-
-#if defined(M68060)
-#if defined(M68020) || defined(M68030) || defined(M68040)
-       if (cputype == CPU_68060)
-#endif
-               DCIA();
-#endif
-       TBIA();
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/news68k/news68k/pmap.c
--- a/sys/arch/news68k/news68k/pmap.c   Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/news68k/news68k/pmap.c   Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.10 2001/03/15 06:10:44 chs Exp $    */
+/*     $NetBSD: pmap.c,v 1.11 2001/04/21 17:25:05 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1602,8 +1602,6 @@
 {
 
        PMAP_DPRINTF(PDB_FOLLOW, ("pmap_update()\n"));
-
-       TBIA();
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/next68k/next68k/pmap.c
--- a/sys/arch/next68k/next68k/pmap.c   Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/next68k/next68k/pmap.c   Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.27 2001/03/15 06:10:45 chs Exp $        */
+/*     $NetBSD: pmap.c,v 1.28 2001/04/21 17:25:06 thorpej Exp $        */
 
 /*
  * This file was taken from mvme68k/mvme68k/pmap.c
@@ -1685,8 +1685,7 @@
 
 /*
  *     Require that all active physical maps contain no
- *     incorrect entries NOW.  [This update includes
- *     forcing updates of any address map caching.]
+ *     incorrect entries NOW.
  *
  *     Generally used to insure that a thread about
  *     to run will see a semantically correct world.
@@ -1697,9 +1696,6 @@
        if (pmapdebug & PDB_FOLLOW)
                printf("pmap_update()\n");
 #endif
-#if (defined(M68020)||defined(M68040)||defined(M68060))
-       TBIA();
-#endif
 }
 
 /*
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/sh3/include/pmap.h
--- a/sys/arch/sh3/include/pmap.h       Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/sh3/include/pmap.h       Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.8 2001/02/19 17:51:22 msaitoh Exp $ */
+/*     $NetBSD: pmap.h,v 1.9 2001/04/21 17:32:19 thorpej Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -359,14 +359,17 @@
  * macros
  */
 
+/* XXX XXX XXX */
+#ifdef SH4
+#define        TLBFLUSH()                      ((cacheflush(), tlbflush())
+#else
+#define        TLBFLUSH()                      tlbflush()
+#endif
+
 #define        pmap_kernel()                   (&kernel_pmap_store)
 #define        pmap_resident_count(pmap)       ((pmap)->pm_stats.resident_count)
 #define        pmap_wired_count(pmap)          ((pmap)->pm_stats.wired_count)
-#ifdef SH4
-#define        pmap_update()                   (cacheflush(), tlbflush())
-#else
-#define        pmap_update()                   tlbflush()
-#endif
+#define        pmap_update()                   /* nothing (yet) */
 
 #define        pmap_is_referenced(pg)          pmap_test_attrs(pg, PGA_REFERENCED)
 #define        pmap_is_modified(pg)            pmap_test_attrs(pg, PGA_MODIFIED)
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/sh3/sh3/pmap.c
--- a/sys/arch/sh3/sh3/pmap.c   Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/sh3/sh3/pmap.c   Sat Apr 21 17:25:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.15 2001/03/15 06:10:48 chs Exp $    */
+/*     $NetBSD: pmap.c,v 1.16 2001/04/21 17:32:20 thorpej Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -511,7 +511,7 @@
        if (!pmap_valid_entry(opde) || (opde & PG_FRAME) != pmap->pm_pdirpa) {
                *APDP_PDE = (pd_entry_t) (pmap->pm_pdirpa | PG_RW | PG_V | PG_N | PG_4K | PG_M);
                if (pmap_valid_entry(opde))
-                       pmap_update();
+                       TLBFLUSH();
        }
        return(APTE_BASE);
 }
@@ -790,7 +790,7 @@
         * ensure the TLB is sync'd with reality by flushing it...
         */
 
-       pmap_update();
+       TLBFLUSH();
 }
 
 /*
@@ -1511,7 +1511,7 @@
                                pmaps_hand->pm_pdir[idx] = 0;   /* zap! */
                                pmaps_hand->pm_stats.resident_count--;
                                if (pmap_is_curpmap(pmaps_hand))
-                                       pmap_update();
+                                       TLBFLUSH();
                                else if (pmap_valid_entry(*APDP_PDE) &&
                                         (*APDP_PDE & PG_FRAME) ==
                                         pmaps_hand->pm_pdirpa) {
@@ -2208,7 +2208,7 @@
 
        if (prr && prr->prr_npages) {
                if (prr->prr_npages > PMAP_RR_MAX) {
-                       pmap_update();
+                       TLBFLUSH();
                } else {
                        while (prr->prr_npages) {
                                pmap_update_pg(prr->prr_vas[--prr->prr_npages]);
@@ -2609,7 +2609,7 @@
 
        if (prr && prr->prr_npages) {
                if (prr->prr_npages > PMAP_RR_MAX) {
-                       pmap_update();
+                       TLBFLUSH();
                } else {
                        while (prr->prr_npages) {
                                pmap_update_pg(prr->prr_vas[--prr->prr_npages]);
diff -r cfd5f6dd85e5 -r 2dc9fb5f8e00 sys/arch/sh3/sh3/vm_machdep.c
--- a/sys/arch/sh3/sh3/vm_machdep.c     Sat Apr 21 17:20:58 2001 +0000
+++ b/sys/arch/sh3/sh3/vm_machdep.c     Sat Apr 21 17:25:01 2001 +0000



Home | Main Index | Thread Index | Old Index