Source-Changes-HG archive

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

[src/chs-ubc2]: src/sys create a new type "voff_t" for uvm_object offsets



details:   https://anonhg.NetBSD.org/src/rev/21d019aa1352
branches:  chs-ubc2
changeset: 471455:21d019aa1352
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Aug 09 00:05:53 1999 +0000

description:
create a new type "voff_t" for uvm_object offsets
and define it to be "off_t".  also, remove pgo_asyncget().

diffstat:

 sys/kern/vnode_if.c            |    4 +-
 sys/kern/vnode_if.src          |    4 +-
 sys/miscfs/genfs/genfs_vnops.c |    4 +-
 sys/sys/vnode_if.h             |   10 +-
 sys/uvm/uvm_aobj.c             |   29 +++++------
 sys/uvm/uvm_bio.c              |   15 ++---
 sys/uvm/uvm_device.c           |   36 +++-----------
 sys/uvm/uvm_extern.h           |   29 +++++++----
 sys/uvm/uvm_map.c              |    6 +-
 sys/uvm/uvm_map.h              |   33 ++++--------
 sys/uvm/uvm_mmap.c             |   16 +-----
 sys/uvm/uvm_page.c             |    6 +-
 sys/uvm/uvm_page.h             |    4 +-
 sys/uvm/uvm_page_i.h           |    4 +-
 sys/uvm/uvm_pager.c            |   15 +++--
 sys/uvm/uvm_pager.h            |   21 +++----
 sys/uvm/uvm_vnode.c            |  104 +++++++++-------------------------------
 sys/uvm/uvm_vnode.h            |    4 +-
 sys/vm/vm_page.h               |    8 +-
 19 files changed, 129 insertions(+), 223 deletions(-)

diffs (truncated from 979 to 300 lines):

diff -r dc459e354221 -r 21d019aa1352 sys/kern/vnode_if.c
--- a/sys/kern/vnode_if.c       Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/kern/vnode_if.c       Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnode_if.c,v 1.15.4.5 1999/08/02 22:18:54 thorpej Exp $        */
+/*     $NetBSD: vnode_if.c,v 1.15.4.6 1999/08/09 00:05:53 chs Exp $    */
 
 /*
  * Warning: This file is generated automatically.
@@ -7,7 +7,7 @@
  * Created from the file:
  *     NetBSD: vnode_if.src,v 1.16.4.5 1999/08/02 22:18:34 thorpej Exp 
  * by the script:
- *     NetBSD: vnode_if.sh,v 1.19 1999/07/07 23:32:50 wrstuden Exp 
+ *     NetBSD: vnode_if.sh,v 1.18.8.1 1999/08/02 22:19:16 thorpej Exp 
  */
 
 /*
diff -r dc459e354221 -r 21d019aa1352 sys/kern/vnode_if.src
--- a/sys/kern/vnode_if.src     Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/kern/vnode_if.src     Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: vnode_if.src,v 1.16.4.5 1999/08/02 22:18:34 thorpej Exp $
+#      $NetBSD: vnode_if.src,v 1.16.4.6 1999/08/09 00:05:53 chs Exp $
 #
 # Copyright (c) 1992, 1993
 #      The Regents of the University of California.  All rights reserved.
@@ -517,7 +517,7 @@
 #
 vop_getpages {
        IN struct vnode *vp;
-       IN vaddr_t offset;
+       IN voff_t offset;
        IN vm_page_t *m;
        IN int *count;
        IN int centeridx;
diff -r dc459e354221 -r 21d019aa1352 sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c    Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c    Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_vnops.c,v 1.11.4.5 1999/08/02 22:27:34 thorpej Exp $     */
+/*     $NetBSD: genfs_vnops.c,v 1.11.4.6 1999/08/09 00:05:54 chs Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -410,7 +410,7 @@
 {
        struct vop_getpages_args /* {
                struct vnode *a_vp;
-               vaddr_t a_offset;
+               voff_t a_offset;
                vm_page_t *a_m;
                int *a_count;
                int a_centeridx;
diff -r dc459e354221 -r 21d019aa1352 sys/sys/vnode_if.h
--- a/sys/sys/vnode_if.h        Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/sys/vnode_if.h        Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnode_if.h,v 1.15.4.5 1999/08/02 22:18:54 thorpej Exp $        */
+/*     $NetBSD: vnode_if.h,v 1.15.4.6 1999/08/09 00:05:54 chs Exp $    */
 
 /*
  * Warning: This file is generated automatically.
@@ -7,7 +7,7 @@
  * Created from the file:
  *     NetBSD: vnode_if.src,v 1.16.4.5 1999/08/02 22:18:34 thorpej Exp 
  * by the script:
- *     NetBSD: vnode_if.sh,v 1.19 1999/07/07 23:32:50 wrstuden Exp 
+ *     NetBSD: vnode_if.sh,v 1.18.8.1 1999/08/02 22:19:16 thorpej Exp 
  */
 
 /*
@@ -1074,7 +1074,7 @@
 struct vop_getpages_args {
        struct vnodeop_desc *a_desc;
        struct vnode *a_vp;
-       vaddr_t a_offset;
+       voff_t a_offset;
        vm_page_t *a_m;
        int *a_count;
        int a_centeridx;
@@ -1083,11 +1083,11 @@
        int a_flags;
 };
 extern struct vnodeop_desc vop_getpages_desc;
-static __inline int VOP_GETPAGES __P((struct vnode *, vaddr_t, vm_page_t *, 
+static __inline int VOP_GETPAGES __P((struct vnode *, voff_t, vm_page_t *, 
     int *, int, vm_prot_t, int, int)) __attribute__((__unused__));
 static __inline int VOP_GETPAGES(vp, offset, m, count, centeridx, access_type, advice, flags)
        struct vnode *vp;
-       vaddr_t offset;
+       voff_t offset;
        vm_page_t *m;
        int *count;
        int centeridx;
diff -r dc459e354221 -r 21d019aa1352 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/uvm/uvm_aobj.c        Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.18.2.1.2.4 1999/08/02 23:16:14 thorpej Exp $    */
+/*     $NetBSD: uvm_aobj.c,v 1.18.2.1.2.5 1999/08/09 00:05:54 chs Exp $        */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -124,7 +124,7 @@
 
 struct uao_swhash_elt {
        LIST_ENTRY(uao_swhash_elt) list;        /* the hash list */
-       vaddr_t tag;                    /* our 'tag' */
+       voff_t tag;                             /* our 'tag' */
        int count;                              /* our number of active slots */
        int slots[UAO_SWHASH_CLUSTER_SIZE];     /* the slots */
 };
