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.
This commit is contained in:
matt 2012-02-17 23:41:02 +00:00
parent 1cf12d0216
commit a199401390
2 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -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 */