linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* arm64: default dma_ops is set to coherent_dma_ops results into DMA FAILURE
@ 2014-04-22 12:48 Ritesh Harjani
  2014-04-22 13:20 ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Ritesh Harjani @ 2014-04-22 12:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Catalin/Will,

This is regarding the default dma_ops that we populate for arm64.

PROBLEM:
Currently in arch/arm64/mm/dma-mapping.c we set dma_ops =
&coherent_swiotlb_dma_ops.

The problem with this is, lets say that there is a dma device which
has not populated its dev->archdata.dma_ops, then this dma device will
get the coherent dma_ops in which we dont do any cache maintainance.

So, if the dma driver do kmalloc, make some changes to the buffer and
after dma_map_single gives it to the dma for the transfer, due to no
cache maintenance performed, result will be DMA transfer failed.



Earlier noncoherent ops code was not present at all for arm64, so may
be we were setting default ops to coherent ops. But now that we have
noncoherent ops in place shall we make the default dma_ops to
noncoherent (as what arm also does) ?


Please let me know if I am missing something here.


Thanks
Ritesh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-25  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAPw-ZTmkQv0nhn94yo30P8qpB-i0YagbWizgnOMx9N-5rWVCaQ@mail.gmail.com>
2014-04-25  9:24 ` arm64: default dma_ops is set to coherent_dma_ops results into DMA FAILURE Catalin Marinas
2014-04-22 12:48 Ritesh Harjani
2014-04-22 13:20 ` Will Deacon
2014-04-22 14:04   ` Catalin Marinas
2014-04-22 15:21     ` Will Deacon
2014-04-23  5:29       ` Ritesh Harjani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).