linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tfiga@chromium.org>
To: Christoph Hellwig <hch@lst.de>
Cc: "open list:IOMMU DRIVERS" <iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will.deacon@arm.com>,
	Vineet Gupta <vgupta@synopsys.com>,
	Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>,
	Mitchel Humpherys <mitchelh@codeaurora.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols
Date: Thu, 6 Jul 2017 10:44:05 +0900	[thread overview]
Message-ID: <CAAFQd5CkVYd6uyoFP_15N8ZaZp8jivJ-4S=CAvrTynRU2ShFYg@mail.gmail.com> (raw)
In-Reply-To: <20170705172019.GB5246@lst.de>

On Thu, Jul 6, 2017 at 2:20 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Thu, Jul 06, 2017 at 12:22:35AM +0900, Tomasz Figa wrote:
>> Generally the user is a work in progress that should be posted in a
>> very near future. You can find a reference to our downstream tree at
>> chromium.org in the cover letter. Obviously I don't mind including
>> patches from this series in the driver series later and that's one of
>> the reasons for this series being RFC.
>
> Please post and explain them here.

That's the intention. I will talk with people to try to get it posted earlier.

You can also refer to the old series, which we are reworking to
address review comments:
https://www.mail-archive.com/linux-media@vger.kernel.org/msg113505.html

The old code essentially reimplements all the DMA mapping operations
on its own, without using the generic helpers (and not even following
the API properly, see my review comments to the original patch 2 and
3), which IMHO is really ugly (but avoids exporting symbols of the
helpers, which I assumed to be a no-problem).

> In general I think moving dma
> ops and iommu implementations into modules is a bad idea

Could you elaborate on this? I'd be interested in seeing the reasoning
behind this.

> but I
> don't want to reject the idea before seeing the code.  Or maybe
> by looking at the user we can come up with an even better idea
> to solve the original issue you're trying to solve, so please also
> explain your rationale.

Basically we have an x86 platform with a camera subsystem that is a
PCI device, has its own MMU and needs cache maintenance. Moreover, the
V4L2 subsystem, which is the right place for camera drivers, heavily
relies on DMA mapping as a way to abstract memory allocation, mapping
and cache maintenance. So it feels natural to me to hide the hardware
details (additional cache maintenance, mapping into the built-in
IOMMU) in the DMA mapping ops for this camera subsystem and simply
make V4L2 just work without knowing those details.

Best regards,
Tomasz

  reply	other threads:[~2017-07-06  1:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05  7:12 [RFC PATCH 0/5] Fixes for loadable modules implementing DMA/IOMMU APIs Tomasz Figa
2017-07-05  7:12 ` [RFC PATCH 1/5] base: dma-mapping: Export commonly used symbols Tomasz Figa
2017-07-05 15:17   ` Christoph Hellwig
2017-07-05 15:22     ` Tomasz Figa
2017-07-05 17:20       ` Christoph Hellwig
2017-07-06  1:44         ` Tomasz Figa [this message]
2017-07-06  8:26           ` Arnd Bergmann
2017-07-06  8:34             ` Tomasz Figa
2017-07-06  8:36               ` Tomasz Figa
2017-07-06 12:23                 ` Arnd Bergmann
2017-07-06 13:31                   ` Tomasz Figa
2017-07-06 13:49                     ` Tomasz Figa
2017-07-06 14:02                       ` Arnd Bergmann
2017-07-06 14:06                         ` Tomasz Figa
2017-07-06 14:27                           ` Arnd Bergmann
2017-07-06 14:35                             ` Tomasz Figa
2017-07-06 13:56                     ` Arnd Bergmann
2017-07-05  7:12 ` [RFC PATCH 2/5] base: dma-mapping: Provide a function to look up remapped pages Tomasz Figa
2017-07-05  7:12 ` [RFC PATCH 3/5] iommu: Export non-static functions to use in modules Tomasz Figa
2017-07-05  7:12 ` [RFC PATCH 4/5] iommu/dma: " Tomasz Figa
2017-07-05 16:22   ` Robin Murphy
2017-07-06  2:25     ` Tomasz Figa
2017-07-06 11:09       ` Robin Murphy
2017-07-06 14:10         ` Christoph Hellwig
2017-07-06 14:17           ` Tomasz Figa
2017-07-06 14:24             ` Tomasz Figa
2017-07-06 14:35               ` Arnd Bergmann
2017-07-06 14:41                 ` Tomasz Figa
2017-07-05  7:12 ` [RFC PATCH 5/5] iommu/dma: Add iommu_dma_cleanup() Tomasz Figa

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='CAAFQd5CkVYd6uyoFP_15N8ZaZp8jivJ-4S=CAvrTynRU2ShFYg@mail.gmail.com' \
    --to=tfiga@chromium.org \
    --cc=arnd@arndb.de \
    --cc=egtvedt@samfundet.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mitchelh@codeaurora.org \
    --cc=robin.murphy@arm.com \
    --cc=vgupta@synopsys.com \
    --cc=will.deacon@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).