Source-Changes-HG archive

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

[src/yamt-uio_vmspace]: src/sys/arch/sgimips keep vmspace rather than proc in...



details:   https://anonhg.NetBSD.org/src/rev/3be9979c3a54
branches:  yamt-uio_vmspace
changeset: 586740:3be9979c3a54
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Feb 18 23:21:32 2006 +0000

description:
keep vmspace rather than proc in sgimips_bus_dmamap.

diffstat:

 sys/arch/sgimips/include/bus.h |   4 ++--
 sys/arch/sgimips/sgimips/bus.c |  16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (83 lines):

diff -r d90abc61b86a -r 3be9979c3a54 sys/arch/sgimips/include/bus.h
--- a/sys/arch/sgimips/include/bus.h    Sat Feb 18 23:18:09 2006 +0000
+++ b/sys/arch/sgimips/include/bus.h    Sat Feb 18 23:21:32 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.16.2.1 2006/02/18 15:38:45 yamt Exp $        */
+/*     $NetBSD: bus.h,v 1.16.2.2 2006/02/18 23:21:32 yamt Exp $        */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -609,7 +609,7 @@
        bus_size_t      _dm_maxmaxsegsz; /* fixed largest possible segment */
        bus_size_t      _dm_boundary;   /* don't cross this */
        int             _dm_flags;      /* misc. flags */
-       struct proc     *_dm_proc;      /* proc that owns the mapping */
+       struct vmspace  *_dm_vmspace;   /* vmspace that owns the mapping */
 
        /*
         * PUBLIC MEMBERS: these are used by machine-independent code.
diff -r d90abc61b86a -r 3be9979c3a54 sys/arch/sgimips/sgimips/bus.c
--- a/sys/arch/sgimips/sgimips/bus.c    Sat Feb 18 23:18:09 2006 +0000
+++ b/sys/arch/sgimips/sgimips/bus.c    Sat Feb 18 23:21:32 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.c,v 1.41.2.1 2006/02/18 14:26:06 yamt Exp $        */
+/*     $NetBSD: bus.c,v 1.41.2.2 2006/02/18 23:21:32 yamt Exp $        */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.41.2.1 2006/02/18 14:26:06 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.41.2.2 2006/02/18 23:21:32 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -387,7 +387,7 @@
        map->_dm_maxmaxsegsz = maxsegsz;
        map->_dm_boundary = boundary;
        map->_dm_flags = flags & ~(BUS_DMA_WAITOK|BUS_DMA_NOWAIT);
-       map->_dm_proc = NULL;
+       map->_dm_vmspace = NULL;
        map->dm_maxsegsz = maxsegsz;
        map->dm_mapsize = 0;            /* no valid mappings */
        map->dm_nsegs = 0;
@@ -530,7 +530,7 @@
        if (error == 0) {
                map->dm_mapsize = buflen;
                map->dm_nsegs = seg + 1;
-               map->_dm_proc = p;
+               map->_dm_vmspace = vm;
 
                /*
                 * For linear buffers, we support marking the mapping
@@ -584,7 +584,7 @@
        if (error == 0) {
                map->dm_mapsize = m0->m_pkthdr.len;
                map->dm_nsegs = seg + 1;
-               map->_dm_proc = NULL;   /* always kernel */
+               map->_dm_vmspace = vmspace_kernel();    /* always kernel */
        }
        return error;
 }
@@ -632,7 +632,7 @@
        if (error == 0) {
                map->dm_mapsize = uio->uio_resid;
                map->dm_nsegs = seg + 1;
-               map->_dm_proc = p;
+               map->_dm_vmspace = uio->uio_vmspace;
        }
        return error;
 }
@@ -842,8 +842,8 @@
         *
         * This should be true the vast majority of the time.
         */
-       if (__predict_true(map->_dm_proc == NULL ||
-               map->_dm_proc == curlwp->l_proc))
+       if (__predict_true(VMSPACE_IS_KERNEL_P(map->_dm_vmspace) ||
+               map->_dm_vmspace == curproc->p_vmspace))
                useindex = 0;
        else
                useindex = 1;



Home | Main Index | Thread Index | Old Index