All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] Describing arbitrary bus mastering relationships in DT
Date: Fri, 02 May 2014 12:55:45 -0600	[thread overview]
Message-ID: <5363EA31.3000509@wwwdotorg.org> (raw)
In-Reply-To: <6555552.UqkKQIAsih@wuerfel>

On 05/02/2014 09:19 AM, Arnd Bergmann wrote:
> On Friday 02 May 2014 15:23:29 Thierry Reding wrote:
...
>> To some degree this also depends on how we want to handle IOMMUs. If
>> they should remain transparently handled via dma_map_ops, then it makes
>> sense to set this up at device instantiation time. But how can we handle
>> this in situations where one device needs to master on two IOMMUs at the
>> same time? Or if the device needs physically contiguous memory for
>> purposes other than device I/O. Using dma_map_ops we can't control which
>> allocations get mapped via the IOMMU and which don't.
> 
> I still hope we can handle this in common code by selecting the right
> dma_map_ops when the devices are instantiated, at least for 99% of the
> cases. I'm not convinced we really need to handle the 'multiple IOMMUs
> on one device' case in a generic way. If there are no common use cases
> for that, we can probably get away with having multiple device nodes
> and an ugly driver for the exception, instead of making life complicated
> for everybody.

By "multiple device nodes", I assume you mean device tree nodes? I'm not
sure I like the sound of that.

I believe that DT should represent the structure of the HW in terms of
HW modules or blocks. If there's a single cohesive HW module that
happens to talk to multiple MMUs, or indeed has any kind of unusual case
at all, I don't think that should force the DT representation to be
broken up into multiple nodes. We should have a DT node for that HW
module, and it should be up to the device driver to make the internal SW
representation work correctly.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Arnd Bergmann <arnd@arndb.de>, Thierry Reding <thierry.reding@gmail.com>
Cc: Mark Rutland <Mark.Rutland@arm.com>,
	devicetree@vger.kernel.org,
	Shaik Ameer Basha <shaik.ameer@samsung.com>,
	Grant Grundler <grundler@chromium.org>,
	Will Deacon <Will.Deacon@arm.com>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Hiroshi Doyu <hdoyu@nvidia.com>
Subject: Re: [RFC] Describing arbitrary bus mastering relationships in DT
Date: Fri, 02 May 2014 12:55:45 -0600	[thread overview]
Message-ID: <5363EA31.3000509@wwwdotorg.org> (raw)
In-Reply-To: <6555552.UqkKQIAsih@wuerfel>

On 05/02/2014 09:19 AM, Arnd Bergmann wrote:
> On Friday 02 May 2014 15:23:29 Thierry Reding wrote:
...
>> To some degree this also depends on how we want to handle IOMMUs. If
>> they should remain transparently handled via dma_map_ops, then it makes
>> sense to set this up at device instantiation time. But how can we handle
>> this in situations where one device needs to master on two IOMMUs at the
>> same time? Or if the device needs physically contiguous memory for
>> purposes other than device I/O. Using dma_map_ops we can't control which
>> allocations get mapped via the IOMMU and which don't.
> 
> I still hope we can handle this in common code by selecting the right
> dma_map_ops when the devices are instantiated, at least for 99% of the
> cases. I'm not convinced we really need to handle the 'multiple IOMMUs
> on one device' case in a generic way. If there are no common use cases
> for that, we can probably get away with having multiple device nodes
> and an ugly driver for the exception, instead of making life complicated
> for everybody.

By "multiple device nodes", I assume you mean device tree nodes? I'm not
sure I like the sound of that.

I believe that DT should represent the structure of the HW in terms of
HW modules or blocks. If there's a single cohesive HW module that
happens to talk to multiple MMUs, or indeed has any kind of unusual case
at all, I don't think that should force the DT representation to be
broken up into multiple nodes. We should have a DT node for that HW
module, and it should be up to the device driver to make the internal SW
representation work correctly.

  parent reply	other threads:[~2014-05-02 18:55 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01 17:32 [RFC] Describing arbitrary bus mastering relationships in DT Dave Martin
2014-05-01 17:32 ` Dave Martin
2014-05-02 11:05 ` Thierry Reding
2014-05-02 11:05   ` Thierry Reding
2014-05-02 12:32   ` Arnd Bergmann
2014-05-02 12:32     ` Arnd Bergmann
2014-05-02 13:23     ` Thierry Reding
2014-05-02 13:23       ` Thierry Reding
2014-05-02 15:19       ` Arnd Bergmann
2014-05-02 15:19         ` Arnd Bergmann
2014-05-02 17:43         ` Dave Martin
2014-05-02 17:43           ` Dave Martin
2014-05-05 15:14           ` Arnd Bergmann
2014-05-05 15:14             ` Arnd Bergmann
2014-05-09 10:33             ` Dave Martin
2014-05-09 10:33               ` Dave Martin
2014-05-09 11:15               ` Arnd Bergmann
2014-05-09 11:15                 ` Arnd Bergmann
2014-05-09 14:59               ` Grant Grundler
2014-05-09 14:59                 ` Grant Grundler
2014-05-02 18:55         ` Stephen Warren [this message]
2014-05-02 18:55           ` Stephen Warren
2014-05-02 19:02           ` Arnd Bergmann
2014-05-02 19:02             ` Arnd Bergmann
2014-05-09 10:45             ` Dave Martin
2014-05-09 10:45               ` Dave Martin
2014-05-02 18:50       ` Stephen Warren
2014-05-02 18:50         ` Stephen Warren
2014-05-02 19:06         ` Arnd Bergmann
2014-05-02 19:06           ` Arnd Bergmann
2014-05-09 10:56           ` Dave Martin
2014-05-09 10:56             ` Dave Martin
2014-05-12 16:19             ` Stephen Warren
2014-05-12 16:19               ` Stephen Warren
2014-05-12 18:10               ` Arnd Bergmann
2014-05-12 18:10                 ` Arnd Bergmann
2014-05-12 18:29                 ` Stephen Warren
2014-05-12 18:29                   ` Stephen Warren
2014-05-12 19:53                   ` Arnd Bergmann
2014-05-12 19:53                     ` Arnd Bergmann
2014-05-12 20:02                   ` Grant Grundler
2014-05-12 20:02                     ` Grant Grundler
2014-05-02 16:19   ` Dave Martin
2014-05-02 16:19     ` Dave Martin
2014-05-02 16:14 ` Arnd Bergmann
2014-05-02 16:14   ` Arnd Bergmann
2014-05-02 17:31   ` Dave Martin
2014-05-02 17:31     ` Dave Martin
2014-05-02 18:17     ` Jason Gunthorpe
2014-05-02 18:17       ` Jason Gunthorpe
2014-05-09 14:16       ` Dave Martin
2014-05-09 14:16         ` Dave Martin
2014-05-09 17:10         ` Jason Gunthorpe
2014-05-09 17:10           ` Jason Gunthorpe
2014-05-02 20:36     ` Arnd Bergmann
2014-05-02 20:36       ` Arnd Bergmann
2014-05-09 13:26       ` Dave Martin
2014-05-09 13:26         ` Dave Martin

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=5363EA31.3000509@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.