lkml.org 
[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: consistent_sync_for_cpu() and friends on ppc32
From
Date

> See, the direction really doesn't matter for the sync ops.

Well, the direction makes the difference between a flush and an
invalidation ;)

> If you flush the cpu caches at MAP time, and your PCI controller doesn't
> have DMA caching or something like that, then sync for CPU can always be
> a nop. You will have always previously flushed the cpu caches before
> giving the buffer back to the device, either via MAP or sync for device
> calls.
>
> So basically, make MAP and sync for device writeback flush the cpu caches.

No, flush on TO_DEVICE and BIDIRECTIONAL, invalidate on FROM_DEVICE,
it's less expensive to invalidate than flush in that case, since we
don't care about writing to real memory whatever junk the cache
contained for this area.

Ben.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.512 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site