summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2004-02-23 06:19:33 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2004-02-23 06:19:33 +0000
commitde2067d3774285101b5dfee0c1a30dd1e1f4225e (patch)
tree3c3235ce3a5961078f106a64788c34e0f654d8a3 /sys/uvm
parent368d580ada242c6c62b6d5bdb01046d5621eef12 (diff)
sync of pmap_update() calls with NetBSD. pmap_update is defined away on
all architectures but arm, where it is needed.
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_device.c6
-rw-r--r--sys/uvm/uvm_fault.c6
-rw-r--r--sys/uvm/uvm_glue.c3
-rw-r--r--sys/uvm/uvm_km.c5
-rw-r--r--sys/uvm/uvm_map.c10
-rw-r--r--sys/uvm/uvm_page.c3
-rw-r--r--sys/uvm/uvm_pager.c4
7 files changed, 30 insertions, 7 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c
index 47a3e232af4..c0a3529068c 100644
--- a/sys/uvm/uvm_device.c
+++ b/sys/uvm/uvm_device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_device.c,v 1.23 2002/11/06 00:17:28 art Exp $ */
+/* $OpenBSD: uvm_device.c,v 1.24 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -460,11 +460,15 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags)
*/
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap,
uobj, NULL);
+
+ /* sync what we have so far */
+ pmap_update(ufi->orig_map->pmap);
uvm_wait("udv_fault");
return (VM_PAGER_REFAULT);
}
}
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj, NULL);
+ pmap_update(ufi->orig_map->pmap);
return (retval);
}
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index 5a58cc44923..12cfc54cda9 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.31 2002/03/14 01:27:18 millert Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.32 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -862,6 +862,7 @@ ReFault:
(VM_MAPENT_ISWIRED(ufi.entry) ? PMAP_WIRED : 0));
}
simple_unlock(&anon->an_lock);
+ pmap_update(ufi.orig_map->pmap);
}
/* locked: maps(read), amap(if there) */
@@ -1001,6 +1002,7 @@ ReFault:
pages[lcv]->flags &= ~(PG_BUSY); /* un-busy! */
UVM_PAGE_OWN(pages[lcv], NULL);
} /* for "lcv" loop */
+ pmap_update(ufi.orig_map->pmap);
} /* "gotpages" != 0 */
/* note: object still _locked_ */
} else {
@@ -1299,6 +1301,7 @@ ReFault:
*/
uvmfault_unlockall(&ufi, amap, uobj, oanon);
+ pmap_update(ufi.orig_map->pmap);
return (KERN_SUCCESS);
@@ -1761,6 +1764,7 @@ Case2:
pg->flags &= ~(PG_BUSY|PG_FAKE|PG_WANTED);
UVM_PAGE_OWN(pg, NULL);
uvmfault_unlockall(&ufi, amap, uobj, NULL);
+ pmap_update(ufi.orig_map->pmap);
UVMHIST_LOG(maphist, "<- done (SUCCESS!)",0,0,0,0);
return (KERN_SUCCESS);
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index 4f882377f85..aeb129d7646 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_glue.c,v 1.38 2003/11/20 17:54:55 grange Exp $ */
+/* $OpenBSD: uvm_glue.c,v 1.39 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */
/*
@@ -172,6 +172,7 @@ uvm_chgkprot(addr, len, rw)
panic("chgkprot: invalid page");
pmap_enter(pmap_kernel(), sva, pa, prot, PMAP_WIRED);
}
+ pmap_update(pmap_kernel());
}
#endif
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c
index 9442515f0b2..d343a59e4f9 100644
--- a/sys/uvm/uvm_km.c
+++ b/sys/uvm/uvm_km.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_km.c,v 1.34 2002/10/29 18:30:21 art Exp $ */
+/* $OpenBSD: uvm_km.c,v 1.35 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */
/*
@@ -579,6 +579,8 @@ uvm_km_kmemalloc(map, obj, size, flags)
offset += PAGE_SIZE;
size -= PAGE_SIZE;
}
+ pmap_update(pmap_kernel());
+
UVMHIST_LOG(maphist,"<- done (kva=0x%x)", kva,0,0,0);
return(kva);
}
@@ -707,6 +709,7 @@ uvm_km_alloc1(map, size, zeroit)
offset += PAGE_SIZE;
size -= PAGE_SIZE;
}
+ pmap_update(map->pmap);
/*
* zero on request (note that "size" is now zero due to the above loop
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index b6b0397cb73..505d1eba92c 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.64 2003/11/18 06:08:19 tedu Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.65 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -1509,6 +1509,10 @@ uvm_unmap_remove(map, start, end, entry_list)
first_entry = entry;
entry = next; /* next entry, please */
}
+ /* if ((map->flags & VM_MAP_DYING) == 0) { */
+ pmap_update(vm_map_pmap(map));
+ /* } */
+
uvm_tree_sanity(map, "unmap_remove leave");
@@ -2027,6 +2031,7 @@ uvm_map_extract(srcmap, start, len, dstmap, dstaddrp, flags)
/* end of 'while' loop */
fudge = 0;
}
+ pmap_update(srcmap->pmap);
/*
* unlock dstmap. we will dispose of deadentry in
@@ -2250,6 +2255,7 @@ uvm_map_protect(map, start, end, new_prot, set_max)
current = current->next;
}
+ pmap_update(map->pmap);
out:
vm_map_unlock(map);
@@ -3556,6 +3562,8 @@ uvmspace_fork(vm1)
old_entry->end,
old_entry->protection &
~VM_PROT_WRITE);
+ pmap_update(old_map->pmap);
+
}
old_entry->etype |= UVM_ET_NEEDSCOPY;
}
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 5e2d13ca264..3e949be6409 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.48 2003/06/01 00:26:09 miod Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.49 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -464,6 +464,7 @@ uvm_pageboot_alloc(size)
*/
pmap_kenter_pa(vaddr, paddr, VM_PROT_READ|VM_PROT_WRITE);
}
+ pmap_update(pmap_kernel());
return(addr);
#endif /* PMAP_STEAL_MEMORY */
}
diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c
index dd48691e769..ae3babf1288 100644
--- a/sys/uvm/uvm_pager.c
+++ b/sys/uvm/uvm_pager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pager.c,v 1.34 2003/03/29 01:13:57 mickey Exp $ */
+/* $OpenBSD: uvm_pager.c,v 1.35 2004/02/23 06:19:32 drahn Exp $ */
/* $NetBSD: uvm_pager.c,v 1.36 2000/11/27 18:26:41 chs Exp $ */
/*
@@ -189,6 +189,7 @@ enter:
pmap_enter(vm_map_pmap(pager_map), cva, VM_PAGE_TO_PHYS(pp),
prot, PMAP_WIRED | prot);
}
+ pmap_update(vm_map_pmap(pager_map));
UVMHIST_LOG(maphist, "<- done (KVA=0x%x)", kva,0,0,0);
return(kva);
@@ -239,6 +240,7 @@ remove:
if (entries)
uvm_unmap_detach(entries, 0);
+ pmap_update(pmap_kernel());
UVMHIST_LOG(maphist,"<- done",0,0,0,0);
}