summaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-11-25 08:41:37 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-11-25 08:41:37 +0000
commit4fa0b6f54ae2ea7f768868f8204878be8ef4ca63 (patch)
tree5763133ebc6b86ee986f99eba6be992308c14d4f /sys/vm
parent0fe78c3128864d128b2b10153b8d533ff8c00375 (diff)
Allow MD code to define PAGE_SIZE to a constant.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_param.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h
index 51250a9ae7b..f5e0cd5ca1d 100644
--- a/sys/vm/vm_param.h
+++ b/sys/vm/vm_param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_param.h,v 1.15 1999/08/23 07:57:17 art Exp $ */
+/* $OpenBSD: vm_param.h,v 1.16 1999/11/25 08:41:36 art Exp $ */
/* $NetBSD: vm_param.h,v 1.12 1995/03/26 20:39:16 jtc Exp $ */
/*
@@ -96,6 +96,10 @@ typedef int boolean_t;
* or PAGE_SHIFT. The fact they are variables is hidden here so that
* we can easily make them constant if we so desire.
*/
+#if !defined(PAGE_SIZE) || defined(_LKM)
+#undef PAGE_SIZE
+#undef PAGE_MASK
+#undef PAGE_SHIFT
#if defined(UVM)
#define PAGE_SIZE uvmexp.pagesize /* size of page */
#define PAGE_MASK uvmexp.pagemask /* size of page - 1 */
@@ -105,6 +109,7 @@ typedef int boolean_t;
#define PAGE_MASK page_mask /* size of page - 1 */
#define PAGE_SHIFT page_shift /* bits to shift for pages */
#endif
+#endif /* !PAGE_SIZE */
#if defined(_KERNEL) && !defined(UVM)
extern vsize_t page_mask;