aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-08-05 00:04:18 +0000
committerAlan Cox <alc@FreeBSD.org>2002-08-05 00:04:18 +0000
commit7ffcf9ec7747951a2a34c3aa8934d8f052f58bee (patch)
treec429a293b2e816cb77539b48becb94167473ff3a /sys
parentc939f1aee7adb710bd37c6b4dc34b22bad44b162 (diff)
downloadsrc-7ffcf9ec7747951a2a34c3aa8934d8f052f58bee.tar.gz
src-7ffcf9ec7747951a2a34c3aa8934d8f052f58bee.zip
o Don't set PG_MAPPED or PG_WRITEABLE when a page is mapped
using pmap_kenter() or pmap_qenter(). o Use VM_ALLOC_WIRED in pmap_new_thread().
Notes
Notes: svn path=/head/; revision=101346
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/pmap.c11
-rw-r--r--sys/powerpc/aim/mmu_oea.c9
-rw-r--r--sys/powerpc/powerpc/mmu_oea.c9
-rw-r--r--sys/powerpc/powerpc/pmap.c9
-rw-r--r--sys/sparc64/sparc64/pmap.c11
5 files changed, 10 insertions, 39 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index 1f7c036ac518..5f7c85e1058d 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -949,13 +949,8 @@ pmap_new_thread(struct thread *td)
/*
* Get a kernel stack page
*/
- m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
-
- /*
- * Wire the page
- */
- m->wire_count++;
- cnt.v_wire_count++;
+ m = vm_page_grab(ksobj, i,
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
/*
* Enter the page into the kernel address space.
@@ -968,7 +963,6 @@ pmap_new_thread(struct thread *td)
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
m->valid = VM_PAGE_BITS_ALL;
}
}
@@ -1073,7 +1067,6 @@ pmap_swapin_thread(td)
vm_page_lock_queues();
vm_page_wire(m);
vm_page_wakeup(m);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
vm_page_unlock_queues();
}
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 789f40ba3601..8e2fa7f2481d 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -1532,12 +1532,8 @@ pmap_new_thread(struct thread *td)
/*
* Get a kernel stack page.
*/
- m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
-
- /*
- * Wire the page.
- */
- m->wire_count++;
+ m = vm_page_grab(ksobj, i,
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
/*
* Enter the page into the kernel address space.
@@ -1546,7 +1542,6 @@ pmap_new_thread(struct thread *td)
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
m->valid = VM_PAGE_BITS_ALL;
}
}
diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c
index 789f40ba3601..8e2fa7f2481d 100644
--- a/sys/powerpc/powerpc/mmu_oea.c
+++ b/sys/powerpc/powerpc/mmu_oea.c
@@ -1532,12 +1532,8 @@ pmap_new_thread(struct thread *td)
/*
* Get a kernel stack page.
*/
- m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
-
- /*
- * Wire the page.
- */
- m->wire_count++;
+ m = vm_page_grab(ksobj, i,
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
/*
* Enter the page into the kernel address space.
@@ -1546,7 +1542,6 @@ pmap_new_thread(struct thread *td)
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
m->valid = VM_PAGE_BITS_ALL;
}
}
diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c
index 789f40ba3601..8e2fa7f2481d 100644
--- a/sys/powerpc/powerpc/pmap.c
+++ b/sys/powerpc/powerpc/pmap.c
@@ -1532,12 +1532,8 @@ pmap_new_thread(struct thread *td)
/*
* Get a kernel stack page.
*/
- m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
-
- /*
- * Wire the page.
- */
- m->wire_count++;
+ m = vm_page_grab(ksobj, i,
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
/*
* Enter the page into the kernel address space.
@@ -1546,7 +1542,6 @@ pmap_new_thread(struct thread *td)
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
m->valid = VM_PAGE_BITS_ALL;
}
}
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c
index 2a31f6b4747f..73391ec6a389 100644
--- a/sys/sparc64/sparc64/pmap.c
+++ b/sys/sparc64/sparc64/pmap.c
@@ -948,18 +948,12 @@ pmap_new_thread(struct thread *td)
/*
* Get a kernel stack page.
*/
- m = vm_page_grab(ksobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+ m = vm_page_grab(ksobj, i,
+ VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
- /*
- * Wire the page.
- */
- m->wire_count++;
- cnt.v_wire_count++;
-
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
m->valid = VM_PAGE_BITS_ALL;
}
@@ -1052,7 +1046,6 @@ pmap_swapin_thread(struct thread *td)
vm_page_lock_queues();
vm_page_wire(m);
vm_page_wakeup(m);
- vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE);
vm_page_unlock_queues();
}
pmap_qenter(ks, ma, KSTACK_PAGES);