Source-Changes-HG archive

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

[src/trunk]: src/sys/arch delete VM_DEFAULT_ADDRESS; some of those should be ...



details:   https://anonhg.NetBSD.org/src/rev/b9f265ba2e2e
branches:  trunk
changeset: 326311:b9f265ba2e2e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 25 15:16:49 2014 +0000

description:
delete VM_DEFAULT_ADDRESS; some of those should be GC'ed because they match
the default definition.

diffstat:

 sys/arch/amd64/include/vmparam.h   |   6 +++---
 sys/arch/i386/include/vmparam.h    |   8 +++++---
 sys/arch/mips/include/vmparam.h    |  16 +++++++++++-----
 sys/arch/powerpc/include/vmparam.h |   8 +++++---
 sys/arch/vax/include/vmparam.h     |   8 +++++---
 5 files changed, 29 insertions(+), 17 deletions(-)

diffs (120 lines):

diff -r 5ec14825f023 -r b9f265ba2e2e sys/arch/amd64/include/vmparam.h
--- a/sys/arch/amd64/include/vmparam.h  Sat Jan 25 13:49:27 2014 +0000
+++ b/sys/arch/amd64/include/vmparam.h  Sat Jan 25 15:16:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.33 2014/01/25 05:09:59 christos Exp $    */
+/*     $NetBSD: vmparam.h,v 1.34 2014/01/25 15:16:49 christos Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -133,12 +133,12 @@
 #include "opt_uvm.h"
 #endif
 #define __USE_TOPDOWN_VM
+
 #define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
     trunc_page(USRSTACK - MAXSSIZ - (sz))
-#define VM_DEFAULT_ADDRESS(da, sz) VM_DEFAULT_ADDRESS_TOPDOWN(da, sz)
-
 #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
     round_page((vaddr_t)(da) + (vsize_t)maxdmap)
+
 #define VM_DEFAULT_ADDRESS32_TOPDOWN(da, sz) \
        trunc_page(USRSTACK32 - MAXSSIZ32 - (sz))
 #define VM_DEFAULT_ADDRESS32_BOTTOMUP(da, sz) \
diff -r 5ec14825f023 -r b9f265ba2e2e sys/arch/i386/include/vmparam.h
--- a/sys/arch/i386/include/vmparam.h   Sat Jan 25 13:49:27 2014 +0000
+++ b/sys/arch/i386/include/vmparam.h   Sat Jan 25 15:16:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.76 2012/11/13 14:10:24 chs Exp $ */
+/*     $NetBSD: vmparam.h,v 1.77 2014/01/25 15:16:50 christos Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -110,8 +110,10 @@
 #include "opt_xen.h"
 #endif
 #define __USE_TOPDOWN_VM
-#define VM_DEFAULT_ADDRESS(da, sz) \
-       trunc_page(USRSTACK - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
+    trunc_page(USRSTACK - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
+    round_page((vaddr_t)(da) + (vsize_t)maxdmap)
 
 /* XXX max. amount of KVM to be used by buffers. */
 #ifndef VM_MAX_KERNEL_BUF
diff -r 5ec14825f023 -r b9f265ba2e2e sys/arch/mips/include/vmparam.h
--- a/sys/arch/mips/include/vmparam.h   Sat Jan 25 13:49:27 2014 +0000
+++ b/sys/arch/mips/include/vmparam.h   Sat Jan 25 15:16:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.51 2014/01/22 20:49:19 christos Exp $    */
+/*     $NetBSD: vmparam.h,v 1.52 2014/01/25 15:16:50 christos Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -178,10 +178,16 @@
  * The address to which unspecified mapping requests default
  */
 #define __USE_TOPDOWN_VM
-#define VM_DEFAULT_ADDRESS(da, sz) \
-       trunc_page(USRSTACK - MAXSSIZ - (sz))
-#define VM_DEFAULT_ADDRESS32(da, sz) \
-       trunc_page(USRSTACK32 - MAXSSIZ32 - (sz))
+
+#define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
+    trunc_page(USRSTACK - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
+    round_page((vaddr_t)(da) + (vsize_t)maxdmap)
+
+#define VM_DEFAULT_ADDRESS32_TOPDOWN(da, sz) \
+    trunc_page(USRSTACK32 - MAXSSIZ32 - (sz))
+#define VM_DEFAULT_ADDRESS32_BOTTOMUP(da, sz) \
+    round_page((vaddr_t)(da) + (vsize_t)MAXDSIZ32)
 
 /* virtual sizes (bytes) for various kernel submaps */
 #define VM_PHYS_SIZE           (USRIOSIZE*PAGE_SIZE)
diff -r 5ec14825f023 -r b9f265ba2e2e sys/arch/powerpc/include/vmparam.h
--- a/sys/arch/powerpc/include/vmparam.h        Sat Jan 25 13:49:27 2014 +0000
+++ b/sys/arch/powerpc/include/vmparam.h        Sat Jan 25 15:16:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.17 2012/02/23 20:33:29 matt Exp $        */
+/*     $NetBSD: vmparam.h,v 1.18 2014/01/25 15:16:50 christos Exp $    */
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -25,8 +25,10 @@
  * top of the next lower segment.
  */
 #define        __USE_TOPDOWN_VM
-#define        VM_DEFAULT_ADDRESS(da, sz) \
-       ((VM_MAXUSER_ADDRESS - MAXSSIZ) - round_page(sz))
+#define        VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
+    ((VM_MAXUSER_ADDRESS - MAXSSIZ) - round_page(sz))
+#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
+    round_page((vaddr_t)(da) + (vsize_t)maxdmap)
 
 #if defined(_MODULE) || defined(MODULAR)
 /*
diff -r 5ec14825f023 -r b9f265ba2e2e sys/arch/vax/include/vmparam.h
--- a/sys/arch/vax/include/vmparam.h    Sat Jan 25 13:49:27 2014 +0000
+++ b/sys/arch/vax/include/vmparam.h    Sat Jan 25 15:16:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.48 2013/09/18 13:31:39 martin Exp $      */
+/*     $NetBSD: vmparam.h,v 1.49 2014/01/25 15:16:50 christos Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -102,8 +102,10 @@
  * The address to which unspecified mapping requests default
  */
 #define __USE_TOPDOWN_VM
-#define VM_DEFAULT_ADDRESS(da, sz) \
-       trunc_page(VM_MAXUSER_ADDRESS - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
+    trunc_page(VM_MAXUSER_ADDRESS - MAXSSIZ - (sz))
+#define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
+    round_page((vaddr_t)(da) + (vsize_t)maxdmap)
 
 #define        USRIOSIZE               (8 * VAX_NPTEPG)        /* 512MB */
 #define        VM_PHYS_SIZE            (USRIOSIZE*VAX_NBPG)



Home | Main Index | Thread Index | Old Index