summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-06 00:30:39 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-06 00:30:39 +0000
commitdb54c5228ebca1e9fcf986c2c042c4475999f208 (patch)
treeb6907c4aad9d0b3b7bc00fab756321ebd7caf2e6 /sys
parent898073588fa02753b0b64486b672431d14634198 (diff)
Kill vm/vm_param.h, move it to uvm/uvm_param.h
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amiga/dev/grf_cc.c4
-rw-r--r--sys/arch/hp300/hp300/machdep.c3
-rw-r--r--sys/arch/m68k/include/db_machdep.h4
-rw-r--r--sys/arch/macppc/include/db_machdep.h4
-rw-r--r--sys/arch/mvme68k/dev/vs.c6
-rw-r--r--sys/arch/mvme88k/dev/nvram.c4
-rw-r--r--sys/arch/mvme88k/dev/vs.c4
-rw-r--r--sys/arch/mvme88k/include/db_machdep.h4
-rw-r--r--sys/arch/mvme88k/include/locore.h4
-rw-r--r--sys/arch/mvmeppc/include/db_machdep.h4
-rw-r--r--sys/dev/isa/wt.c4
-rw-r--r--sys/uvm/uvm_param.h (renamed from sys/vm/vm_param.h)30
-rw-r--r--sys/vm/vm.h4
13 files changed, 36 insertions, 43 deletions
diff --git a/sys/arch/amiga/dev/grf_cc.c b/sys/arch/amiga/dev/grf_cc.c
index b88a9c45c63..0a42c9f611b 100644
--- a/sys/arch/amiga/dev/grf_cc.c
+++ b/sys/arch/amiga/dev/grf_cc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_cc.c,v 1.7 2000/05/27 21:32:47 art Exp $ */
+/* $OpenBSD: grf_cc.c,v 1.8 2001/11/06 00:30:37 art Exp $ */
/* $NetBSD: grf_cc.c,v 1.23 1996/12/23 09:10:02 veego Exp $ */
/*
@@ -44,7 +44,7 @@
#include <sys/queue.h>
#include <sys/device.h>
#include <sys/systm.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <machine/cpu.h>
#include <amiga/amiga/color.h> /* DEBUG */
#include <amiga/amiga/device.h>
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 730beb099e8..0fe54e69b42 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.65 2001/09/20 17:02:30 mpech Exp $ */
+/* $OpenBSD: machdep.c,v 1.66 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -98,7 +98,6 @@
#include <dev/cons.h>
#define MAXMEM 64*1024 /* XXX - from cmap.h */
-#include <vm/vm_param.h>
#include <uvm/uvm_extern.h>
#include <arch/hp300/dev/hilreg.h>
diff --git a/sys/arch/m68k/include/db_machdep.h b/sys/arch/m68k/include/db_machdep.h
index 475e1336c79..7af52062575 100644
--- a/sys/arch/m68k/include/db_machdep.h
+++ b/sys/arch/m68k/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.6 2001/05/15 01:43:14 millert Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.7 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: db_machdep.h,v 1.20 1997/06/26 01:26:58 thorpej Exp $ */
/*
@@ -39,7 +39,7 @@
* XXX - Would rather not pull in vm headers, but need boolean_t,
* at least until boolean_t moves to <sys/types.h> or someplace.
*/
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <machine/frame.h>
#include <machine/psl.h>
diff --git a/sys/arch/macppc/include/db_machdep.h b/sys/arch/macppc/include/db_machdep.h
index a02ccbc1d4d..1b1de590573 100644
--- a/sys/arch/macppc/include/db_machdep.h
+++ b/sys/arch/macppc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.1 2001/09/01 15:49:06 drahn Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.2 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -34,7 +34,7 @@
#define _PPC_DB_MACHDEP_H_
#include <sys/types.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <machine/trap.h>
/*
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c
index 0dd744f0727..b28ef4ca9ba 100644
--- a/sys/arch/mvme68k/dev/vs.c
+++ b/sys/arch/mvme68k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.5 2001/06/26 21:35:38 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.6 2001/11/06 00:30:38 art Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -52,11 +52,11 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
-#include <vm/vm_param.h>
-
#include <machine/autoconf.h>
#include <machine/param.h>
+#include <uvm/uvm_param.h>
+
#ifdef mvme88k
#include <mvme88k/dev/vsreg.h>
#include <mvme88k/dev/vsvar.h>
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index 3c1b526a4ef..0c75d10c2c8 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.12 2001/11/01 12:13:46 art Exp $ */
+/* $OpenBSD: nvram.c,v 1.13 2001/11/06 00:30:38 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -51,7 +51,7 @@
#include <machine/mioctl.h>
#include <machine/vmparam.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <mvme88k/dev/memdevs.h>
#include <mvme88k/dev/nvramreg.h>
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index a6dae4136d5..0f5e21006a1 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.10 2001/08/31 01:52:19 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.11 2001/11/06 00:30:38 art Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -49,7 +49,7 @@
#include <sys/buf.h>
#include <sys/malloc.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
diff --git a/sys/arch/mvme88k/include/db_machdep.h b/sys/arch/mvme88k/include/db_machdep.h
index ce50e73d465..c83f1934b03 100644
--- a/sys/arch/mvme88k/include/db_machdep.h
+++ b/sys/arch/mvme88k/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.13 2001/08/31 01:06:29 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.14 2001/11/06 00:30:38 art Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -40,7 +40,7 @@
#include <machine/psl.h>
#include <machine/trap.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#define BKPT_SIZE (4) /* number of bytes in bkpt inst. */
#define BKPT_INST (0xF000D082U) /* tb0, 0,r0, vector 132 */
diff --git a/sys/arch/mvme88k/include/locore.h b/sys/arch/mvme88k/include/locore.h
index 8ba4b5ccfce..4e1888c13d5 100644
--- a/sys/arch/mvme88k/include/locore.h
+++ b/sys/arch/mvme88k/include/locore.h
@@ -1,9 +1,9 @@
-/* $OpenBSD: locore.h,v 1.10 2001/08/26 14:31:07 miod Exp $ */
+/* $OpenBSD: locore.h,v 1.11 2001/11/06 00:30:38 art Exp $ */
#ifndef _MACHINE_LOCORE_H_
#define _MACHINE_LOCORE_H_
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
/*
* C prototypes for various routines defined in locore_* and friends
diff --git a/sys/arch/mvmeppc/include/db_machdep.h b/sys/arch/mvmeppc/include/db_machdep.h
index 9ea2f2bda19..e46b1e5ebed 100644
--- a/sys/arch/mvmeppc/include/db_machdep.h
+++ b/sys/arch/mvmeppc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.4 2001/08/12 21:34:53 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.5 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -33,7 +33,7 @@
#ifndef _PPC_DB_MACHDEP_H_
#define _PPC_DB_MACHDEP_H_
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <machine/trap.h>
/* ELF symbols in ddb */
diff --git a/sys/dev/isa/wt.c b/sys/dev/isa/wt.c
index db191cafb02..526468cf5e8 100644
--- a/sys/dev/isa/wt.c
+++ b/sys/dev/isa/wt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wt.c,v 1.13 2000/11/12 01:00:03 mickey Exp $ */
+/* $OpenBSD: wt.c,v 1.14 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: wt.c,v 1.33 1996/05/12 23:54:22 mycroft Exp $ */
/*
@@ -64,7 +64,7 @@
#include <sys/conf.h>
#include <sys/timeout.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <machine/intr.h>
#include <machine/pio.h>
diff --git a/sys/vm/vm_param.h b/sys/uvm/uvm_param.h
index 08aedd9e98e..cee4d69bca5 100644
--- a/sys/vm/vm_param.h
+++ b/sys/uvm/uvm_param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: vm_param.h,v 1.25 2001/08/11 10:57:22 art Exp $ */
-/* $NetBSD: vm_param.h,v 1.25 2000/03/26 20:42:45 kleink Exp $ */
+/* $OpenBSD: uvm_param.h,v 1.1 2001/11/06 00:30:38 art Exp $ */
+/* $NetBSD: uvm_param.h,v 1.1 2000/06/26 14:59:04 mrg Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -77,7 +77,7 @@
/*
* This belongs in types.h, but breaks too many existing programs.
*/
-typedef int boolean_t;
+typedef int boolean_t;
#ifndef TRUE
#define TRUE 1
#endif
@@ -91,24 +91,15 @@ typedef int boolean_t;
*/
#define DEFAULT_PAGE_SIZE 4096
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(PAGE_SIZE)
/*
* All references to the size of a page should be done with PAGE_SIZE
- * or PAGE_SHIFT.
- * We allow them to be constants in MD code, but when necessary
- * (especially in LKMs) they will still be variables.
- */
-#if !defined(PAGE_SIZE) || defined(_LKM)
-/*
- * We undef those here to avoid problmes with LKMs.
+ * or PAGE_SHIFT. The fact they are variables is hidden here so that
+ * we can easily make them constant if we so desire.
*/
-#undef PAGE_SIZE
-#undef PAGE_MASK
-#undef PAGE_SHIFT
#define PAGE_SIZE uvmexp.pagesize /* size of page */
#define PAGE_MASK uvmexp.pagemask /* size of page - 1 */
#define PAGE_SHIFT uvmexp.pageshift /* bits to shift for pages */
-#endif /* !PAGE_SIZE */
#endif /* _KERNEL */
/*
@@ -159,14 +150,17 @@ struct _ps_strings {
*/
#ifdef _KERNEL
#define atop(x) (((unsigned long)(x)) >> PAGE_SHIFT)
-#define ptoa(x) ((vaddr_t)((x) << PAGE_SHIFT))
+#define ptoa(x) ((vaddr_t)((vaddr_t)(x) << PAGE_SHIFT))
/*
* Round off or truncate to the nearest page. These will work
* for either addresses or counts (i.e., 1 byte rounds to 1 page).
*/
-#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
-#define trunc_page(x) ((x) & ~PAGE_MASK)
+#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
+#define trunc_page(x) ((x) & ~PAGE_MASK)
+
+extern psize_t mem_size; /* size of physical memory (bytes) */
+
#else
/* out-of-kernel versions of round_page and trunc_page */
#define round_page(x) \
diff --git a/sys/vm/vm.h b/sys/vm/vm.h
index 5e6ee2aca77..0d035292cb8 100644
--- a/sys/vm/vm.h
+++ b/sys/vm/vm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm.h,v 1.20 2001/08/12 22:41:15 mickey Exp $ */
+/* $OpenBSD: vm.h,v 1.21 2001/11/06 00:30:38 art Exp $ */
/* $NetBSD: vm.h,v 1.22 2000/03/26 20:54:48 kleink Exp $ */
/*
@@ -57,7 +57,7 @@ typedef struct vm_page *vm_page_t;
#include <sys/types.h>
#include <sys/vmmeter.h>
#include <sys/queue.h>
-#include <vm/vm_param.h>
+#include <uvm/uvm_param.h>
#include <sys/lock.h>
#include <uvm/uvm_extern.h>
#include <vm/vm_page.h>