Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Inline bus_dma_inrange() and bus_dmamap_s...



details:   https://anonhg.NetBSD.org/src/rev/b582c2df2ac1
branches:  trunk
changeset: 535388:b582c2df2ac1
user:      briggs <briggs%NetBSD.org@localhost>
date:      Sat Aug 17 01:15:15 2002 +0000

description:
Inline bus_dma_inrange() and bus_dmamap_sync_*().

diffstat:

 sys/arch/arm/arm32/bus_dma.c |  46 ++++++++++++++++++++++----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diffs (88 lines):

diff -r da6a76c97468 -r b582c2df2ac1 sys/arch/arm/arm32/bus_dma.c
--- a/sys/arch/arm/arm32/bus_dma.c      Sat Aug 17 01:08:21 2002 +0000
+++ b/sys/arch/arm/arm32/bus_dma.c      Sat Aug 17 01:15:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.18 2002/08/14 22:56:55 thorpej Exp $     */
+/*     $NetBSD: bus_dma.c,v 1.19 2002/08/17 01:15:15 briggs Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -66,6 +66,25 @@
            int, bus_addr_t);
 
 /*
+ * Check to see if the specified page is in an allowed DMA range.
+ */
+__inline struct arm32_dma_range *
+_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges,
+    bus_addr_t curaddr)
+{
+       struct arm32_dma_range *dr;
+       int i;
+
+       for (i = 0, dr = ranges; i < nranges; i++, dr++) {
+               if (curaddr >= dr->dr_sysbase &&
+                   round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len))
+                       return (dr);
+       }
+
+       return (NULL);
+}
+
+/*
  * Common function for DMA map creation.  May be called by bus-specific
  * DMA map creation functions.
  */
@@ -338,7 +357,7 @@
        map->_dm_proc = NULL;
 }
 
-static void
+static __inline void
 _bus_dmamap_sync_linear(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
     bus_size_t len, int ops)
 {
@@ -365,7 +384,7 @@
        }
 }
 
-static void
+static __inline void
 _bus_dmamap_sync_mbuf(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
     bus_size_t len, int ops)
 {
@@ -413,7 +432,7 @@
        }
 }
 
-static void
+static __inline void
 _bus_dmamap_sync_uio(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
     bus_size_t len, int ops)
 {
@@ -916,25 +935,6 @@
 }
 
 /*
- * Check to see if the specified page is in an allowed DMA range.
- */
-struct arm32_dma_range *
-_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges,
-    bus_addr_t curaddr)
-{
-       struct arm32_dma_range *dr;
-       int i;
-
-       for (i = 0, dr = ranges; i < nranges; i++, dr++) {
-               if (curaddr >= dr->dr_sysbase &&
-                   round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len))
-                       return (dr);
-       }
-
-       return (NULL);
-}
-
-/*
  * Allocate physical memory from the given physical address range.
  * Called by DMA-safe memory allocation methods.
  */



Home | Main Index | Thread Index | Old Index