Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern complete the incomplete pagesize r...



details:   https://anonhg.NetBSD.org/src/rev/d0ec3fa682e1
branches:  trunk
changeset: 762540:d0ec3fa682e1
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 22 18:43:20 2011 +0000

description:
complete the incomplete pagesize rototill

diffstat:

 sys/rump/librump/rumpkern/vm.c |  25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r e1fcb535f75c -r d0ec3fa682e1 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Tue Feb 22 18:41:04 2011 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Tue Feb 22 18:43:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.111 2011/02/10 14:46:45 pooka Exp $   */
+/*     $NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $   */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.111 2011/02/10 14:46:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.112 2011/02/22 18:43:20 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -69,11 +69,14 @@
 kmutex_t uvm_swap_data_lock;
 
 struct uvmexp uvmexp;
-int *uvmexp_pagesize;
-int *uvmexp_pagemask;
-int *uvmexp_pageshift;
 struct uvm uvm;
 
+#ifdef __uvmexp_pagesize
+int *uvmexp_pagesize = &uvmexp.pagesize;
+int *uvmexp_pagemask = &uvmexp.pagemask;
+int *uvmexp_pageshift = &uvmexp.pageshift;
+#endif
+
 struct vm_map rump_vmmap;
 static struct vm_map_kernel kmem_map_store;
 struct vm_map *kmem_map = &kmem_map_store.vmk_map;
@@ -303,6 +306,18 @@
 
        uvmexp.free = 1024*1024; /* XXX: arbitrary & not updated */
 
+#ifndef __uvmexp_pagesize
+       uvmexp.pagesize = PAGE_SIZE;
+       uvmexp.pagemask = PAGE_MASK;
+       uvmexp.pageshift = PAGE_SHIFT;
+#else
+#define FAKE_PAGE_SHIFT 12
+       uvmexp.pageshift = FAKE_PAGE_SHIFT;
+       uvmexp.pagesize = 1<<FAKE_PAGE_SHIFT;
+       uvmexp.pagemask = (1<<FAKE_PAGE_SHIFT)-1;
+#undef FAKE_PAGE_SHIFT
+#endif
+
        mutex_init(&pagermtx, MUTEX_DEFAULT, 0);
        mutex_init(&uvm_pageqlock, MUTEX_DEFAULT, 0);
        mutex_init(&uvm_swap_data_lock, MUTEX_DEFAULT, 0);



Home | Main Index | Thread Index | Old Index