Hello,

> -----Original Message-----
> From: Christoph Hellwig <h...@lst.de>
> Sent: Monday, April 22, 2019 9:11 PM
> 
> On Mon, Apr 22, 2019 at 07:51:25PM +0300, laurentiu.tu...@nxp.com wrote:
> > From: Laurentiu Tudor <laurentiu.tu...@nxp.com>
> >
> > If possible / available call into the DMA API to get a proper iommu
> > mapping and a dma address for the newly allocated coherent dma memory.
> 
> I don't think this is so simple.  The original use case of
> dma_declare_coherent_memory was memory that is local to a device, where
> we copy in data through a MMIO mapping and the device can then access
> it.  This use case still seems to be alive in the ohci-sm501 and
> ohci-tmio drivers.  Going through the iommu in those cases would be
> counter productive.

I had a feeling that I didn't get the whole story and something isn't quite 
right with this patch. 😊 But I'm happy that we have a discussion started on the 
topic and, I must say, I'm very interested in getting to the bottom of it (I 
have some patches enabling SMMU on a couple of NXP chips and depend on 
resolving this).
I'll try to understand what you're planning but in the meantime please let me 
know if you think I can be of any help.

---
Thanks & Best Regards, Laurentiu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to