Date: Fri, 30 Oct 2015 07:39:10 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Eugene Grosbein <eugen@grosbein.net> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: arge1 on TL WDR3600 Message-ID: <CAJ-Vmokn7G6Mvmt34_VQSP2T0VzUp1ygS9oUXUG7-uWogTtMRA@mail.gmail.com> In-Reply-To: <CAJ-VmonZuxq%2BnDp4j177DCww_6deYxQxSzki-JdntUBHdXwW=w@mail.gmail.com> References: <562CBEC3.8030308@rdtc.ru> <CAJ-Vmok__9mD8OaFnU-sfVfr=xMRMW6-nfDUHScT_LNm6Ry2iA@mail.gmail.com> <562E3027.4020806@grosbein.net> <CAJ-VmonRt6OVOQDGLZBx-4OxbGgzcetuKtBf3eB-6yn3m-EEsQ@mail.gmail.com> <562F75E2.9000505@grosbein.net> <CAJ-VmomocPQ=%2BjKYt8bsLHEWjT1vz=37U_yNB3YMsmxz__5qVw@mail.gmail.com> <CAJ-Vmo=BRP-vyg5=7cyA9v9c_cDjo6Ozv0SLmNj3RZGCKjLYAg@mail.gmail.com> <CAJ-VmokD2vHZ0%2BzO655_csRQw==JUDbaBCDMa%2BU7b1aRv=4BJQ@mail.gmail.com> <5630E844.2080807@grosbein.net> <CAJ-VmonH%2BVfT1zUyAq=fXv6PbwQuiw1_k4CRw1yMgfm6CRaAwA@mail.gmail.com> <CAJ-VmomjWOccaaVyPrGBrf7ACL8KGGOuuFo1QWw02%2BM9smVGFA@mail.gmail.com> <56321ED9.4050602@grosbein.net> <CAJ-Vmom1Tagn6WL-qfNZ7xqPznrLygB6JzMMJdyLU=ROybnEGA@mail.gmail.com> <56323496.609@grosbein.net> <CAJ-Vmond--pm8-rjn55qD8thjneaNiL0eV89Opd1u8p%2BK3BF3w@mail.gmail.com> <56325769.8070202@grosbein.net> <CAJ-Vmo=iD1TdWdPU91TdKL8oW42C_fXUODeigTj55_xJF86AvA@mail.gmail.com> <56328C54.1050709@grosbein.net> <56328DB1.9010105@grosbein.net> <CAJ-VmomZD=Q=vasZQvRc%2B7%2BLzr_iqkyc7i8ukcvi_-tH%2BfWXbA@mail.gmail.com> <CAJ-VmonZuxq%2BnDp4j177DCww_6deYxQxSzki-JdntUBHdXwW=w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
And also try this: adrian@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmokn7G6Mvmt34_VQSP2T0VzUp1ygS9oUXUG7-uWogTtMRA>