See subject.

ok?

diff --git a/uvm/uvm_amap.c b/uvm/uvm_amap.c
index ef8e505..3cc7ed1 100644
--- a/uvm/uvm_amap.c
+++ b/uvm/uvm_amap.c
@@ -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
diff --git a/uvm/uvm_amap.h b/uvm/uvm_amap.h
index e10e735..adcc1da 100644
--- a/uvm/uvm_amap.h
+++ b/uvm/uvm_amap.h
@@ -88,8 +88,6 @@ void          amap_lookups(struct vm_aref *, vaddr_t, struct 
vm_anon **, int);
 void           amap_ref(struct vm_amap *, vaddr_t, vsize_t, int);
                                        /* get number of references of amap */
 int            amap_refs(struct vm_amap *);
-                                       /* protect pages in a shared amap */
-void           amap_share_protect(vm_map_entry_t, vm_prot_t);
                                        /* split reference to amap into two */
 void           amap_splitref(struct vm_aref *, struct vm_aref *, vaddr_t);
                                        /* remove an anon from an amap */

Reply via email to