diff options
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_amap.c | 12 | ||||
-rw-r--r-- | sys/uvm/uvm_amap_i.h | 7 | ||||
-rw-r--r-- | sys/uvm/uvm_anon.c | 6 | ||||
-rw-r--r-- | sys/uvm/uvm_aobj.c | 16 | ||||
-rw-r--r-- | sys/uvm/uvm_fault.c | 22 | ||||
-rw-r--r-- | sys/uvm/uvm_km.c | 9 | ||||
-rw-r--r-- | sys/uvm/uvm_loan.c | 14 | ||||
-rw-r--r-- | sys/uvm/uvm_map.c | 14 | ||||
-rw-r--r-- | sys/uvm/uvm_page.c | 12 | ||||
-rw-r--r-- | sys/uvm/uvm_page_i.h | 8 | ||||
-rw-r--r-- | sys/uvm/uvm_pager.c | 17 | ||||
-rw-r--r-- | sys/uvm/uvm_pdaemon.c | 21 | ||||
-rw-r--r-- | sys/uvm/uvm_vnode.c | 29 |
13 files changed, 74 insertions, 113 deletions
diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c index 94e7bd7999f..f447b1b4819 100644 --- a/sys/uvm/uvm_amap.c +++ b/sys/uvm/uvm_amap.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_amap.c,v 1.8 2001/03/15 11:48:17 art Exp $ */ -/* $NetBSD: uvm_amap.c,v 1.21 1999/07/06 02:15:53 cgd Exp $ */ +/* $OpenBSD: uvm_amap.c,v 1.9 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.22 1999/09/12 01:17:33 chs Exp $ */ /* * @@ -478,9 +478,8 @@ amap_share_protect(entry, prot) if (amap->am_anon[lcv] == NULL) continue; if (amap->am_anon[lcv]->u.an_page != NULL) - pmap_page_protect( - PMAP_PGARG(amap->am_anon[lcv]->u.an_page), - prot); + pmap_page_protect(amap->am_anon[lcv]->u.an_page, + prot); } return; } @@ -491,8 +490,7 @@ amap_share_protect(entry, prot) if (slot < entry->aref.ar_pageoff || slot >= stop) continue; if (amap->am_anon[slot]->u.an_page != NULL) - pmap_page_protect( - PMAP_PGARG(amap->am_anon[slot]->u.an_page), prot); + pmap_page_protect(amap->am_anon[slot]->u.an_page, prot); } return; } diff --git a/sys/uvm/uvm_amap_i.h b/sys/uvm/uvm_amap_i.h index bc8f43e3fb6..8b6d76848ec 100644 --- a/sys/uvm/uvm_amap_i.h +++ b/sys/uvm/uvm_amap_i.h @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_amap_i.h,v 1.8 2001/05/10 14:51:21 art Exp $ */ -/* $NetBSD: uvm_amap_i.h,v 1.13 1999/07/07 05:31:40 thorpej Exp $ */ +/* $OpenBSD: uvm_amap_i.h,v 1.9 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_amap_i.h,v 1.14 1999/09/12 01:17:34 chs Exp $ */ /* * @@ -137,8 +137,7 @@ amap_add(aref, offset, anon, replace) panic("amap_add: replacing null anon"); if (amap->am_anon[slot]->u.an_page != NULL && (amap->am_flags & AMAP_SHARED) != 0) { - pmap_page_protect( - PMAP_PGARG(amap->am_anon[slot]->u.an_page), + pmap_page_protect(amap->am_anon[slot]->u.an_page, VM_PROT_NONE); /* * XXX: suppose page is supposed to be wired somewhere? diff --git a/sys/uvm/uvm_anon.c b/sys/uvm/uvm_anon.c index b393d701ddb..c94fd494ac6 100644 --- a/sys/uvm/uvm_anon.c +++ b/sys/uvm/uvm_anon.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_anon.c,v 1.7 2001/06/23 19:24:33 smart Exp $ */ -/* $NetBSD: uvm_anon.c,v 1.3 1999/08/14 06:25:48 ross Exp $ */ +/* $OpenBSD: uvm_anon.c,v 1.8 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.4 1999/09/12 01:17:34 chs Exp $ */ /* * @@ -212,7 +212,7 @@ uvm_anfree(anon) return; } - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uvm_lock_pageq(); /* lock out pagedaemon */ uvm_pagefree(pg); /* bye bye */ uvm_unlock_pageq(); /* free the daemon */ diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 84e8a3539f5..82b1986f2d3 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_aobj.c,v 1.10 2001/06/23 19:24:33 smart Exp $ */ -/* $NetBSD: uvm_aobj.c,v 1.25 1999/08/21 02:19:05 thorpej Exp $ */ +/* $OpenBSD: uvm_aobj.c,v 1.11 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_aobj.c,v 1.26 1999/09/12 01:17:34 chs Exp $ */ /* * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and @@ -681,7 +681,7 @@ uao_detach(uobj) } /* zap the mappings, free the swap slot, free the page */ - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uao_dropswap(&aobj->u_obj, pg->offset >> PAGE_SHIFT); uvm_lock_pageq(); uvm_pagefree(pg); @@ -859,8 +859,7 @@ uao_flush(uobj, start, stop, flags) continue; /* zap all mappings for the page. */ - pmap_page_protect(PMAP_PGARG(pp), - VM_PROT_NONE); + pmap_page_protect(pp, VM_PROT_NONE); /* ...and deactivate the page. */ uvm_pagedeactivate(pp); @@ -889,8 +888,7 @@ uao_flush(uobj, start, stop, flags) } /* zap all mappings for the page. */ - pmap_page_protect(PMAP_PGARG(pp), - VM_PROT_NONE); + pmap_page_protect(pp, VM_PROT_NONE); uao_dropswap(uobj, pp->offset >> PAGE_SHIFT); uvm_pagefree(pp); @@ -1193,7 +1191,7 @@ uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) */ ptmp->flags &= ~PG_FAKE; /* data is valid ... */ - pmap_clear_modify(PMAP_PGARG(ptmp)); /* ... and clean */ + pmap_clear_modify(ptmp); /* ... and clean */ pps[lcv] = ptmp; } /* lcv loop */ @@ -1237,7 +1235,7 @@ static boolean_t uao_releasepg(pg, nextpgp) /* * dispose of the page [caller handles PG_WANTED] and swap slot. */ - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uao_dropswap(&aobj->u_obj, pg->offset >> PAGE_SHIFT); uvm_lock_pageq(); if (nextpgp) diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index 2db0ebe05e1..0d82a99b2ae 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_fault.c,v 1.14 2001/06/23 19:24:33 smart Exp $ */ -/* $NetBSD: uvm_fault.c,v 1.44 1999/07/22 22:58:38 thorpej Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.15 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.45 1999/09/12 01:17:35 chs Exp $ */ /* * @@ -208,7 +208,7 @@ uvmfault_anonflush(anons, n) if (pg && (pg->flags & PG_BUSY) == 0 && pg->loan_count == 0) { uvm_lock_pageq(); if (pg->wire_count == 0) { - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uvm_pagedeactivate(pg); } uvm_unlock_pageq(); @@ -448,8 +448,7 @@ int uvmfault_anonget(ufi, amap, anon) * anon and try again. */ if (pg->flags & PG_RELEASED) { - pmap_page_protect(PMAP_PGARG(pg), - VM_PROT_NONE); /* to be safe */ + pmap_page_protect(pg, VM_PROT_NONE); simple_unlock(&anon->an_lock); uvm_anfree(anon); /* frees page for us */ if (locked) @@ -489,7 +488,7 @@ int uvmfault_anonget(ufi, amap, anon) * must be OK, clear modify (already PG_CLEAN) * and activate */ - pmap_clear_modify(PMAP_PGARG(pg)); + pmap_clear_modify(pg); uvm_lock_pageq(); uvm_pageactivate(pg); uvm_unlock_pageq(); @@ -858,7 +857,6 @@ ReFault: /* * note that if we are really short of RAM we could sleep in the above * call to pmap_enter with everything locked. bad? - * XXXCDC: this is fixed in PMAP_NEW (no sleep alloc's in pmap) */ /* @@ -1112,8 +1110,8 @@ ReFault: uvm_pagecopy(anon->u.an_page, pg); /* force reload */ - pmap_page_protect(PMAP_PGARG(anon->u.an_page), - VM_PROT_NONE); + pmap_page_protect(anon->u.an_page, + VM_PROT_NONE); uvm_lock_pageq(); /* KILL loan */ if (uobj) /* if we were loaning */ @@ -1501,8 +1499,7 @@ Case2: */ uvm_pagecopy(uobjpage, pg); /* old -> new */ pg->flags &= ~(PG_FAKE|PG_CLEAN); - pmap_page_protect(PMAP_PGARG(uobjpage), - VM_PROT_NONE); + pmap_page_protect(uobjpage, VM_PROT_NONE); if (uobjpage->flags & PG_WANTED) wakeup(uobjpage); /* uobj still locked */ @@ -1609,8 +1606,7 @@ Case2: * procs see it */ if ((amap_flags(amap) & AMAP_SHARED) != 0) { - pmap_page_protect(PMAP_PGARG(uobjpage), - VM_PROT_NONE); + pmap_page_protect(uobjpage, VM_PROT_NONE); } /* diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index 8841554be91..394732d081d 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_km.c,v 1.10 2001/06/23 19:24:33 smart Exp $ */ -/* $NetBSD: uvm_km.c,v 1.31 1999/07/22 22:58:38 thorpej Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.11 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_km.c,v 1.32 1999/09/12 01:17:36 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -601,13 +601,8 @@ uvm_km_kmemalloc(map, obj, size, flags) * it will need to lock it itself!) */ if (UVM_OBJ_IS_INTRSAFE_OBJECT(obj)) { -#if defined(PMAP_NEW) pmap_kenter_pa(loopva, VM_PAGE_TO_PHYS(pg), VM_PROT_ALL); -#else - pmap_enter(map->pmap, loopva, VM_PAGE_TO_PHYS(pg), - UVM_PROT_ALL, TRUE, VM_PROT_READ|VM_PROT_WRITE); -#endif } else { pmap_enter(map->pmap, loopva, VM_PAGE_TO_PHYS(pg), UVM_PROT_ALL, TRUE, VM_PROT_READ|VM_PROT_WRITE); diff --git a/sys/uvm/uvm_loan.c b/sys/uvm/uvm_loan.c index 6ec2a96d307..64fff56afad 100644 --- a/sys/uvm/uvm_loan.c +++ b/sys/uvm/uvm_loan.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_loan.c,v 1.6 2001/03/08 15:21:37 smart Exp $ */ -/* $NetBSD: uvm_loan.c,v 1.18 1999/07/22 22:58:38 thorpej Exp $ */ +/* $OpenBSD: uvm_loan.c,v 1.7 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_loan.c,v 1.19 1999/09/12 01:17:36 chs Exp $ */ /* * @@ -336,7 +336,7 @@ uvm_loananon(ufi, output, flags, anon) pg = anon->u.an_page; if (pg && (pg->pqflags & PQ_ANON) != 0 && anon->an_ref == 1) /* read protect it */ - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_READ); + pmap_page_protect(pg, VM_PROT_READ); anon->an_ref++; **output = anon; *output = (*output) + 1; @@ -381,7 +381,7 @@ uvm_loananon(ufi, output, flags, anon) pg = anon->u.an_page; uvm_lock_pageq(); if (pg->loan_count == 0) - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_READ); + pmap_page_protect(pg, VM_PROT_READ); pg->loan_count++; uvm_pagewire(pg); /* always wire it */ uvm_unlock_pageq(); @@ -533,7 +533,7 @@ uvm_loanuobj(ufi, output, flags, va) if ((flags & UVM_LOAN_TOANON) == 0) { /* loan to wired-kernel page? */ uvm_lock_pageq(); if (pg->loan_count == 0) - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_READ); + pmap_page_protect(pg, VM_PROT_READ); pg->loan_count++; uvm_pagewire(pg); uvm_unlock_pageq(); @@ -587,7 +587,7 @@ uvm_loanuobj(ufi, output, flags, va) pg->uanon = anon; uvm_lock_pageq(); if (pg->loan_count == 0) - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_READ); + pmap_page_protect(pg, VM_PROT_READ); pg->loan_count++; uvm_pageactivate(pg); uvm_unlock_pageq(); @@ -751,7 +751,7 @@ uvm_unloanpage(ploans, npages) panic("uvm_unloanpage: page %p unowned but PG_BUSY!", pg); /* be safe */ - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uvm_pagefree(pg); /* pageq locked above */ } diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 13f15ea07dc..5fb1a9ddeb1 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.19 2001/07/17 10:55:02 mts Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.20 2001/07/18 10:47:05 art Exp $ */ /* $NetBSD: uvm_map.c,v 1.68 1999/08/21 02:19:05 thorpej Exp $ */ /* @@ -1021,12 +1021,7 @@ uvm_unmap_remove(map, start, end, entry_list) * to vm_map_min(kernel_map). */ if (UVM_OBJ_IS_INTRSAFE_OBJECT(entry->object.uvm_obj)) { -#if defined(PMAP_NEW) pmap_kremove(entry->start, len); -#else - pmap_remove(pmap_kernel(), entry->start, - entry->start + len); -#endif uvm_km_pgremove_intrsafe(entry->object.uvm_obj, entry->start - vm_map_min(kernel_map), entry->end - vm_map_min(kernel_map)); @@ -2571,8 +2566,7 @@ uvm_map_clean(map, start, end, flags) #endif /* zap all mappings for the page. */ - pmap_page_protect(PMAP_PGARG(pg), - VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); /* ...and deactivate the page. */ uvm_pagedeactivate(pg); @@ -2730,11 +2724,7 @@ uvmspace_init(vm, pmap, min, max, pageable) if (pmap) pmap_reference(pmap); else -#if defined(PMAP_NEW) pmap = pmap_create(); -#else - pmap = pmap_create(0); -#endif vm->vm_map.pmap = pmap; vm->vm_refcnt = 1; diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c index 14fadaac3b9..db387595171 100644 --- a/sys/uvm/uvm_page.c +++ b/sys/uvm/uvm_page.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_page.c,v 1.16 2001/04/10 06:59:12 niklas Exp $ */ -/* $NetBSD: uvm_page.c,v 1.24 1999/07/22 22:58:38 thorpej Exp $ */ +/* $OpenBSD: uvm_page.c,v 1.17 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_page.c,v 1.25 1999/09/12 01:17:38 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -438,19 +438,11 @@ uvm_pageboot_alloc(size) if (!uvm_page_physget(&paddr)) panic("uvm_pageboot_alloc: out of memory"); - /* XXX: should be wired, but some pmaps don't like that ... */ -#if defined(PMAP_NEW) /* * Note this memory is no longer managed, so using * pmap_kenter is safe. */ pmap_kenter_pa(vaddr, paddr, VM_PROT_READ|VM_PROT_WRITE); -#else - pmap_enter(pmap_kernel(), vaddr, paddr, - VM_PROT_READ|VM_PROT_WRITE, FALSE, - VM_PROT_READ|VM_PROT_WRITE); -#endif - } return(addr); #endif /* PMAP_STEAL_MEMORY */ diff --git a/sys/uvm/uvm_page_i.h b/sys/uvm/uvm_page_i.h index 6e5b493df8c..d191471984f 100644 --- a/sys/uvm/uvm_page_i.h +++ b/sys/uvm/uvm_page_i.h @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_page_i.h,v 1.5 2001/01/29 02:07:47 niklas Exp $ */ -/* $NetBSD: uvm_page_i.h,v 1.10 1999/05/24 19:10:57 thorpej Exp $ */ +/* $OpenBSD: uvm_page_i.h,v 1.6 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_page_i.h,v 1.11 1999/09/12 01:17:38 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -226,8 +226,8 @@ uvm_pagedeactivate(pg) TAILQ_INSERT_TAIL(&uvm.page_inactive_obj, pg, pageq); pg->pqflags |= PQ_INACTIVE; uvmexp.inactive++; - pmap_clear_reference(PMAP_PGARG(pg)); - if (pmap_is_modified(PMAP_PGARG(pg))) + pmap_clear_reference(pg); + if (pmap_is_modified(pg)) pg->flags &= ~PG_CLEAN; } } diff --git a/sys/uvm/uvm_pager.c b/sys/uvm/uvm_pager.c index b88cb44ea8a..66f7c7f3309 100644 --- a/sys/uvm/uvm_pager.c +++ b/sys/uvm/uvm_pager.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_pager.c,v 1.9 2001/06/08 08:09:40 art Exp $ */ -/* $NetBSD: uvm_pager.c,v 1.21 1999/07/08 01:02:44 thorpej Exp $ */ +/* $OpenBSD: uvm_pager.c,v 1.10 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_pager.c,v 1.23 1999/09/12 01:17:41 chs Exp $ */ /* * @@ -327,7 +327,7 @@ uvm_mk_pcluster(uobj, pps, npages, center, flags, mlo, mhi) if ((pclust->flags & PG_CLEANCHK) == 0) { if ((pclust->flags & (PG_CLEAN|PG_BUSY)) == PG_CLEAN && - pmap_is_modified(PMAP_PGARG(pclust))) + pmap_is_modified(pclust)) pclust->flags &= ~PG_CLEAN; /* now checked */ pclust->flags |= PG_CLEANCHK; @@ -341,7 +341,7 @@ uvm_mk_pcluster(uobj, pps, npages, center, flags, mlo, mhi) pclust->flags |= PG_BUSY; /* busy! */ UVM_PAGE_OWN(pclust, "uvm_mk_pcluster"); /* XXX: protect wired page? see above comment. */ - pmap_page_protect(PMAP_PGARG(pclust), VM_PROT_READ); + pmap_page_protect(pclust, VM_PROT_READ); if (!forward) { ppsp--; /* back up one page */ *ppsp = pclust; @@ -391,7 +391,7 @@ uvm_shareprot(entry, prot) for (pp = uobj->memq.tqh_first ; pp != NULL ; pp = pp->listq.tqe_next) { if (pp->offset >= start && pp->offset < stop) - pmap_page_protect(PMAP_PGARG(pp), prot); + pmap_page_protect(pp, prot); } UVMHIST_LOG(maphist, "<- done",0,0,0,0); } @@ -656,8 +656,7 @@ uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags, swblk) ppsp[lcv]->flags &= ~(PG_BUSY); UVM_PAGE_OWN(ppsp[lcv], NULL); - pmap_page_protect(PMAP_PGARG(ppsp[lcv]), - VM_PROT_NONE); /* be safe */ + pmap_page_protect(ppsp[lcv], VM_PROT_NONE); simple_unlock(&ppsp[lcv]->uanon->an_lock); /* kills anon and frees pg */ uvm_anfree(ppsp[lcv]->uanon); @@ -707,8 +706,8 @@ uvm_pager_dropcluster(uobj, pg, ppsp, npages, flags, swblk) * had a successful pageout update the page! */ if (flags & PGO_PDFREECLUST) { - pmap_clear_reference(PMAP_PGARG(ppsp[lcv])); - pmap_clear_modify(PMAP_PGARG(ppsp[lcv])); + pmap_clear_reference(ppsp[lcv]); + pmap_clear_modify(ppsp[lcv]); ppsp[lcv]->flags |= PG_CLEAN; } diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 9f492be2a87..7cfa18d5d76 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.9 2001/03/22 03:05:56 smart Exp $ */ -/* $NetBSD: uvm_pdaemon.c,v 1.17 1999/07/22 22:58:39 thorpej Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.10 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.18 1999/09/12 01:17:41 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -402,7 +402,7 @@ uvmpd_scan_inactive(pglst) * inactive pages shouldn't have any valid mappings * and we cleared reference before deactivating). */ - if (pmap_is_referenced(PMAP_PGARG(p))) { + if (pmap_is_referenced(p)) { uvm_pageactivate(p); uvmexp.pdreact++; continue; @@ -498,7 +498,7 @@ uvmpd_scan_inactive(pglst) } /* zap all mappings with pmap_page_protect... */ - pmap_page_protect(PMAP_PGARG(p), VM_PROT_NONE); + pmap_page_protect(p, VM_PROT_NONE); uvm_pagefree(p); uvmexp.pdfreed++; @@ -595,7 +595,7 @@ uvmpd_scan_inactive(pglst) swap_backed = ((p->pqflags & PQ_SWAPBACKED) != 0); p->flags |= PG_BUSY; /* now we own it */ UVM_PAGE_OWN(p, "scan_inactive"); - pmap_page_protect(PMAP_PGARG(p), VM_PROT_READ); + pmap_page_protect(p, VM_PROT_READ); uvmexp.pgswapout++; /* @@ -833,8 +833,7 @@ uvmpd_scan_inactive(pglst) simple_unlock(&anon->an_lock); uvm_anfree(anon); /* kills anon */ - pmap_page_protect(PMAP_PGARG(p), - VM_PROT_NONE); + pmap_page_protect(p, VM_PROT_NONE); anon = NULL; uvm_lock_pageq(); nextpg = p->pageq.tqe_next; @@ -877,15 +876,15 @@ uvmpd_scan_inactive(pglst) /* pageout was a failure... */ if (result != VM_PAGER_AGAIN) uvm_pageactivate(p); - pmap_clear_reference(PMAP_PGARG(p)); + pmap_clear_reference(p); /* XXXCDC: if (swap_backed) FREE p's * swap block? */ } else { /* pageout was a success... */ - pmap_clear_reference(PMAP_PGARG(p)); - pmap_clear_modify(PMAP_PGARG(p)); + pmap_clear_reference(p); + pmap_clear_modify(p); p->flags |= PG_CLEAN; /* XXX: could free page here, but old * pagedaemon does not */ @@ -1092,7 +1091,7 @@ uvmpd_scan() * inactive pages. */ if (inactive_shortage > 0) { - pmap_page_protect(PMAP_PGARG(p), VM_PROT_NONE); + pmap_page_protect(p, VM_PROT_NONE); /* no need to check wire_count as pg is "active" */ uvm_pagedeactivate(p); uvmexp.pddeact++; diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c index 12327f97836..9d035720307 100644 --- a/sys/uvm/uvm_vnode.c +++ b/sys/uvm/uvm_vnode.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_vnode.c,v 1.13 2001/06/23 19:24:34 smart Exp $ */ -/* $NetBSD: uvm_vnode.c,v 1.25 1999/07/22 22:58:39 thorpej Exp $ */ +/* $OpenBSD: uvm_vnode.c,v 1.14 2001/07/18 10:47:05 art Exp $ */ +/* $NetBSD: uvm_vnode.c,v 1.26 1999/09/12 01:17:42 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -698,7 +698,7 @@ uvn_releasepg(pg, nextpgp) /* * dispose of the page [caller handles PG_WANTED] */ - pmap_page_protect(PMAP_PGARG(pg), VM_PROT_NONE); + pmap_page_protect(pg, VM_PROT_NONE); uvm_lock_pageq(); if (nextpgp) *nextpgp = pg->pageq.tqe_next; /* next page for daemon */ @@ -973,9 +973,9 @@ uvn_flush(uobj, start, stop, flags) if ((pp->flags & PG_CLEAN) != 0 && (flags & PGO_FREE) != 0 && (pp->pqflags & PQ_ACTIVE) != 0) - pmap_page_protect(PMAP_PGARG(pp), VM_PROT_NONE); + pmap_page_protect(pp, VM_PROT_NONE); if ((pp->flags & PG_CLEAN) != 0 && - pmap_is_modified(PMAP_PGARG(pp))) + pmap_is_modified(pp)) pp->flags &= ~(PG_CLEAN); pp->flags |= PG_CLEANCHK; /* update "hint" */ @@ -998,8 +998,7 @@ uvn_flush(uobj, start, stop, flags) if (flags & PGO_DEACTIVATE) { if ((pp->pqflags & PQ_INACTIVE) == 0 && pp->wire_count == 0) { - pmap_page_protect(PMAP_PGARG(pp), - VM_PROT_NONE); + pmap_page_protect(pp, VM_PROT_NONE); uvm_pagedeactivate(pp); } @@ -1008,8 +1007,7 @@ uvn_flush(uobj, start, stop, flags) /* release busy pages */ pp->flags |= PG_RELEASED; } else { - pmap_page_protect(PMAP_PGARG(pp), - VM_PROT_NONE); + pmap_page_protect(pp, VM_PROT_NONE); /* removed page from object */ uvm_pagefree(pp); } @@ -1029,7 +1027,7 @@ uvn_flush(uobj, start, stop, flags) pp->flags |= PG_BUSY; /* we 'own' page now */ UVM_PAGE_OWN(pp, "uvn_flush"); - pmap_page_protect(PMAP_PGARG(pp), VM_PROT_READ); + pmap_page_protect(pp, VM_PROT_READ); pp_version = pp->version; ReTry: ppsp = pps; @@ -1178,8 +1176,7 @@ ReTry: } else { ptmp->flags |= (PG_CLEAN|PG_CLEANCHK); if ((flags & PGO_FREE) == 0) - pmap_clear_modify( - PMAP_PGARG(ptmp)); + pmap_clear_modify(ptmp); } } @@ -1190,8 +1187,7 @@ ReTry: if (flags & PGO_DEACTIVATE) { if ((pp->pqflags & PQ_INACTIVE) == 0 && pp->wire_count == 0) { - pmap_page_protect(PMAP_PGARG(ptmp), - VM_PROT_NONE); + pmap_page_protect(ptmp, VM_PROT_NONE); uvm_pagedeactivate(ptmp); } @@ -1211,8 +1207,7 @@ ReTry: "lost!\n"); retval = FALSE; } - pmap_page_protect(PMAP_PGARG(ptmp), - VM_PROT_NONE); + pmap_page_protect(ptmp, VM_PROT_NONE); uvm_pagefree(ptmp); } } @@ -1544,7 +1539,7 @@ uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags) */ ptmp->flags &= ~PG_FAKE; /* data is valid ... */ - pmap_clear_modify(PMAP_PGARG(ptmp)); /* ... and clean */ + pmap_clear_modify(ptmp); /* ... and clean */ pps[lcv] = ptmp; } /* lcv loop */ |