Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Make sure to export uvmexp_* if MODULAR is defined.
details: https://anonhg.NetBSD.org/src/rev/d5e7a1f7b0d7
branches: trunk
changeset: 777416:d5e7a1f7b0d7
user: matt <matt%NetBSD.org@localhost>
date: Fri Feb 17 23:41:02 2012 +0000
description:
Make sure to export uvmexp_* if MODULAR is defined.
Make the uvmexp_page* be a pointer to a const int as well as having the
pointer be const as well.
diffstat:
sys/uvm/uvm_init.c | 10 +++++-----
sys/uvm/uvm_param.h | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (62 lines):
diff -r 5bc29ddd0c64 -r d5e7a1f7b0d7 sys/uvm/uvm_init.c
--- a/sys/uvm/uvm_init.c Fri Feb 17 22:36:50 2012 +0000
+++ b/sys/uvm/uvm_init.c Fri Feb 17 23:41:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_init.c,v 1.43 2012/01/28 00:00:06 rmind Exp $ */
+/* $NetBSD: uvm_init.c,v 1.44 2012/02/17 23:41:02 matt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.43 2012/01/28 00:00:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.44 2012/02/17 23:41:02 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,9 +58,9 @@
struct uvm_object *uvm_kernel_object;
#if defined(__uvmexp_pagesize)
-int *uvmexp_pagesize = &uvmexp.pagesize;
-int *uvmexp_pagemask = &uvmexp.pagemask;
-int *uvmexp_pageshift = &uvmexp.pageshift;
+const int * const uvmexp_pagesize = &uvmexp.pagesize;
+const int * const uvmexp_pagemask = &uvmexp.pagemask;
+const int * const uvmexp_pageshift = &uvmexp.pageshift;
#endif
kmutex_t uvm_pageqlock;
diff -r 5bc29ddd0c64 -r d5e7a1f7b0d7 sys/uvm/uvm_param.h
--- a/sys/uvm/uvm_param.h Fri Feb 17 22:36:50 2012 +0000
+++ b/sys/uvm/uvm_param.h Fri Feb 17 23:41:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_param.h,v 1.26 2011/11/29 07:43:54 matt Exp $ */
+/* $NetBSD: uvm_param.h,v 1.27 2012/02/17 23:41:02 matt Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -134,7 +134,7 @@
* If MIN_PAGE_SIZE and MAX_PAGE_SIZE are not equal, then we must use
* non-constant PAGE_SIZE, et al for LKMs.
*/
-#if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) && defined(_LKM)
+#if (MIN_PAGE_SIZE != MAX_PAGE_SIZE) && (defined(_LKM) || defined(MODULAR))
#undef PAGE_SIZE
#undef PAGE_MASK
#undef PAGE_SHIFT
@@ -145,9 +145,9 @@
* have ones that are compile-time constants.
*/
#if !defined(PAGE_SIZE)
-extern int *uvmexp_pagesize;
-extern int *uvmexp_pagemask;
-extern int *uvmexp_pageshift;
+extern const int *const uvmexp_pagesize;
+extern const int *const uvmexp_pagemask;
+extern const int *const uvmexp_pageshift;
#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 */
Home |
Main Index |
Thread Index |
Old Index