summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2032-05-29 18:10:39 +0200
committerRichard Braun <rbraun@sceen.net>2016-12-24 00:02:31 +0100
commit1aa4ed6aaf69002b3bb7daed49cea8fa71536b66 (patch)
treefdc4f483f9718c08e8beddf24dd9e1d2a9354692
parent11453089a1402932269b36f0b9f5831bcf888045 (diff)
VM: fix mapping removal on wired pages
Memory wiring is about to be reworked, at which point the VM system will properly track wired mappings. Removing them when changing protection makes sense, and is fine as long as the VM system rewires them when access is restored. * i386/intel/pmap.c (pmap_page_protect): Decrease wiring count instead of causing a panic when removing a wired mapping.
-rw-r--r--i386/intel/pmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index b51aed9a..505b2063 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1648,8 +1648,10 @@ void pmap_page_protect(
/*
* Remove the mapping, collecting any modify bits.
*/
- if (*pte & INTEL_PTE_WIRED)
- panic("pmap_page_protect removing a wired page");
+
+ if (*pte & INTEL_PTE_WIRED) {
+ pmap->stats.wired_count--;
+ }
{
int i = ptes_per_vm_page;