Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips do as others do and mmap() DMA buffers un...



details:   https://anonhg.NetBSD.org/src/rev/bf4961ad05fa
branches:  trunk
changeset: 806343:bf4961ad05fa
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Feb 17 09:58:33 2015 +0000

description:
do as others do and mmap() DMA buffers uncached if we get
BUS_DMA_PREFETCHABLE passed in flags

diffstat:

 sys/arch/mips/mips/bus_dma.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 3457cc4e8da5 -r bf4961ad05fa sys/arch/mips/mips/bus_dma.c
--- a/sys/arch/mips/mips/bus_dma.c      Tue Feb 17 09:47:08 2015 +0000
+++ b/sys/arch/mips/mips/bus_dma.c      Tue Feb 17 09:58:33 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.33 2015/02/16 14:10:00 macallan Exp $    */
+/*     $NetBSD: bus_dma.c,v 1.34 2015/02/17 09:58:33 macallan Exp $    */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.33 2015/02/16 14:10:00 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.34 2015/02/17 09:58:33 macallan Exp $");
 
 #define _MIPS_BUS_DMA_PRIVATE
 
@@ -1168,7 +1168,10 @@
  * Needed for X11 on SGI O2, will likely be needed on things like CI20.
  */
 #if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)
-               return (mips_btop(pa | PGC_NOCACHE));
+               if (flags & BUS_DMA_PREFETCHABLE ) {
+                       return (mips_btop(pa | PGC_NOCACHE));
+               } else
+                       return mips_btop(pa);
 #else
                return mips_btop(pa);
 #endif



Home | Main Index | Thread Index | Old Index