lkml.org 
[lkml]   [2019]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [RFC PATCH] dma-mapping: create iommu mapping for newly allocated dma coherent mem
    Date
    Hello,

    > -----Original Message-----
    > From: Christoph Hellwig <hch@lst.de>
    > Sent: Monday, April 22, 2019 9:11 PM
    >
    > On Mon, Apr 22, 2019 at 07:51:25PM +0300, laurentiu.tudor@nxp.com wrote:
    > > From: Laurentiu Tudor <laurentiu.tudor@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
    \
     
     \ /
      Last update: 2019-04-24 00:10    [W:3.185 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site