All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [GIT PULL] iommu/arm-smmu: Fixes for 4.9
Date: Thu, 3 Nov 2016 16:00:06 +0000	[thread overview]
Message-ID: <20161103160006.GS22791@arm.com> (raw)
In-Reply-To: <20161103153303.GA837-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>

Hi Joerg,

On Thu, Nov 03, 2016 at 09:33:04AM -0600, Joerg Roedel wrote:
> On Fri, Oct 28, 2016 at 05:01:48PM +0100, Will Deacon wrote:
> >       iommu/arm-smmu: Don't inadvertently reject multiple SMMUv3s
> 
> Hmm, this patch is pretty ugly. Wouldn't it be better to have
> hardware-independent init-routine in the arm-smmu-v3 driver that checks
> DT whether there is an SMMU at all and if yes, sets the per-bus
> iommu-ops?

We're basically doing that already, since the bus_set_iommu call happens in
the probe routine, which won't run unless an SMMUv3 has been found in the
DT. The issue we're trying to avoid is failing the probe of a second SMMUv3
in the system, because the bus will already have the iommu ops set by the
first SMMUv3 that probed.

I suppose we could go and compare bus->iommu_ops with &arm_smmu_ops, but
given that we can't support different IOMMU types on a single bus, I don't
think we gain anything from that.

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] iommu/arm-smmu: Fixes for 4.9
Date: Thu, 3 Nov 2016 16:00:06 +0000	[thread overview]
Message-ID: <20161103160006.GS22791@arm.com> (raw)
In-Reply-To: <20161103153303.GA837@8bytes.org>

Hi Joerg,

On Thu, Nov 03, 2016 at 09:33:04AM -0600, Joerg Roedel wrote:
> On Fri, Oct 28, 2016 at 05:01:48PM +0100, Will Deacon wrote:
> >       iommu/arm-smmu: Don't inadvertently reject multiple SMMUv3s
> 
> Hmm, this patch is pretty ugly. Wouldn't it be better to have
> hardware-independent init-routine in the arm-smmu-v3 driver that checks
> DT whether there is an SMMU at all and if yes, sets the per-bus
> iommu-ops?

We're basically doing that already, since the bus_set_iommu call happens in
the probe routine, which won't run unless an SMMUv3 has been found in the
DT. The issue we're trying to avoid is failing the probe of a second SMMUv3
in the system, because the bus will already have the iommu ops set by the
first SMMUv3 that probed.

I suppose we could go and compare bus->iommu_ops with &arm_smmu_ops, but
given that we can't support different IOMMU types on a single bus, I don't
think we gain anything from that.

Will

  parent reply	other threads:[~2016-11-03 16:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 16:01 [GIT PULL] iommu/arm-smmu: Fixes for 4.9 Will Deacon
2016-10-28 16:01 ` Will Deacon
     [not found] ` <20161028160148.GD1076-5wv7dgnIgG8@public.gmane.org>
2016-11-03 15:33   ` Joerg Roedel
2016-11-03 15:33     ` Joerg Roedel
     [not found]     ` <20161103153303.GA837-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-11-03 16:00       ` Will Deacon [this message]
2016-11-03 16:00         ` Will Deacon
     [not found]         ` <20161103160006.GS22791-5wv7dgnIgG8@public.gmane.org>
2016-11-03 16:14           ` Joerg Roedel
2016-11-03 16:14             ` Joerg Roedel
     [not found]             ` <20161103161407.GR3541-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-11-03 16:22               ` Robin Murphy
2016-11-03 16:22                 ` Robin Murphy
     [not found]                 ` <0dbf2665-4292-d49a-b9e7-688bcdf29c6e-5wv7dgnIgG8@public.gmane.org>
2016-11-03 16:29                   ` Joerg Roedel
2016-11-03 16:29                     ` Joerg Roedel
     [not found]                     ` <20161103162943.GS3541-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-11-03 16:57                       ` Robin Murphy
2016-11-03 16:57                         ` Robin Murphy
     [not found]                         ` <a6ded15c-5eea-70b8-61a1-b40873af8699-5wv7dgnIgG8@public.gmane.org>
2016-11-03 17:29                           ` Joerg Roedel
2016-11-03 17:29                             ` Joerg Roedel

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=20161103160006.GS22791@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@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.