summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-11-18 04:05:22 +0000
committeralc <alc@FreeBSD.org>2002-11-18 04:05:22 +0000
commit631af658faa609b4e67b4a81128524607b3f9389 (patch)
tree45ffc0bca78ba3f3ac8e847552de11a230133423 /sys/vm/vm_page.c
parentbfe1b13adfdd69b79e46b9f9115ce822cabdd2cd (diff)
downloadFreeBSD-src-631af658faa609b4e67b4a81128524607b3f9389.zip
FreeBSD-src-631af658faa609b4e67b4a81128524607b3f9389.tar.gz
Remove vm_page_protect(). Instead, use pmap_page_protect() directly.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 0e541b8..bcd92bf 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -371,27 +371,6 @@ vm_page_unhold(vm_page_t mem)
}
/*
- * vm_page_protect:
- *
- * Reduce the protection of a page. This routine never raises the
- * protection and therefore can be safely called if the page is already
- * at VM_PROT_NONE (it will be a NOP effectively ).
- */
-void
-vm_page_protect(vm_page_t mem, int prot)
-{
- if (prot == VM_PROT_NONE) {
- if (pmap_page_is_mapped(mem) || (mem->flags & PG_WRITEABLE)) {
- pmap_remove_all(mem);
- vm_page_flag_clear(mem, PG_WRITEABLE);
- }
- } else if ((prot == VM_PROT_READ) && (mem->flags & PG_WRITEABLE)) {
- pmap_page_protect(mem, VM_PROT_READ);
- vm_page_flag_clear(mem, PG_WRITEABLE);
- }
-}
-
-/*
* vm_page_copy:
*
* Copy one page to another
@@ -1822,7 +1801,7 @@ vm_page_cowsetup(vm_page_t m)
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
m->cow++;
- vm_page_protect(m, VM_PROT_READ);
+ pmap_page_protect(m, VM_PROT_READ);
}
#include "opt_ddb.h"
OpenPOWER on IntegriCloud