All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] iommu/omap: Add support to program multiple iommus
Date: Fri, 1 Sep 2017 18:33:12 +0200	[thread overview]
Message-ID: <20170901163312.GM19533@8bytes.org> (raw)
In-Reply-To: <d8b503a1-eaff-e4cc-215d-92520a91e205-l0cyMroinI0@public.gmane.org>

Hi Suman,
On Fri, Sep 01, 2017 at 11:21:45AM -0500, Suman Anna wrote:
> It's primarily a question of whether each iommu platform device need to
> be represented as a unique iommu_device or not. If you still think that
> both these need to be presented to iommu core as one device, I would
> have to add some glue logic in probe to tie the two devices together.

I think that you should only call iommu_device_register and friends for
the mmu-device you link the other devices against in .add_device.
Otherwise people will see two mmus in sysfs, one of them with no devices
behind it. That is inconsistent with the rest of the patch-set, which
basically handles bots mmus as one. But changing that should be easy, I
think.

Regards,

	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Suman Anna <s-anna@ti.com>
Cc: iommu@lists.linux-foundation.org,
	Tony Lindgren <tony@atomide.com>, Tero Kristo <t-kristo@ti.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iommu/omap: Add support to program multiple iommus
Date: Fri, 1 Sep 2017 18:33:12 +0200	[thread overview]
Message-ID: <20170901163312.GM19533@8bytes.org> (raw)
In-Reply-To: <d8b503a1-eaff-e4cc-215d-92520a91e205@ti.com>

Hi Suman,
On Fri, Sep 01, 2017 at 11:21:45AM -0500, Suman Anna wrote:
> It's primarily a question of whether each iommu platform device need to
> be represented as a unique iommu_device or not. If you still think that
> both these need to be presented to iommu core as one device, I would
> have to add some glue logic in probe to tie the two devices together.

I think that you should only call iommu_device_register and friends for
the mmu-device you link the other devices against in .add_device.
Otherwise people will see two mmus in sysfs, one of them with no devices
behind it. That is inconsistent with the rest of the patch-set, which
basically handles bots mmus as one. But changing that should be easy, I
think.

Regards,

	Joerg

  parent reply	other threads:[~2017-09-01 16:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 13:14 [PATCH 0/2] Dual MMU support for TI DRA7xx DSPs Suman Anna via iommu
2017-08-31 13:14 ` Suman Anna
     [not found] ` <20170831131402.29502-1-s-anna-l0cyMroinI0@public.gmane.org>
2017-08-31 13:14   ` [PATCH 1/2] iommu/omap: Change the attach detection logic Suman Anna via iommu
2017-08-31 13:14     ` Suman Anna
2017-08-31 13:14 ` [PATCH 2/2] iommu/omap: Add support to program multiple iommus Suman Anna
2017-08-31 13:14   ` Suman Anna
2017-09-01 10:01   ` Joerg Roedel
     [not found]     ` <20170901100141.2ooccy7ns2fwxceg-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-09-01 16:21       ` Suman Anna via iommu
2017-09-01 16:21         ` Suman Anna
     [not found]         ` <d8b503a1-eaff-e4cc-215d-92520a91e205-l0cyMroinI0@public.gmane.org>
2017-09-01 16:33           ` Joerg Roedel [this message]
2017-09-01 16:33             ` Joerg Roedel
     [not found]             ` <20170901163312.GM19533-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-09-01 17:05               ` Suman Anna via iommu
2017-09-01 17:05                 ` Suman Anna

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=20170901163312.GM19533@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=s-anna-l0cyMroinI0@public.gmane.org \
    --cc=t-kristo-l0cyMroinI0@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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.