Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Add "opt_modular.h"



details:   https://anonhg.NetBSD.org/src/rev/63f35d53b58d
branches:  trunk
changeset: 777573:63f35d53b58d
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Feb 23 20:49:46 2012 +0000

description:
Add "opt_modular.h"
#define __uvmexp_pagesize
if MIN_PAGE_SIZE != MAX_PAGE_SIZE && modular is defined

diffstat:

 sys/uvm/uvm_param.h |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r aebdc665e042 -r 63f35d53b58d sys/uvm/uvm_param.h
--- a/sys/uvm/uvm_param.h       Thu Feb 23 20:33:29 2012 +0000
+++ b/sys/uvm/uvm_param.h       Thu Feb 23 20:49:46 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_param.h,v 1.27 2012/02/17 23:41:02 matt Exp $      */
+/*     $NetBSD: uvm_param.h,v 1.28 2012/02/23 20:49:46 matt Exp $      */
 
 /*
  * Copyright (c) 1991, 1993
@@ -68,6 +68,7 @@
 #define        _VM_PARAM_
 
 #ifdef _KERNEL_OPT
+#include "opt_modular.h"
 #include "opt_uvm.h"
 #endif
 #ifdef _KERNEL
@@ -134,11 +135,16 @@
  * 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) || defined(MODULAR))
+#if (MIN_PAGE_SIZE != MAX_PAGE_SIZE)
+#if defined(MODULAR)
+#define        __uvmexp_pagesize
+#endif
+#if defined(_LKM) || defined(_MODULE)
 #undef PAGE_SIZE
 #undef PAGE_MASK
 #undef PAGE_SHIFT
 #endif
+#endif
 
 /*
  * Now provide PAGE_SIZE, PAGE_MASK, and PAGE_SHIFT if we do not
@@ -151,7 +157,6 @@
 #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 */
-#define        __uvmexp_pagesize
 #endif /* PAGE_SIZE */
 
 #endif /* _KERNEL */



Home | Main Index | Thread Index | Old Index