diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-04-06 23:41:03 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-04-06 23:41:03 +0000 |
commit | e69801569699d1e68b3cbce8f184c38ef13b65e0 (patch) | |
tree | 99c6023c12504a7de3a78aff9da97986f643f3b1 | |
parent | 48c3bdf684b8ff05ae8aaaea6ca9487af77d34f5 (diff) |
Get rid of vm_pmap from struct vmspace.
-rw-r--r-- | sys/kern/init_main.c | 5 | ||||
-rw-r--r-- | sys/kern/kern_sysctl.c | 6 | ||||
-rw-r--r-- | sys/vm/vm.h | 5 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 9 |
4 files changed, 7 insertions, 18 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 7b53d5d6a43..efaa53b9878 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.61 2001/04/02 21:43:11 niklas Exp $ */ +/* $OpenBSD: init_main.c,v 1.62 2001/04/06 23:41:02 art Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -297,10 +297,9 @@ main(framep) #else p->p_vmspace = &vmspace0; vmspace0.vm_refcnt = 1; - pmap_pinit(&vmspace0.vm_pmap); + vmspace0.vm_map.pmap = pmap_create(0); vm_map_init(&p->p_vmspace->vm_map, round_page(VM_MIN_ADDRESS), trunc_page(VM_MAX_ADDRESS), TRUE); - vmspace0.vm_map.pmap = &vmspace0.vm_pmap; #endif /* UVM */ p->p_addr = proc0paddr; /* XXX */ diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 697fad8ab03..387d39f0184 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.40 2001/03/23 23:36:39 millert Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.41 2001/04/06 23:41:02 art Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -869,7 +869,6 @@ fill_eproc(p, ep) ep->e_vm.vm_tsize = 0; ep->e_vm.vm_dsize = 0; ep->e_vm.vm_ssize = 0; - /* ep->e_vm.vm_pmap = XXX; */ } else { register struct vmspace *vm = p->p_vmspace; @@ -877,9 +876,6 @@ fill_eproc(p, ep) ep->e_vm.vm_tsize = vm->vm_tsize; ep->e_vm.vm_dsize = vm->vm_dsize; ep->e_vm.vm_ssize = vm->vm_ssize; -#ifndef UVM - ep->e_vm.vm_pmap = *vm->vm_map.pmap; -#endif } if (p->p_pptr) ep->e_ppid = p->p_pptr->p_pid; diff --git a/sys/vm/vm.h b/sys/vm/vm.h index 5a11ddabbf3..4b9be5c4922 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.h,v 1.11 2001/03/23 23:36:39 millert Exp $ */ +/* $OpenBSD: vm.h,v 1.12 2001/04/06 23:41:01 art Exp $ */ /* $NetBSD: vm.h,v 1.13 1994/06/29 06:47:52 cgd Exp $ */ /* @@ -89,9 +89,6 @@ typedef struct lock *lock_t; */ struct vmspace { struct vm_map vm_map; /* VM address map */ -#ifndef UVM - struct pmap vm_pmap; /* private physical map */ -#endif int vm_refcnt; /* number of references */ caddr_t vm_shm; /* SYS5 shared memory private data XXX */ /* we copy from vm_startcopy to the end of the structure on fork */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 226be9e7f5d..cc315240115 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_map.c,v 1.18 1999/09/03 18:02:28 art Exp $ */ +/* $OpenBSD: vm_map.c,v 1.19 2001/04/06 23:41:02 art Exp $ */ /* $NetBSD: vm_map.c,v 1.23 1996/02/10 00:08:08 christos Exp $ */ /* @@ -238,8 +238,7 @@ vmspace_alloc(min, max, pageable) MALLOC(vm, struct vmspace *, sizeof(struct vmspace), M_VMMAP, M_WAITOK); bzero(vm, (caddr_t) &vm->vm_startcopy - (caddr_t) vm); vm_map_init(&vm->vm_map, min, max, pageable); - pmap_pinit(&vm->vm_pmap); - vm->vm_map.pmap = &vm->vm_pmap; /* XXX */ + vm->vm_map.pmap = pmap_create(0); vm->vm_refcnt = 1; return (vm); } @@ -258,7 +257,7 @@ vmspace_free(vm) vm_map_lock(&vm->vm_map); (void) vm_map_delete(&vm->vm_map, vm->vm_map.min_offset, vm->vm_map.max_offset); - pmap_release(&vm->vm_pmap); + pmap_destroy(vm->vm_map.pmap); FREE(vm, M_VMMAP); } } @@ -2211,7 +2210,6 @@ vmspace_fork(vm1) vm_map_t new_map; vm_map_entry_t old_entry; vm_map_entry_t new_entry; - pmap_t new_pmap; vm_map_lock(old_map); @@ -2219,7 +2217,6 @@ vmspace_fork(vm1) old_map->entries_pageable); bcopy(&vm1->vm_startcopy, &vm2->vm_startcopy, (caddr_t) (vm1 + 1) - (caddr_t) &vm1->vm_startcopy); - new_pmap = &vm2->vm_pmap; /* XXX */ new_map = &vm2->vm_map; /* XXX */ old_entry = old_map->header.next; |