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 Use RUMP_PMAP_KERNEL and RUMP_PMAP...
details: https://anonhg.NetBSD.org/src/rev/e608c18ec54c
branches: trunk
changeset: 337125:e608c18ec54c
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Apr 03 16:46:39 2015 +0000
description:
Use RUMP_PMAP_KERNEL and RUMP_PMAP_LOCAL to denote
kernel and local client pmaps, respectively.
diffstat:
sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c | 8 +++++---
sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c | 9 +++++----
sys/rump/librump/rumpkern/rump_private.h | 4 +++-
sys/rump/librump/rumpkern/vm.c | 6 +++---
4 files changed, 16 insertions(+), 11 deletions(-)
diffs (105 lines):
diff -r f88e4badcc8a -r e608c18ec54c sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c
--- a/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c Fri Apr 03 16:40:55 2015 +0000
+++ b/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c Fri Apr 03 16:46:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_generic_pmap.c,v 1.2 2014/02/12 22:30:45 pooka Exp $ */
+/* $NetBSD: rump_generic_pmap.c,v 1.3 2015/04/03 16:46:39 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,18 +26,20 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.2 2014/02/12 22:30:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.3 2015/04/03 16:46:39 pooka Exp $");
#include <sys/param.h>
#include <uvm/uvm_extern.h>
+#include "rump_private.h"
+
/*
* This is the MI pmap implementation for rump kernels. It's used only by
* architectures which do not conform to the kernel ABI.
*/
-struct pmap *const kernel_pmap_ptr = (struct pmap *const)-1;
+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 f88e4badcc8a -r e608c18ec54c sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c
--- a/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c Fri Apr 03 16:40:55 2015 +0000
+++ b/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c Fri Apr 03 16:46:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_x86_pmap.c,v 1.1 2014/02/12 22:28:43 pooka Exp $ */
+/* $NetBSD: rump_x86_pmap.c,v 1.2 2015/04/03 16:46:39 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -26,14 +26,15 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.1 2014/02/12 22:28:43 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.2 2015/04/03 16:46:39 pooka Exp $");
#include <sys/param.h>
#include <uvm/uvm_extern.h>
-static struct pmap thepmap;
-struct pmap *const kernel_pmap_ptr = &thepmap;
+#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 f88e4badcc8a -r e608c18ec54c sys/rump/librump/rumpkern/rump_private.h
--- a/sys/rump/librump/rumpkern/rump_private.h Fri Apr 03 16:40:55 2015 +0000
+++ b/sys/rump/librump/rumpkern/rump_private.h Fri Apr 03 16:46:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_private.h,v 1.88 2015/04/03 16:40:55 pooka Exp $ */
+/* $NetBSD: rump_private.h,v 1.89 2015/04/03 16:46:39 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -120,6 +120,8 @@
extern struct vmspace *rump_vmspace_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 f88e4badcc8a -r e608c18ec54c sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c Fri Apr 03 16:40:55 2015 +0000
+++ b/sys/rump/librump/rumpkern/vm.c Fri Apr 03 16:46:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.162 2015/04/03 16:40:55 pooka Exp $ */
+/* $NetBSD: vm.c,v 1.163 2015/04/03 16:46:39 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.162 2015/04/03 16:40:55 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.163 2015/04/03 16:46:39 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -395,7 +395,7 @@
/* create vmspace used by local clients */
rump_vmspace_local = kmem_zalloc(sizeof(*rump_vmspace_local), KM_SLEEP);
- uvmspace_init(rump_vmspace_local, (struct pmap *)-2, 0, 0, false);
+ uvmspace_init(rump_vmspace_local, RUMP_PMAP_LOCAL, 0, 0, false);
}
void
Home |
Main Index |
Thread Index |
Old Index