summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_io.c4
-rw-r--r--sys/uvm/uvm_km.c4
-rw-r--r--sys/uvm/uvm_map.c13
-rw-r--r--sys/uvm/uvm_map.h4
-rw-r--r--sys/uvm/uvm_mmap.c4
5 files changed, 16 insertions, 13 deletions
diff --git a/sys/uvm/uvm_io.c b/sys/uvm/uvm_io.c
index f9fb928f4bb..1b9339979e1 100644
--- a/sys/uvm/uvm_io.c
+++ b/sys/uvm/uvm_io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_io.c,v 1.16 2005/11/04 21:48:07 miod Exp $ */
+/* $OpenBSD: uvm_io.c,v 1.17 2009/07/25 12:55:40 miod Exp $ */
/* $NetBSD: uvm_io.c,v 1.12 2000/06/27 17:29:23 mrg Exp $ */
/*
@@ -140,7 +140,7 @@ uvm_io(vm_map_t map, struct uio *uio, int flags)
vm_map_lock(kernel_map);
uvm_unmap_remove(kernel_map, kva, kva+chunksz,
- &dead_entries, NULL);
+ &dead_entries, NULL, FALSE);
vm_map_unlock(kernel_map);
if (dead_entries != NULL)
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index f30878ad873..b7604518559 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.74 2009/07/22 21:05:37 oga Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.75 2009/07/25 12:55:40 miod Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -462,7 +462,7 @@ uvm_km_free_wakeup(struct vm_map *map, vaddr_t addr, vsize_t size)
vm_map_lock(map);
uvm_unmap_remove(map, trunc_page(addr), round_page(addr+size),
- &dead_entries, NULL);
+ &dead_entries, NULL, FALSE);
wakeup(map);
vm_map_unlock(map);
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 9c24fc7ee0a..1710efb09a3 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.118 2009/06/17 00:13:59 oga Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.119 2009/07/25 12:55:40 miod Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -1429,7 +1429,7 @@ uvm_unmap_p(vm_map_t map, vaddr_t start, vaddr_t end, struct proc *p)
* detach from the dead entries...
*/
vm_map_lock(map);
- uvm_unmap_remove(map, start, end, &dead_entries, p);
+ uvm_unmap_remove(map, start, end, &dead_entries, p, FALSE);
vm_map_unlock(map);
if (dead_entries != NULL)
@@ -1454,7 +1454,7 @@ uvm_unmap_p(vm_map_t map, vaddr_t start, vaddr_t end, struct proc *p)
void
uvm_unmap_remove(struct vm_map *map, vaddr_t start, vaddr_t end,
- struct vm_map_entry **entry_list, struct proc *p)
+ struct vm_map_entry **entry_list, struct proc *p, boolean_t remove_holes)
{
struct vm_map_entry *entry, *first_entry, *next;
vaddr_t len;
@@ -1539,7 +1539,10 @@ uvm_unmap_remove(struct vm_map *map, vaddr_t start, vaddr_t end,
* we want to free these pages right away...
*/
if (UVM_ET_ISHOLE(entry)) {
- /* nothing to do! */
+ if (!remove_holes) {
+ entry = next;
+ continue;
+ }
} else if (map->flags & VM_MAP_INTRSAFE) {
uvm_km_pgremove_intrsafe(entry->start, entry->end);
pmap_kremove(entry->start, len);
@@ -3354,7 +3357,7 @@ uvmspace_free(struct vmspace *vm)
if (vm->vm_map.nentries) {
uvm_unmap_remove(&vm->vm_map,
vm->vm_map.min_offset, vm->vm_map.max_offset,
- &dead_entries, NULL);
+ &dead_entries, NULL, TRUE);
if (dead_entries != NULL)
uvm_unmap_detach(dead_entries, 0);
}
diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h
index cc5eae5db43..105e0451623 100644
--- a/sys/uvm/uvm_map.h
+++ b/sys/uvm/uvm_map.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.h,v 1.40 2009/03/25 20:00:18 oga Exp $ */
+/* $OpenBSD: uvm_map.h,v 1.41 2009/07/25 12:55:40 miod Exp $ */
/* $NetBSD: uvm_map.h,v 1.24 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -299,7 +299,7 @@ int uvm_map_submap(vm_map_t, vaddr_t, vaddr_t, vm_map_t);
void uvm_unmap_p(vm_map_t, vaddr_t, vaddr_t, struct proc *);
void uvm_unmap_detach(vm_map_entry_t,int);
void uvm_unmap_remove(vm_map_t, vaddr_t, vaddr_t, vm_map_entry_t *,
- struct proc *);
+ struct proc *, boolean_t);
#endif /* _KERNEL */
diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c
index 34f9f89e8ff..3c2ec783af8 100644
--- a/sys/uvm/uvm_mmap.c
+++ b/sys/uvm/uvm_mmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_mmap.c,v 1.78 2009/07/22 21:05:37 oga Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.79 2009/07/25 12:55:40 miod Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -742,7 +742,7 @@ sys_munmap(struct proc *p, void *v, register_t *retval)
/*
* doit!
*/
- uvm_unmap_remove(map, addr, addr + size, &dead_entries, p);
+ uvm_unmap_remove(map, addr, addr + size, &dead_entries, p, FALSE);
vm_map_unlock(map); /* and unlock */