summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/uvm/uvm_map.c')
-rw-r--r--sys/uvm/uvm_map.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index dc511476be3..b804d36bd6c 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.115 2009/06/14 02:53:09 deraadt Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.116 2009/06/16 00:11:29 oga Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -3058,7 +3058,15 @@ uvm_map_clean(struct vm_map *map, vaddr_t start, vaddr_t end, int flags)
}
KASSERT(pg->uanon == anon);
- /* Deactivate the page. */
+#ifdef UBC
+ /* ...and deactivate the page. */
+ pmap_clear_reference(pg);
+#else
+ /* zap all mappings for the page. */
+ pmap_page_protect(pg, VM_PROT_NONE);
+
+ /* ...and deactivate the page. */
+#endif
uvm_pagedeactivate(pg);
uvm_unlock_pageq();
@@ -3812,8 +3820,9 @@ uvm_object_printit(uobj, full, pr)
return;
}
(*pr)(" PAGES <pg,offset>:\n ");
- RB_FOREACH(pg, uobj_pgs, &uobj->memt) {
- cnt++;
+ for (pg = TAILQ_FIRST(&uobj->memq);
+ pg != NULL;
+ pg = TAILQ_NEXT(pg, fq.queues.listq), cnt++) {
(*pr)("<%p,0x%llx> ", pg, (long long)pg->offset);
if ((cnt % 3) == 2) {
(*pr)("\n ");
@@ -3874,7 +3883,8 @@ uvm_page_printit(pg, full, pr)
uobj = pg->uobject;
if (uobj) {
(*pr)(" checking object list\n");
- RB_FOREACH(pg, uobj_pgs, &uobj->memt) {
+ TAILQ_FOREACH(tpg, &uobj->memq,
+ fq.queues.listq) {
if (tpg == pg) {
break;
}