summaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>1999-07-28 07:40:02 +0000
committerAlan Cox <alc@FreeBSD.org>1999-07-28 07:40:02 +0000
commitf620cbcd9093f858ace7e5ee892e76999e0fcdf9 (patch)
treee8ca0c3ac86db2490f18c902494a9a813e5c14c1 /sys/vm
parent4153462516ee0501dace134a00ab1e87b587159e (diff)
Notes
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/pmap.h3
-rw-r--r--sys/vm/vm_glue.c4
-rw-r--r--sys/vm/vm_map.c4
-rw-r--r--sys/vm/vm_map.h8
4 files changed, 15 insertions, 4 deletions
diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h
index 1f35a6f50462..1a527af5e497 100644
--- a/sys/vm/pmap.h
+++ b/sys/vm/pmap.h
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: pmap.h,v 1.27 1998/02/01 20:08:39 bde Exp $
+ * $Id: pmap.h,v 1.28 1998/07/26 18:15:20 dfr Exp $
*/
/*
@@ -120,6 +120,7 @@ void pmap_pageable __P((pmap_t, vm_offset_t, vm_offset_t,
vm_offset_t pmap_phys_address __P((int));
void pmap_pinit __P((pmap_t));
void pmap_pinit0 __P((pmap_t));
+void pmap_pinit2 __P((pmap_t));
void pmap_protect __P((pmap_t, vm_offset_t, vm_offset_t,
vm_prot_t));
void pmap_qenter __P((vm_offset_t, vm_page_t *, int));
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 18a98cb18657..d98b586fed78 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -59,7 +59,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_glue.c,v 1.80 1999/01/07 21:23:50 julian Exp $
+ * $Id: vm_glue.c,v 1.80.2.1 1999/01/27 20:51:43 julian Exp $
*/
#include "opt_rlimit.h"
@@ -221,6 +221,8 @@ vm_fork(p1, p2, flags)
if ((flags & RFMEM) == 0) {
p2->p_vmspace = vmspace_fork(p1->p_vmspace);
+ pmap_pinit2(vmspace_pmap(p2->p_vmspace));
+
if (p1->p_vmspace->vm_shm)
shmfork(p1, p2);
}
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index ad9ae69d008d..b331f5a318e3 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.139.2.7 1999/06/13 04:06:41 alc Exp $
+ * $Id: vm_map.c,v 1.139.2.8 1999/06/20 19:17:16 alc Exp $
*/
/*
@@ -2435,6 +2435,7 @@ vmspace_exec(struct proc *p) {
*/
vmspace_free(oldvmspace);
p->p_vmspace = newvmspace;
+ pmap_pinit2(vmspace_pmap(newvmspace));
if (p == curproc)
pmap_activate(p);
}
@@ -2454,6 +2455,7 @@ vmspace_unshare(struct proc *p) {
newvmspace = vmspace_fork(oldvmspace);
vmspace_free(oldvmspace);
p->p_vmspace = newvmspace;
+ pmap_pinit2(vmspace_pmap(newvmspace));
if (p == curproc)
pmap_activate(p);
}
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 19dc0ea2dad8..1abf759115d4 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.h,v 1.33.2.1 1999/01/27 20:51:44 julian Exp $
+ * $Id: vm_map.h,v 1.33.2.2 1999/03/11 05:56:49 alc Exp $
*/
/*
@@ -285,6 +285,12 @@ _vm_map_lock_upgrade(vm_map_t map, struct proc *p) {
#define vm_map_max(map) ((map)->max_offset)
#define vm_map_pmap(map) ((map)->pmap)
+static __inline struct pmap *
+vmspace_pmap(struct vmspace *vmspace)
+{
+ return &vmspace->vm_pmap;
+}
+
/* XXX: number of kernel maps and entries to statically allocate */
#define MAX_KMAP 10
#define MAX_KMAPENT 128