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

David Woodhouse
2002-06-11T14:04:43Z

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