Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/hp300 Move pmap_aliasmask initialization from...



details:   https://anonhg.NetBSD.org/src/rev/0437331664fc
branches:  trunk
changeset: 760515:0437331664fc
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Jan 06 14:19:54 2011 +0000

description:
Move pmap_aliasmask initialization from pmap_bootstrap.c
to machdep.c:hp300_init() before the first pmap(9) use.

diffstat:

 sys/arch/hp300/hp300/machdep.c        |  20 ++++++++++++++++++--
 sys/arch/hp300/hp300/pmap_bootstrap.c |  16 ++--------------
 2 files changed, 20 insertions(+), 16 deletions(-)

diffs (78 lines):

diff -r a813c2a9553b -r 0437331664fc sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c    Thu Jan 06 13:49:16 2011 +0000
+++ b/sys/arch/hp300/hp300/machdep.c    Thu Jan 06 14:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.213 2011/01/06 13:03:47 tsutsui Exp $    */
+/*     $NetBSD: machdep.c,v 1.214 2011/01/06 14:19:54 tsutsui Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.213 2011/01/06 13:03:47 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.214 2011/01/06 14:19:54 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -221,6 +221,22 @@
 
        extern paddr_t avail_start, avail_end;
 
+#ifdef CACHE_HAVE_VAC
+       /*
+        * Determine VA aliasing distance if any
+        */
+       switch (machineid) {
+       case HP_320:
+               pmap_aliasmask = 0x3fff;        /* 16KB */
+               break;
+       case HP_350:
+               pmap_aliasmask = 0x7fff;        /* 32KB */
+               break;
+       default:
+               break;
+       }
+#endif
+
        /*
         * Tell the VM system about available physical memory.  The
         * hp300 only has one segment.
diff -r a813c2a9553b -r 0437331664fc sys/arch/hp300/hp300/pmap_bootstrap.c
--- a/sys/arch/hp300/hp300/pmap_bootstrap.c     Thu Jan 06 13:49:16 2011 +0000
+++ b/sys/arch/hp300/hp300/pmap_bootstrap.c     Thu Jan 06 14:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_bootstrap.c,v 1.53 2011/01/06 13:25:32 tsutsui Exp $      */
+/*     $NetBSD: pmap_bootstrap.c,v 1.54 2011/01/06 14:19:54 tsutsui Exp $      */
 
 /*
  * Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.53 2011/01/06 13:25:32 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.54 2011/01/06 14:19:54 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -457,18 +457,6 @@
 
        RELOC(virtual_end, vaddr_t) = VM_MAX_KERNEL_ADDRESS;
 
-#ifdef M68K_MMU_HP
-       /*
-        * Determine VA aliasing distance if any
-        */
-       if (RELOC(ectype, int) == EC_VIRT) {
-               if (RELOC(machineid, int) == HP_320)
-                       RELOC(pmap_aliasmask, int) = 0x3fff;    /* 16k */
-               else if (RELOC(machineid, int) == HP_350)
-                       RELOC(pmap_aliasmask, int) = 0x7fff;    /* 32k */
-       }
-#endif
-
        /*
         * Allocate some fixed, special purpose kernel virtual addresses
         */



Home | Main Index | Thread Index | Old Index