Source-Changes-HG archive

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

[src/trunk]: src/sys/rump Give the kernel/local pmaps actual storage.



details:   https://anonhg.NetBSD.org/src/rev/af09f19e2709
branches:  trunk
changeset: 807639:af09f19e2709
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Apr 17 12:43:15 2015 +0000

description:
Give the kernel/local pmaps actual storage.

That way friendly neighborhood macros won't go scribbling
in the wrong places.

diffstat:

 sys/rump/include/machine/pmap.h                            |   6 +++++-
 sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c |   6 ++----
 sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c         |   6 ++----
 sys/rump/librump/rumpkern/rump_private.h                   |   5 ++---
 sys/rump/librump/rumpkern/vm.c                             |  10 +++++++---
 5 files changed, 18 insertions(+), 15 deletions(-)

diffs (133 lines):

diff -r b9346181d167 -r af09f19e2709 sys/rump/include/machine/pmap.h
--- a/sys/rump/include/machine/pmap.h   Fri Apr 17 12:41:46 2015 +0000
+++ b/sys/rump/include/machine/pmap.h   Fri Apr 17 12:43:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.6 2010/06/17 08:19:32 pooka Exp $   */
+/*     $NetBSD: pmap.h,v 1.7 2015/04/17 12:43:15 pooka Exp $   */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -28,6 +28,10 @@
 #ifndef _SYS_RUMP_PMAP_H_
 #define _SYS_RUMP_PMAP_H_
 
+struct pmap {
+       int vac_me_not_at_all;
+};
+
 #define pmap_update(v)
 #define pmap_is_modified(a) (true)
 #define pmap_is_referenced(a) (true)
diff -r b9346181d167 -r af09f19e2709 sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c
--- a/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c        Fri Apr 17 12:41:46 2015 +0000
+++ b/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c        Fri Apr 17 12:43:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_generic_pmap.c,v 1.3 2015/04/03 16:46:39 pooka Exp $      */
+/*     $NetBSD: rump_generic_pmap.c,v 1.4 2015/04/17 12:43:16 pooka Exp $      */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.3 2015/04/03 16:46:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.4 2015/04/17 12:43:16 pooka Exp $");
 
 #include <sys/param.h>
 
@@ -39,8 +39,6 @@
  * architectures which do not conform to the kernel ABI.
  */
 
-struct pmap *const kernel_pmap_ptr = RUMP_PMAP_KERNEL;
-
 void
 pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int fl)
 {
diff -r b9346181d167 -r af09f19e2709 sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c
--- a/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c        Fri Apr 17 12:41:46 2015 +0000
+++ b/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c        Fri Apr 17 12:43:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_x86_pmap.c,v 1.2 2015/04/03 16:46:39 pooka Exp $  */
+/*     $NetBSD: rump_x86_pmap.c,v 1.3 2015/04/17 12:43:16 pooka Exp $  */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.2 2015/04/03 16:46:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.3 2015/04/17 12:43:16 pooka Exp $");
 
 #include <sys/param.h>
 
@@ -34,8 +34,6 @@
 
 #include "rump_private.h"
 
-struct pmap *const kernel_pmap_ptr = RUMP_PMAP_KERNEL;
-
 void
 pmap_kenter_pa(vaddr_t va, paddr_t pa, vm_prot_t prot, u_int fl)
 {
diff -r b9346181d167 -r af09f19e2709 sys/rump/librump/rumpkern/rump_private.h
--- a/sys/rump/librump/rumpkern/rump_private.h  Fri Apr 17 12:41:46 2015 +0000
+++ b/sys/rump/librump/rumpkern/rump_private.h  Fri Apr 17 12:43:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_private.h,v 1.89 2015/04/03 16:46:39 pooka Exp $  */
+/*     $NetBSD: rump_private.h,v 1.90 2015/04/17 12:43:16 pooka Exp $  */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -118,10 +118,9 @@
 extern unsigned long rump_physmemlimit;
 
 extern struct vmspace *rump_vmspace_local;
+extern struct pmap rump_pmap_local;
 #define RUMP_LOCALPROC_P(p) \
     (p->p_vmspace == vmspace_kernel() || p->p_vmspace == rump_vmspace_local)
-#define RUMP_PMAP_KERNEL ((struct pmap *const)-1)
-#define RUMP_PMAP_LOCAL ((struct pmap *)-2)
 
 void           rump_component_load(const struct rump_component *);
 void           rump_component_init(enum rump_component_type);
diff -r b9346181d167 -r af09f19e2709 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Fri Apr 17 12:41:46 2015 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Fri Apr 17 12:43:15 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.163 2015/04/03 16:46:39 pooka Exp $   */
+/*     $NetBSD: vm.c,v 1.164 2015/04/17 12:43:16 pooka Exp $   */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.163 2015/04/03 16:46:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.164 2015/04/17 12:43:16 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -88,6 +88,10 @@
 static struct vm_map module_map_store;
 extern struct vm_map *module_map;
 
+static struct pmap pmap_kernel;
+struct pmap rump_pmap_local;
+struct pmap *const kernel_pmap_ptr = &pmap_kernel;
+
 vmem_t *kmem_arena;
 vmem_t *kmem_va_arena;
 
@@ -395,7 +399,7 @@
 
        /* create vmspace used by local clients */
        rump_vmspace_local = kmem_zalloc(sizeof(*rump_vmspace_local), KM_SLEEP);
-       uvmspace_init(rump_vmspace_local, RUMP_PMAP_LOCAL, 0, 0, false);
+       uvmspace_init(rump_vmspace_local, &rump_pmap_local, 0, 0, false);
 }
 
 void



Home | Main Index | Thread Index | Old Index