Module Name: src
Committed By: pooka
Date: Tue Jun 1 10:29:21 UTC 2010
Modified Files:
src/sys/rump/librump/rumpkern: rump_private.h vm.c
Log Message:
* remove rumpvm_makepage, just use uvm_pagealloc()
* update copyright to reflect reality a little better
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.75 -r1.76 src/sys/rump/librump/rumpkern/vm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.47 src/sys/rump/librump/rumpkern/rump_private.h:1.48
--- src/sys/rump/librump/rumpkern/rump_private.h:1.47 Mon May 31 23:18:33 2010
+++ src/sys/rump/librump/rumpkern/rump_private.h Tue Jun 1 10:29:21 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_private.h,v 1.47 2010/05/31 23:18:33 pooka Exp $ */
+/* $NetBSD: rump_private.h,v 1.48 2010/06/01 10:29:21 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -82,7 +82,6 @@
int rump_component_count(enum rump_component_type);
void rumpvm_init(void);
-struct vm_page *rumpvm_makepage(struct uvm_object *, voff_t);
void rump_gettime(struct timespec *);
void rump_getuptime(struct timespec *);
Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.75 src/sys/rump/librump/rumpkern/vm.c:1.76
--- src/sys/rump/librump/rumpkern/vm.c:1.75 Wed May 26 21:48:20 2010
+++ src/sys/rump/librump/rumpkern/vm.c Tue Jun 1 10:29:21 2010
@@ -1,9 +1,11 @@
-/* $NetBSD: vm.c,v 1.75 2010/05/26 21:48:20 pooka Exp $ */
+/* $NetBSD: vm.c,v 1.76 2010/06/01 10:29:21 pooka Exp $ */
/*
- * Copyright (c) 2007 Antti Kantee. All Rights Reserved.
+ * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
*
- * Development of this software was supported by Google Summer of Code.
+ * Development of this software was supported by
+ * The Finnish Cultural Foundation and the Research Foundation of
+ * The Helsinki University of Technology.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -41,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.75 2010/05/26 21:48:20 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.76 2010/06/01 10:29:21 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -91,7 +93,8 @@
/* called with the object locked */
struct vm_page *
-rumpvm_makepage(struct uvm_object *uobj, voff_t off)
+uvm_pagealloc_strat(struct uvm_object *uobj, voff_t off, struct vm_anon *anon,
+ int flags, int strat, int free_list)
{
struct vm_page *pg;
@@ -99,7 +102,9 @@
pg->offset = off;
pg->uobject = uobj;
- pg->uanon = (void *)kmem_zalloc(PAGE_SIZE, KM_SLEEP);
+ pg->uanon = (void *)kmem_alloc(PAGE_SIZE, KM_SLEEP);
+ if (flags & UVM_PGA_ZERO)
+ memset(pg->uanon, 0, PAGE_SIZE);
pg->flags = PG_CLEAN|PG_BUSY|PG_FAKE;
TAILQ_INSERT_TAIL(&uobj->memq, pg, listq.queue);
@@ -108,14 +113,6 @@
return pg;
}
-struct vm_page *
-uvm_pagealloc_strat(struct uvm_object *uobj, voff_t off, struct vm_anon *anon,
- int flags, int strat, int free_list)
-{
-
- return rumpvm_makepage(uobj, off);
-}
-
/*
* Release a page.
*
@@ -173,7 +170,8 @@
pg->flags |= PG_BUSY;
pgs[i] = pg;
} else {
- pg = rumpvm_makepage(uobj, off + (i << PAGE_SHIFT));
+ pg = uvm_pagealloc(uobj,
+ off + (i << PAGE_SHIFT), NULL, UVM_PGA_ZERO);
pgs[i] = pg;
}
}