From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "robin.murphy@arm.com" <robin.murphy@arm.com>,
"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>, Leo Li <leoyang.li@nxp.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH] dma-mapping: create iommu mapping for newly allocated dma coherent mem
Date: Tue, 23 Apr 2019 22:09:54 +0000 [thread overview]
Message-ID: <VI1PR04MB513407A66107759EC0DFE175EC230@VI1PR04MB5134.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190422181100.GB32490@lst.de>
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
next prev parent reply other threads:[~2019-04-23 22:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 16:51 [RFC PATCH] dma-mapping: create iommu mapping for newly allocated dma coherent mem laurentiu.tudor
2019-04-22 18:11 ` Christoph Hellwig
2019-04-23 22:09 ` Laurentiu Tudor [this message]
2019-04-24 14:57 ` Christoph Hellwig
2019-04-25 11:30 ` Laurentiu Tudor
2019-04-26 15:13 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR04MB513407A66107759EC0DFE175EC230@VI1PR04MB5134.eurprd04.prod.outlook.com \
--to=laurentiu.tudor@nxp.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).