Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mvme68k Nuke HP_SEG_SIZE. Use NBSEG instead (as use...



details:   https://anonhg.NetBSD.org/src/rev/68ab9da62f05
branches:  trunk
changeset: 486729:68ab9da62f05
user:      scw <scw%NetBSD.org@localhost>
date:      Sat May 27 22:37:47 2000 +0000

description:
Nuke HP_SEG_SIZE. Use NBSEG instead (as used by m68k_trunc_seg() et al),
which takes into account the mmu type.

diffstat:

 sys/arch/mvme68k/include/param.h |  7 ++++++-
 sys/arch/mvme68k/include/pmap.h  |  8 +-------
 sys/arch/mvme68k/mvme68k/pmap.c  |  6 +++---
 3 files changed, 10 insertions(+), 11 deletions(-)

diffs (71 lines):

diff -r 759c777fe790 -r 68ab9da62f05 sys/arch/mvme68k/include/param.h
--- a/sys/arch/mvme68k/include/param.h  Sat May 27 22:34:24 2000 +0000
+++ b/sys/arch/mvme68k/include/param.h  Sat May 27 22:37:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.20 2000/03/18 22:33:05 scw Exp $   */
+/*     $NetBSD: param.h,v 1.21 2000/05/27 22:37:47 scw Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -60,7 +60,12 @@
 #define        KERNBASE        0x00000000      /* start of kernel virtual */
 
 #define        SEGSHIFT        22              /* LOG2(NBSEG) */
+#if defined(M68030) && !defined(M68040) && !defined(M68060)
 #define NBSEG          (1 << SEGSHIFT) /* bytes/segment */
+#else
+#define        NBSEG           ((mmutype == MMU_68040) ? \
+                               (32 * (1 << PGSHIFT)) : (256 * (1 << PGSHIFT)))
+#endif
 #define        SEGOFSET        (NBSEG-1)       /* byte offset into segment */
 
 #define        UPAGES          3               /* pages of u-area */
diff -r 759c777fe790 -r 68ab9da62f05 sys/arch/mvme68k/include/pmap.h
--- a/sys/arch/mvme68k/include/pmap.h   Sat May 27 22:34:24 2000 +0000
+++ b/sys/arch/mvme68k/include/pmap.h   Sat May 27 22:37:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.15 2000/03/18 22:33:05 scw Exp $    */
+/*     $NetBSD: pmap.h,v 1.16 2000/05/27 22:37:47 scw Exp $    */
 
 /* 
  * Copyright (c) 1987 Carnegie-Mellon University
@@ -45,12 +45,6 @@
 
 #include <machine/pte.h>
 
-#if defined(M68040)
-#define HP_SEG_SIZE    (mmutype == MMU_68040 ? 0x40000 : NBSEG)
-#else
-#define HP_SEG_SIZE    NBSEG
-#endif
-
 /*
  * Pmap stuff
  */
diff -r 759c777fe790 -r 68ab9da62f05 sys/arch/mvme68k/mvme68k/pmap.c
--- a/sys/arch/mvme68k/mvme68k/pmap.c   Sat May 27 22:34:24 2000 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap.c   Sat May 27 22:37:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.41 2000/03/26 20:42:32 kleink Exp $        */
+/*     $NetBSD: pmap.c,v 1.42 2000/05/27 22:37:48 scw Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -889,7 +889,7 @@
 
        flags = active_pmap(pmap) ? PRM_TFLUSH : 0;
        while (sva < eva) {
-               nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE;
+               nssva = m68k_trunc_seg(sva) + NBSEG;
                if (nssva == 0 || nssva > eva)
                        nssva = eva;
                /*
@@ -1016,7 +1016,7 @@
        needtflush = active_pmap(pmap);
        firstpage = TRUE;
        while (sva < eva) {
-               nssva = m68k_trunc_seg(sva) + HP_SEG_SIZE;
+               nssva = m68k_trunc_seg(sva) + NBSEG;
                if (nssva == 0 || nssva > eva)
                        nssva = eva;
                /*



Home | Main Index | Thread Index | Old Index