On Wed, Jun 29, 2022 at 09:38:00AM +1200, Michael Schmitz wrote:Haven't got any of that, so non-coherent DMA is all we can use (even though some of the RAM used for bounce buffers may actually be coherent due to the page table cache bits).
That's one of the 'liberties' I alluded to. The reason I left these in isThe DMA API does not look at device features at all. It needs to be
that I'm none too certain what device feature the DMA API uses to decide a
device isn't cache-coherent.
told so by the platform code. Once an architecture implements the
hooks to support non-coherent DMA all devices are treated as
non-coherent by default unless overriden by the architecture either
globally (using the global dma_default_coherent variable) or per-device
(using the dev->dma_coherent field, usually set by arch_setup_dma_ops).
If it's dev->coherent_dma_mask, the way I setNo, the coherent mask is slightly misnamed amd not actually related.
up the device in the a3000 driver should leave the coherent mask unchanged.
For the Zorro drivers, devices are set up to use the same storage to store
normal and coherent masks - something we most likely want to change. I need
to think about the ramifications of that.