@@ -175,16 +175,14 @@
 
 static struct uao_swhash_elt   *uao_find_swhash_elt __P((struct uvm_aobj *,
                                                          int, boolean_t));
-static int                      uao_find_swslot __P((struct uvm_aobj *, 
-                                                     int));
-static boolean_t                uao_flush __P((struct uvm_object *, 
-                                               vaddr_t, vaddr_t, 
-                                               int));
+static int                      uao_find_swslot __P((struct uvm_aobj *, int));
+static boolean_t                uao_flush __P((struct uvm_object *,
+                                               voff_t, voff_t, int));
 static void                     uao_free __P((struct uvm_aobj *));
-static int                      uao_get __P((struct uvm_object *, vaddr_t,
-                                             vm_page_t *, int *, int, 
+static int                      uao_get __P((struct uvm_object *, voff_t,
+                                             vm_page_t *, int *, int,
                                              vm_prot_t, int, int));
-static boolean_t                uao_releasepg __P((struct vm_page *, 
+static boolean_t                uao_releasepg __P((struct vm_page *,
                                                    struct vm_page **));
 
 /*
@@ -200,7 +198,6 @@
        NULL,                   /* fault */
        uao_flush,              /* flush */
        uao_get,                /* get */
-       NULL,                   /* asyncget */
        NULL,                   /* put (done by pagedaemon) */
        NULL,                   /* cluster */
        NULL,                   /* mk_pcluster */
@@ -240,7 +237,7 @@
 {
        struct uao_swhash *swhash;
        struct uao_swhash_elt *elt;
-       int page_tag;
+       voff_t page_tag;
 
        swhash = UAO_SWHASH_HASH(aobj, pageidx); /* first hash to get bucket */
        page_tag = UAO_SWHASH_ELT_TAG(pageidx); /* tag to search for */
@@ -790,13 +787,13 @@
 boolean_t
 uao_flush(uobj, start, stop, flags)
        struct uvm_object *uobj;
-       vaddr_t start, stop;
+       voff_t start, stop;
        int flags;
 {
        struct uvm_aobj *aobj = (struct uvm_aobj *) uobj;
        struct vm_page *pp, *ppnext;
        boolean_t retval, by_list;
-       vaddr_t curoff;
+       voff_t curoff;
        UVMHIST_FUNC("uao_flush"); UVMHIST_CALLED(maphist);
 
        curoff = 0;     /* XXX: shut up gcc */
@@ -952,14 +949,14 @@
 static int
 uao_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)
        struct uvm_object *uobj;
-       vaddr_t offset;
+       voff_t offset;
        struct vm_page **pps;
        int *npagesp;
        int centeridx, advice, flags;
        vm_prot_t access_type;
 {
        struct uvm_aobj *aobj = (struct uvm_aobj *)uobj;
-       vaddr_t current_offset;
+       voff_t current_offset;
        vm_page_t ptmp;
        int lcv, gotpages, maxpages, swslot, rv;
        boolean_t done;
diff -r dc459e354221 -r 21d019aa1352 sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/uvm/uvm_bio.c Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_bio.c,v 1.1.4.4 1999/07/31 18:56:27 chs Exp $      */
+/*     $NetBSD: uvm_bio.c,v 1.1.4.5 1999/08/09 00:05:55 chs Exp $      */
 
 /* 
  * Copyright (c) 1998 Chuck Silvers.
@@ -61,8 +61,7 @@
                               vm_page_t *, int,
                               int, vm_fault_t, vm_prot_t, int));
 
-static struct ubc_map *ubc_find_mapping __P((struct uvm_object *,
-                                            vaddr_t));
+static struct ubc_map *ubc_find_mapping __P((struct uvm_object *, voff_t));
 
 /*
  * local data structues
@@ -82,12 +81,12 @@
 struct ubc_map
 {
        struct uvm_object *     uobj;           /* mapped object */
-       vaddr_t                 offset;         /* offset into uobj */
+       voff_t                  offset;         /* offset into uobj */
        int                     refcount;       /* refcount on mapping */
        /* XXX refcount will turn into a rwlock when vnodes start
           using their locks in shared mode. */
 
-       vaddr_t                 writeoff;       /* overwrite offset */
+       voff_t                  writeoff;       /* overwrite offset */
        vsize_t                 writelen;       /* overwrite len */
 
        LIST_ENTRY(ubc_map)     hash;           /* hash table */
@@ -406,7 +405,7 @@
 static struct ubc_map *
 ubc_find_mapping(uobj, offset)
        struct uvm_object *uobj;
-       vaddr_t offset;
+       voff_t offset;
 {
        struct ubc_map *umap;
 
@@ -431,7 +430,7 @@
 void *
 ubc_alloc(uobj, offset, lenp, flags)
        struct uvm_object *uobj;
-       vaddr_t offset;
+       voff_t offset;
        vsize_t *lenp;
        int flags;
 {
@@ -577,7 +576,7 @@
 void
 ubc_flush(uobj, start, end)
        struct uvm_object *uobj;
-       vaddr_t start, end;
+       voff_t start, end;
 {
        struct ubc_map *umap;
        vaddr_t va;
diff -r dc459e354221 -r 21d019aa1352 sys/uvm/uvm_device.c
--- a/sys/uvm/uvm_device.c      Fri Aug 06 15:10:25 1999 +0000
+++ b/sys/uvm/uvm_device.c      Mon Aug 09 00:05:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_device.c,v 1.15.4.1 1999/06/21 01:47:19 thorpej Exp $      */
+/*     $NetBSD: uvm_device.c,v 1.15.4.2 1999/08/09 00:05:55 chs Exp $  */
 
 /*
  *
@@ -69,16 +69,13 @@
  */
 
 static void            udv_init __P((void));
-struct uvm_object      *udv_attach __P((void *, vm_prot_t, vaddr_t, vsize_t));
 static void             udv_reference __P((struct uvm_object *));
 static void             udv_detach __P((struct uvm_object *));
 static int             udv_fault __P((struct uvm_faultinfo *, vaddr_t,
                                       vm_page_t *, int, int, vm_fault_t,
                                       vm_prot_t, int));
-static boolean_t        udv_flush __P((struct uvm_object *, vaddr_t, 
-                                        vaddr_t, int));
-static int             udv_asyncget __P((struct uvm_object *, vaddr_t,
-                                           int));
+static boolean_t        udv_flush __P((struct uvm_object *, voff_t, voff_t,
+                                      int));
 static int             udv_put __P((struct uvm_object *, vm_page_t *,
                                        int, boolean_t));
 
@@ -93,7 +90,6 @@
        udv_fault,
        udv_flush,
        NULL,           /* no get function since we have udv_fault */
-       udv_asyncget,
        udv_put,
        NULL,           /* no cluster function */
        NULL,           /* no put cluster function */
@@ -375,7 +371,7 @@
 
 static boolean_t udv_flush(uobj, start, stop, flags)
        struct uvm_object *uobj;
-       vaddr_t start, stop;
+       voff_t start, stop;
        int flags;
 {
 
@@ -410,7 +406,8 @@
        struct vm_map_entry *entry = ufi->entry;
        struct uvm_object *uobj = entry->object.uvm_obj;
        struct uvm_device *udv = (struct uvm_device *)uobj;
-       vaddr_t curr_offset, curr_va;
+       vaddr_t curr_va;
+       int curr_offset;
        paddr_t paddr;



Home | Main Index | Thread Index | Old Index