Re: PCI DMA to small buffers on cache-incoherent arch

David Woodhouse (dwmw2@infradead.org)
Tue, 11 Jun 2002 15:04:26 +0100


roland@topspin.com said:
> Replying to myself.... Anyway, I realized that even my idea above is
> wrong. I don't see _any_ safe way to share a cache line between a DMA
> buffer and other data. Access to the cache line might pull the cache
> line back in and write it back at any time, which could corrupt the
> DMA'ed data. I don't see a way to hide the existence of cache lines
> etc. from the driver.

Access to a cache line can't be shared safely. Disable the cache for that
page while its ownership is in doubt and you can happily share the RAM
though. If we find another CPU which fetches cache lines preemptively, we
may have to do that anyway.

--
dwmw2

- 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/