question on howto use invalidate_dcache_range

Roland Dreier roland at topspin.com
Fri Mar 14 05:19:07 EST 2003


    Joakim> Yes, but you still need to invalidate the buffer before
    Joakim> also or invalidate it when the buffer is freed which may
    Joakim> be possible if you are using your own buffer mgmt.

    Dan> Why?

Is the following not possible:

  CPU has a dirty cache line inside the buffer
  Driver tells device to start DMA
  Device finishes DMA
  CPU writes back dirty cache line
  Driver gets notification that DMA completed
  Driver invalidates cache for buffer

The invalidate above is too late: the data is already corrupted by the
write back of the dirty cache.

 - Roland

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list