[lkml]   [2009]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][RFC] asm-generic:remove calling flush_write_buffers() in dma_sync_*_for_cpu
On Tue, Jul 07, 2009 at 04:06:48PM +0200, Arnd Bergmann wrote:
> Note that actually you need to do writeback+invalidate in DMA_TO_DEVICE

Rubbish. DMA _to_ the device just needs any data held in the cache to
be pushed out into the hardware RAM. There's absolutely no point in
invalidating it - that's a complete waste of time.

> and at least an invalidate in DMA_FROM_DEVICE during dma_map_*.
> For the unmap, I don't think you ever need to invalidate the cache.

As I've already explained, you do if you have speculative prefetching
which can bring in data into the cache from _any_ memory location at
_any_ time. We _are_ going to have to do this, no questions asked.

 \ /
  Last update: 2009-07-07 19:39    [W:0.737 / U:1.168 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site