summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-12 15:45:42 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-14 14:48:13 +0200
commitbccb64c09decae688fc865d7eea2468e6cf599ae (patch)
tree5673a6cfba5bcde77d849e324b7013e206d17b39
parentaa5368c1ecfd59ddcd4967e2fb9cf0420fe430d4 (diff)
fix vm_page initialization
-rw-r--r--vm/vm_page.c3
-rw-r--r--vm/vm_resident.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/vm/vm_page.c b/vm/vm_page.c
index f2a11e1..b95ca15 100644
--- a/vm/vm_page.c
+++ b/vm/vm_page.c
@@ -201,7 +201,6 @@ vm_page_initialize(struct vm_page *page, unsigned short seg_index,
page->phys_addr = pa;
}
-/* XXX legacy mach interface */
void
vm_page_init_mach(struct vm_page *page)
{
@@ -210,11 +209,13 @@ vm_page_init_mach(struct vm_page *page)
sizeof *page - VM_PAGE_HEADER_SIZE);
}
+/* XXX legacy mach interface */
void
vm_page_init(vm_page_t mem,
vm_offset_t phys_addr)
{
vm_page_initialize(mem, mem->seg_index, phys_addr);
+ vm_page_init_mach(mem);
}
void
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index 620fece..c71ce0d 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -474,8 +474,9 @@ vm_page_t vm_page_grab_fictitious(void)
if (m != VM_PAGE_NULL) {
vm_page_fictitious_count--;
vm_page_queue_fictitious = (vm_page_t) m->pageq.next;
- assert(m->fictitious);
- assert(! m->tabled);
+ /* XXX is this re-initialization really needed ? */
+ vm_page_init(m, vm_page_fictitious_addr);
+ m->fictitious = TRUE;
}
simple_unlock(&vm_page_queue_free_lock);
return m;