Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha Implement an internal DMA map flag which prev...



details:   https://anonhg.NetBSD.org/src/rev/937e6c45fdd8
branches:  trunk
changeset: 481786:937e6c45fdd8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Feb 06 01:23:30 2000 +0000

description:
Implement an internal DMA map flag which prevents coalescing of
adjacent DMA segments.

diffstat:

 sys/arch/alpha/common/bus_dma.c |  7 ++++---
 sys/arch/alpha/include/bus.h    |  4 +++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 3d27ecaabd59 -r 937e6c45fdd8 sys/arch/alpha/common/bus_dma.c
--- a/sys/arch/alpha/common/bus_dma.c   Sat Feb 05 22:22:41 2000 +0000
+++ b/sys/arch/alpha/common/bus_dma.c   Sun Feb 06 01:23:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.35 2000/01/20 17:16:25 mjacob Exp $ */
+/* $NetBSD: bus_dma.c,v 1.36 2000/02/06 01:23:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.35 2000/01/20 17:16:25 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36 2000/02/06 01:23:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -201,7 +201,8 @@
                        map->dm_segs[seg].ds_len = sgsize;
                        first = 0;
                } else {
-                       if (curaddr == lastaddr &&
+                       if ((map->_dm_flags & DMAMAP_NO_COALESCE) == 0 &&
+                           curaddr == lastaddr &&
                            (map->dm_segs[seg].ds_len + sgsize) <=
                             map->_dm_maxsegsz &&
                            (map->_dm_boundary == 0 ||
diff -r 3d27ecaabd59 -r 937e6c45fdd8 sys/arch/alpha/include/bus.h
--- a/sys/arch/alpha/include/bus.h      Sat Feb 05 22:22:41 2000 +0000
+++ b/sys/arch/alpha/include/bus.h      Sun Feb 06 01:23:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.31 2000/01/25 22:13:17 drochner Exp $ */
+/* $NetBSD: bus.h,v 1.32 2000/02/06 01:23:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -430,6 +430,8 @@
 /*
  * Private flags stored in the DMA map.
  */
+#define        DMAMAP_NO_COALESCE      0x40000000      /* don't coalesce adjacent
+                                                  segments */
 #define        DMAMAP_HAS_SGMAP        0x80000000      /* sgva/len are valid */
 
 /* Forwards needed by prototypes below. */



Home | Main Index | Thread Index | Old Index