Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/arch/arm/xscale Pull up revision 1.2 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/b9ff86e45a16
branches:  netbsd-1-6
changeset: 529660:b9ff86e45a16
user:      he <he%NetBSD.org@localhost>
date:      Sat Dec 07 19:24:49 2002 +0000

description:
Pull up revision 1.2 (requested by thorpej in ticket #568):
  Change the way DMA map syncs are done.  Instead of remembering
  the virtual address for each DMA segment, just cache a
  pointer to the original buffer/buftype used to load the
  DMA map, and use that.  Shrinks bus_dma_segment_t from 12
  to 8 bytes, and the cache flushing is also more efficient.

diffstat:

 sys/arch/arm/xscale/i80321_local_dma.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 3837589b59b8 -r b9ff86e45a16 sys/arch/arm/xscale/i80321_local_dma.c
--- a/sys/arch/arm/xscale/i80321_local_dma.c    Sat Dec 07 19:24:23 2002 +0000
+++ b/sys/arch/arm/xscale/i80321_local_dma.c    Sat Dec 07 19:24:49 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321_local_dma.c,v 1.4.4.1 2002/12/07 19:15:03 he Exp $      */
+/*     $NetBSD: i80321_local_dma.c,v 1.4.4.2 2002/12/07 19:24:49 he Exp $      */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -138,7 +138,6 @@
                if (first) {
                        map->dm_segs[seg].ds_addr = curaddr;
                        map->dm_segs[seg].ds_len = sgsize;
-                       map->dm_segs[seg]._ds_vaddr = vaddr;
                        first = 0;
                } else {
                        if (curaddr == lastaddr &&
@@ -153,7 +152,6 @@
                                        break;
                                map->dm_segs[seg].ds_addr = curaddr;
                                map->dm_segs[seg].ds_len = sgsize;
-                               map->dm_segs[seg]._ds_vaddr = vaddr;
                        }
                }
 
@@ -198,6 +196,8 @@
        if (error == 0) {
                map->dm_mapsize = buflen;
                map->dm_nsegs = seg + 1;
+               map->_dm_origbuf = buf;
+               map->_dm_buftype = ARM32_BUFTYPE_LINEAR;
                map->_dm_proc = p;
        }
 
@@ -242,6 +242,8 @@
        if (error == 0) {
                map->dm_mapsize = m0->m_pkthdr.len;
                map->dm_nsegs = seg + 1;
+               map->_dm_origbuf = m0;
+               map->_dm_buftype = ARM32_BUFTYPE_MBUF;
                map->_dm_proc = NULL;   /* always kernel */
        }
 
@@ -302,6 +304,8 @@
        if (error == 0) {
                map->dm_mapsize = uio->uio_resid;
                map->dm_nsegs = seg + 1;
+               map->_dm_origbuf = uio;
+               map->_dm_buftype = ARM32_BUFTYPE_UIO;
                map->_dm_proc = p;
        }
 



Home | Main Index | Thread Index | Old Index