Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern * remove rumpvm_makepage, just use...



details:   https://anonhg.NetBSD.org/src/rev/3a8a6f9445b7
branches:  trunk
changeset: 755321:3a8a6f9445b7
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Jun 01 10:29:21 2010 +0000

description:
* remove rumpvm_makepage, just use uvm_pagealloc()
* update copyright to reflect reality a little better

diffstat:

 sys/rump/librump/rumpkern/rump_private.h |   3 +--
 sys/rump/librump/rumpkern/vm.c           |  28 +++++++++++++---------------
 2 files changed, 14 insertions(+), 17 deletions(-)

diffs (90 lines):

diff -r 5414f3e07041 -r 3a8a6f9445b7 sys/rump/librump/rumpkern/rump_private.h
--- a/sys/rump/librump/rumpkern/rump_private.h  Tue Jun 01 10:24:14 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump_private.h  Tue Jun 01 10:29:21 2010 +0000
@@ -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 *);
diff -r 5414f3e07041 -r 3a8a6f9445b7 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Tue Jun 01 10:24:14 2010 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Tue Jun 01 10:29:21 2010 +0000
@@ -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;
                }
        }



Home | Main Index | Thread Index | Old Index