From: "hch@lst.de" <hch@lst.de>
To: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Robin Murphy <robin.murphy@arm.com>, "hch@lst.de" <hch@lst.de>,
"joro@8bytes.org" <joro@8bytes.org>,
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Leo Li <leoyang.li@nxp.com>,
Diana Madalina Craciun <diana.craciun@nxp.com>,
"davem@davemloft.net" <davem@davemloft.net>,
Madalin-cristian Bucur <madalin.bucur@nxp.com>
Subject: Re: [RFC PATCH 1/3] dma-mapping: introduce a new dma api dma_addr_to_phys_addr()
Date: Thu, 24 Oct 2019 04:01:40 +0200 [thread overview]
Message-ID: <20191024020140.GA6057@lst.de> (raw)
In-Reply-To: <50a42575-02b2-c558-0609-90e2ad3f515b@nxp.com>
On Wed, Oct 23, 2019 at 11:53:41AM +0000, Laurentiu Tudor wrote:
> We had an internal discussion over these points you are raising and
> Madalin (cc-ed) came up with another idea: instead of adding this prone
> to misuse api how about experimenting with a new dma unmap and dma sync
> variants that would return the physical address by calling the newly
> introduced dma map op. Something along these lines:
> * phys_addr_t dma_unmap_page_ret_phys(...)
> * phys_addr_t dma_unmap_single_ret_phys(...)
> * phys_addr_t dma_sync_single_for_cpu_ret_phys(...)
> I'm thinking that this proposal should reduce the risks opened by the
> initial variant.
> Please let me know what you think.
I'm not sure what the ret is supposed to mean, but I generally like
that idea better. We also need to make sure there is an easy way
to figure out if these APIs are available, as they generally aren't
for any non-IOMMU API IOMMU drivers.
next prev parent reply other threads:[~2019-10-24 2:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 12:55 [RFC PATCH 0/3] dma-mapping: introduce a new dma api Laurentiu Tudor
2019-10-22 12:55 ` [RFC PATCH 1/3] dma-mapping: introduce a new dma api dma_addr_to_phys_addr() Laurentiu Tudor
2019-10-22 13:25 ` Robin Murphy
2019-10-22 13:53 ` Laurentiu Tudor
2019-10-23 11:53 ` Laurentiu Tudor
2019-10-24 2:01 ` hch [this message]
2019-10-24 7:49 ` Laurentiu Tudor
2019-10-24 11:04 ` Robin Murphy
2019-10-24 11:27 ` Laurentiu Tudor
2019-10-22 12:55 ` [RFC PATCH 2/3] iommu/dma: wire-up new dma op dma_addr_to_phys_addr() Laurentiu Tudor
2019-10-22 12:55 ` [RFC PATCH 3/3] dpaa2_eth: use dma_addr_to_phys_addr() new dma api Laurentiu Tudor
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=20191024020140.GA6057@lst.de \
--to=hch@lst.de \
--cc=davem@davemloft.net \
--cc=diana.craciun@nxp.com \
--cc=ioana.ciornei@nxp.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=laurentiu.tudor@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=ruxandra.radulescu@nxp.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).