Date: Thu, 29 Oct 2009 10:49:54 -0500 From: Jason Harmening <jason.harmening@gmail.com> To: gonzo@bluezbox.com Cc: freebsd-hackers@freebsd.org Subject: Re: MIPS: bus_dma(9) and cache problems Message-ID: <2d1264630910290849k2ca29237ubb25cc3b7313ec26@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
> 1. code modifies data in block and this modification ends up in > cache and is not written back to memory > 2. right after this code calls bus_dmamap_sync for this buffer > and as a result cache invalidation is performed > 3. Cache function operates on cache line size-aligned addresses > and the block in question happens to share the same cache line > with the buffer. So modification made at step (1) is lost. What sync operation are you doing? At least for PREREAD or PREWRITE, I'd expect any dirty cache lines to be flushed to RAM. If this isn't happening, then you may want to submit a bug report. BTW, if you haven't already found it the MIPS sync code for 9-CURRENT is here: http://fxr.watson.org/fxr/source/mips/mips/busdma_machdep.c#L760
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d1264630910290849k2ca29237ubb25cc3b7313ec26>