Thread (37 messages) 37 messages, 10 authors, 2022-06-30

Re: [PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2022-06-30 19:26:22
Also in: linux-alpha, linux-arch, linux-iommu, linux-m68k, linux-scsi, lkml

Hi Christoph,

On 29/06/22 18:25, Christoph Hellwig wrote:
On Wed, Jun 29, 2022 at 09:38:00AM +1200, Michael Schmitz wrote:
quoted
That's one of the 'liberties' I alluded to. The reason I left these in is
that I'm none too certain what device feature the DMA API uses to decide a
device isn't cache-coherent.
The DMA API does not look at device features at all.  It needs to be
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).
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).
quoted
If it's dev->coherent_dma_mask, the way I set
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.
No, the coherent mask is slightly misnamed amd not actually related.
Thanks, that had me confused.

Cheers,

     Michael

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help