Module Name: src Committed By: matt Date: Fri Feb 17 23:41:03 UTC 2012
Modified Files: src/sys/uvm: uvm_init.c uvm_param.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/uvm/uvm_init.c cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/uvm_param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_init.c diff -u src/sys/uvm/uvm_init.c:1.43 src/sys/uvm/uvm_init.c:1.44 --- src/sys/uvm/uvm_init.c:1.43 Sat Jan 28 00:00:06 2012 +++ src/sys/uvm/uvm_init.c Fri Feb 17 23:41:02 2012 @@ -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 uvmexp uvmexp; /* decl */ 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; Index: src/sys/uvm/uvm_param.h diff -u src/sys/uvm/uvm_param.h:1.26 src/sys/uvm/uvm_param.h:1.27 --- src/sys/uvm/uvm_param.h:1.26 Tue Nov 29 07:43:54 2011 +++ src/sys/uvm/uvm_param.h Fri Feb 17 23:41:02 2012 @@ -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 */