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.4 (requested by ...
details: https://anonhg.NetBSD.org/src/rev/3837589b59b8
branches: netbsd-1-6
changeset: 529659:3837589b59b8
user: he <he%NetBSD.org@localhost>
date: Sat Dec 07 19:24:23 2002 +0000
description:
Pull up revision 1.4 (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/i80312_pci_dma.c | 10 +++++++---
sys/arch/arm/xscale/i80321_pci_dma.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diffs (104 lines):
diff -r a7058e4bd4da -r 3837589b59b8 sys/arch/arm/xscale/i80312_pci_dma.c
--- a/sys/arch/arm/xscale/i80312_pci_dma.c Sat Dec 07 19:23:45 2002 +0000
+++ b/sys/arch/arm/xscale/i80312_pci_dma.c Sat Dec 07 19:24:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i80312_pci_dma.c,v 1.3 2002/05/02 16:50:39 thorpej Exp $ */
+/* $NetBSD: i80312_pci_dma.c,v 1.3.4.1 2002/12/07 19:24:23 he Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -158,7 +158,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 &&
@@ -173,7 +172,6 @@
break;
map->dm_segs[seg].ds_addr = curaddr;
map->dm_segs[seg].ds_len = sgsize;
- map->dm_segs[seg]._ds_vaddr = vaddr;
}
}
@@ -218,6 +216,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;
}
@@ -262,6 +262,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 */
}
@@ -322,6 +324,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;
}
diff -r a7058e4bd4da -r 3837589b59b8 sys/arch/arm/xscale/i80321_pci_dma.c
--- a/sys/arch/arm/xscale/i80321_pci_dma.c Sat Dec 07 19:23:45 2002 +0000
+++ b/sys/arch/arm/xscale/i80321_pci_dma.c Sat Dec 07 19:24:23 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i80321_pci_dma.c,v 1.3 2002/05/02 16:50:40 thorpej Exp $ */
+/* $NetBSD: i80321_pci_dma.c,v 1.3.4.1 2002/12/07 19:24:23 he Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -159,7 +159,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 &&
@@ -174,7 +173,6 @@
break;
map->dm_segs[seg].ds_addr = curaddr;
map->dm_segs[seg].ds_len = sgsize;
- map->dm_segs[seg]._ds_vaddr = vaddr;
}
}
@@ -219,6 +217,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;
}
@@ -263,6 +263,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 */
}
@@ -323,6 +325,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