arge1 on TL WDR3600

Adrian Chadd adrian.chadd at gmail.com
Fri Oct 30 14:39:12 UTC 2015


And also try this:

adrian at victoria:~/work/freebsd/head-embedded/src/sys/mips/mips % svn diff .
Index: busdma_machdep.c
===================================================================
--- busdma_machdep.c    (revision 290082)
+++ busdma_machdep.c    (working copy)
@@ -66,6 +66,9 @@
 #define BUS_DMA_COULD_BOUNCE   BUS_DMA_BUS3
 #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4

+/* XXX */
+#define SYNC    __asm volatile("sync")
+
 struct bounce_zone;

 struct bus_dma_tag {
@@ -1220,11 +1223,16 @@
        if (STAILQ_FIRST(&map->bpages))
                _bus_dmamap_sync_bp(dmat, map, op);

-       if (dmat->flags & BUS_DMA_COHERENT)
+       /* XXX ? */
+       if (dmat->flags & BUS_DMA_COHERENT) {
+               SYNC;
                return;
+       }

-       if (map->flags & DMAMAP_UNCACHEABLE)
+       if (map->flags & DMAMAP_UNCACHEABLE) {
+               SYNC;
                return;
+       }

        aligned = (map->flags & DMAMAP_CACHE_ALIGNED) ? 1 : 0;


.. I /think/ we also need to be doing SYNC operations on uncachable memory.

Thanks,



-a


More information about the freebsd-mips mailing list