Date: Fri, 30 Oct 2015 17:31:37 -0700 From: Adrian Chadd <adrian@freebsd.org> To: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r290219 - head/sys/mips/mips Message-ID: <CAJ-VmokXjSMTUz%2BvV2RBxTpTfQEXSiXhz_mxkbCgUDGQHvqbqA@mail.gmail.com> In-Reply-To: <201510310029.t9V0TQRM023040@repo.freebsd.org> References: <201510310029.t9V0TQRM023040@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
patch from: ian sorry ian! -a On 30 October 2015 at 17:29, Adrian Chadd <adrian@freebsd.org> wrote: > Author: adrian > Date: Sat Oct 31 00:29:26 2015 > New Revision: 290219 > URL: https://svnweb.freebsd.org/changeset/base/290219 > > Log: > mips: do mips_sync() on sync operations to uncachable memory. > > mips24k/mips74k document that we need an explicit SYNC so to order > things correctly, even with access to uncachable memory. > We were doing calls to SYNC in the cache ops (inv, wbinv) but we > weren't doing it for uncachable memory. > > Modified: > head/sys/mips/mips/busdma_machdep.c > > Modified: head/sys/mips/mips/busdma_machdep.c > ============================================================================== > --- head/sys/mips/mips/busdma_machdep.c Sat Oct 31 00:04:44 2015 (r290218) > +++ head/sys/mips/mips/busdma_machdep.c Sat Oct 31 00:29:26 2015 (r290219) > @@ -1220,11 +1220,12 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus > if (STAILQ_FIRST(&map->bpages)) > _bus_dmamap_sync_bp(dmat, map, op); > > - if (dmat->flags & BUS_DMA_COHERENT) > - return; > - > - if (map->flags & DMAMAP_UNCACHEABLE) > + if ((dmat->flags & BUS_DMA_COHERENT) || > + (map->flags & DMAMAP_UNCACHEABLE)) { > + if (op & BUS_DMASYNC_PREWRITE) > + mips_sync(); > return; > + } > > aligned = (map->flags & DMAMAP_CACHE_ALIGNED) ? 1 : 0; > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokXjSMTUz%2BvV2RBxTpTfQEXSiXhz_mxkbCgUDGQHvqbqA>