diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-06 14:47:08 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-06 14:47:08 +0000 |
commit | 97d4ac3e21098320fb28f45556e56ab880fd2aa1 (patch) | |
tree | 44ab2770800bd874ca35851564dce7305389a5e8 /sys/uvm/uvm_amap.c | |
parent | 589b3212ec9e2c4c7afb336b528309e45531ead5 (diff) |
Remove unused amap_share_protect().
ok mpi@ visa@
Diffstat (limited to 'sys/uvm/uvm_amap.c')
-rw-r--r-- | sys/uvm/uvm_amap.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/sys/uvm/uvm_amap.c b/sys/uvm/uvm_amap.c index ef8e5058bf1..4983afa169e 100644 --- a/sys/uvm/uvm_amap.c +++ b/sys/uvm/uvm_amap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_amap.c,v 1.59 2015/08/21 16:04:35 visa Exp $ */ +/* $OpenBSD: uvm_amap.c,v 1.60 2016/03/06 14:47:07 stefan Exp $ */ /* $NetBSD: uvm_amap.c,v 1.27 2000/11/25 06:27:59 chs Exp $ */ /* @@ -403,49 +403,6 @@ amap_extend(struct vm_map_entry *entry, vsize_t addsize) } /* - * amap_share_protect: change protection of anons in a shared amap - * - * for shared amaps, given the current data structure layout, it is - * not possible for us to directly locate all maps referencing the - * shared anon (to change the protection). in order to protect data - * in shared maps we use pmap_page_protect(). [this is useful for IPC - * mechanisms like map entry passing that may want to write-protect - * all mappings of a shared amap.] we traverse am_anon or am_slots - * depending on the current state of the amap. - */ -void -amap_share_protect(struct vm_map_entry *entry, vm_prot_t prot) -{ - struct vm_amap *amap = entry->aref.ar_amap; - int slots, lcv, slot, stop; - - AMAP_B2SLOT(slots, (entry->end - entry->start)); - stop = entry->aref.ar_pageoff + slots; - - if (slots < amap->am_nused) { - /* cheaper to traverse am_anon */ - for (lcv = entry->aref.ar_pageoff ; lcv < stop ; lcv++) { - if (amap->am_anon[lcv] == NULL) - continue; - if (amap->am_anon[lcv]->an_page != NULL) - pmap_page_protect(amap->am_anon[lcv]->an_page, - prot); - } - return; - } - - /* cheaper to traverse am_slots */ - for (lcv = 0 ; lcv < amap->am_nused ; lcv++) { - slot = amap->am_slots[lcv]; - if (slot < entry->aref.ar_pageoff || slot >= stop) - continue; - if (amap->am_anon[slot]->an_page != NULL) - pmap_page_protect(amap->am_anon[slot]->an_page, prot); - } - return; -} - -/* * amap_wipeout: wipeout all anon's in an amap; then free the amap! * * => called from amap_unref when the final reference to an amap is |