From: Christoph Hellwig <hch@lst.de>
To: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Christoph Hellwig <hch@lst.de>,
"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: Fri, 26 Apr 2019 17:13:30 +0200 [thread overview]
Message-ID: <20190426151330.GC20438@lst.de> (raw)
In-Reply-To: <b9f2b425-dde9-f9a1-b8fa-b7710e764b16@nxp.com>
On Thu, Apr 25, 2019 at 11:30:54AM +0000, Laurentiu Tudor wrote:
> > I think the first step is to move the two USB controller that can only
> > DMA to their own BAR off the existing DMA coherent infrastructure. The
> > controllers are already identified using the HCD_LOCAL_MEM flag, so we
> > just need to key off that in the hcd_buffer_* routines and call into a
>
> So if HCD_LOCAL_MEM is set I should call into the gen_pool api instead
> of existing dma_{alloc,free}_coherent().
Yes.
> > genalloc that has been fed using the bar, replacing the current
> > dma_declare_coherent usage. Take a look at drivers/pci/p2pdma.c
> > for another example of allocating bits of a BAR using genalloc.
>
> Where should I place the reference to the gen_pool? How does local_pool
> in 'struct hcd_usb' sound?
Sounds fine to me, but in the end the usb maintainers will have
to decide.
prev parent reply other threads:[~2019-04-26 15:13 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
2019-04-24 14:57 ` Christoph Hellwig
2019-04-25 11:30 ` Laurentiu Tudor
2019-04-26 15:13 ` Christoph Hellwig [this message]
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=20190426151330.GC20438@lst.de \
--to=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=laurentiu.tudor@nxp.com \
--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).