aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1998-06-02 05:50:08 +0000
committerJohn Dyson <dyson@FreeBSD.org>1998-06-02 05:50:08 +0000
commit976f208be3a11d013fd036a498b13d50fc87e0cb (patch)
tree232eebbef163b299b3d57b065ef0b545d678f59d /sys
parente8f367853b5117eebd8235e590051b0079decaa6 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_page.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 7c3b6f324793b..d07ce44ea3fab 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
- * $Id: vm_page.c,v 1.98 1998/04/15 17:47:38 bde Exp $
+ * $Id: vm_page.c,v 1.99 1998/05/02 03:02:13 peter Exp $
*/
/*
@@ -74,6 +74,7 @@
#include <sys/proc.h>
#include <sys/vmmeter.h>
#include <sys/vnode.h>
+#include <sys/kernel.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -275,12 +276,12 @@ vm_page_startup(starta, enda, vaddr)
new_start = start + vm_page_bucket_count * sizeof(struct pglist);
new_start = round_page(new_start);
- mapped = vaddr;
+ mapped = round_page(vaddr);
vaddr = pmap_map(mapped, start, new_start,
VM_PROT_READ | VM_PROT_WRITE);
start = new_start;
+ vaddr = round_page(vaddr);
bzero((caddr_t) mapped, vaddr - mapped);
- mapped = vaddr;
for (i = 0; i < vm_page_bucket_count; i++) {
TAILQ_INIT(bucket);
@@ -288,15 +289,6 @@ vm_page_startup(starta, enda, vaddr)
}
/*
- * Validate these zone addresses.
- */
-
- new_start = start + (vaddr - mapped);
- pmap_map(mapped, start, new_start, VM_PROT_READ | VM_PROT_WRITE);
- bzero((caddr_t) mapped, (vaddr - mapped));
- start = round_page(new_start);
-
- /*
* Compute the number of pages of memory that will be available for
* use (taking into account the overhead of a page structure per
* page).
@@ -313,14 +305,12 @@ vm_page_startup(starta, enda, vaddr)
* Initialize the mem entry structures now, and put them in the free
* queue.
*/
-
vm_page_array = (vm_page_t) vaddr;
mapped = vaddr;
/*
* Validate these addresses.
*/
-
new_start = round_page(start + page_range * sizeof(struct vm_page));
mapped = pmap_map(mapped, start, new_start,
VM_PROT_READ | VM_PROT_WRITE);
@@ -348,7 +338,7 @@ vm_page_startup(starta, enda, vaddr)
m->phys_addr = pa;
m->flags = 0;
m->pc = (pa >> PAGE_SHIFT) & PQ_L2_MASK;
- m->queue = PQ_FREE + m->pc;
+ m->queue = m->pc + PQ_FREE;
TAILQ_INSERT_TAIL(vm_page_queues[m->queue].pl, m, pageq);
++(*vm_page_queues[m->queue].lcnt);
pa += PAGE_SIZE;