All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	robin.murphy@arm.com, robh+dt@kernel.org, pawel.moll@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	arnd@arndb.de, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arm@kernel.org,
	brijeshkumar.singh@amd.com, thomas.lendacky@amd.com,
	leo.duran@amd.com
Subject: Re: [PATCH 11/13] dtb: amd: Add PCIe SMMU device tree node
Date: Thu, 28 Jan 2016 11:18:19 +0000	[thread overview]
Message-ID: <20160128111818.GH17123@leverpostej> (raw)
In-Reply-To: <20160128111738.GF30928@arm.com>

On Thu, Jan 28, 2016 at 11:17:39AM +0000, Will Deacon wrote:
> On Thu, Jan 28, 2016 at 11:14:53AM +0000, Mark Rutland wrote:
> > On Wed, Jan 27, 2016 at 03:11:59PM -0600, Suravee Suthikulpanit wrote:
> > > From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > > 
> > > Add PCIe SMMU device tree node for AMD Seattle SOC.
> > > 
> > > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > > ---
> > >  arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 23 +++++++++++++++++++++++
> > >  1 file changed, 23 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > index a7fc059..bfccfea 100644
> > > --- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > +++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > @@ -210,6 +210,7 @@
> > >  			device_type = "pci";
> > >  			bus-range = <0 0x7f>;
> > >  			msi-parent = <&v2m0>;
> > > +			#stream-id-cells = <16>;
> > >  			reg = <0 0xf0000000 0 0x10000000>;
> > >  
> > >  			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> > > @@ -230,6 +231,28 @@
> > >  				<0x03000000 0x01 0x00000000 0x01 0x00000000 0x7f 0x00000000>;
> > >  		};
> > >  
> > > +		pcie0_smmu: smmu@e0a00000 {
> > > +			 compatible = "arm,mmu-401";
> > > +			 reg = <0 0xe0a00000 0 0x10000>;
> > > +			 #global-interrupts = <1>;
> > > +			 interrupts = /* Uses combined intr for both
> > > +				       * global and context
> > > +				       */
> > > +				      <0 333 4>,
> > > +				      <0 333 4>;
> > > +			/* Note:
> > > +			 * SID[2:0]  = PCIe function number
> > > +			 * SID[7:3]  = PCIe device number
> > > +			 * SID[14:8] = PCIe bus number
> > > +			 */
> > > +			 mmu-masters = <&pcie0
> > > +				/* 1:00:[0,3] */ 256 257 258 259
> > > +				/* 2:00:[0,3] */ 512 513 514 515
> > > +				/* 3:00:[0,3] */ 768 769 770 771
> > > +				/* 4:00:[0,3] */ 1024 1025 1026 1027
> > > +			 >;
> > > +		 };
> > 
> > This doesn't look right to me.
> > 
> > I didn't think that RID->SID mapping was actually defined by any
> > binding, so (how) are these numbers used?
> > 
> > I'm uncomfortable with this, given we should be moving towards the
> > generic IOMMU binding (and then we'd use the iommu-map binding [1] for
> > this).
> > 
> > Will, Robin, thoughts?
> 
> The driver currently assumes a 1:1 RID:SID mapping when it sees a PCI
> device, so those numbers should be ignored.

Given that, they shouldn't be in the DT, then?

Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Cc: Suravee Suthikulpanit
	<Suravee.Suthikulpanit-5C7GfCeVMHo@public.gmane.org>,
	robin.murphy-5wv7dgnIgG8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	brijeshkumar.singh-5C7GfCeVMHo@public.gmane.org,
	thomas.lendacky-5C7GfCeVMHo@public.gmane.org,
	leo.duran-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH 11/13] dtb: amd: Add PCIe SMMU device tree node
Date: Thu, 28 Jan 2016 11:18:19 +0000	[thread overview]
Message-ID: <20160128111818.GH17123@leverpostej> (raw)
In-Reply-To: <20160128111738.GF30928-5wv7dgnIgG8@public.gmane.org>

On Thu, Jan 28, 2016 at 11:17:39AM +0000, Will Deacon wrote:
> On Thu, Jan 28, 2016 at 11:14:53AM +0000, Mark Rutland wrote:
> > On Wed, Jan 27, 2016 at 03:11:59PM -0600, Suravee Suthikulpanit wrote:
> > > From: Suravee Suthikulpanit <suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
> > > 
> > > Add PCIe SMMU device tree node for AMD Seattle SOC.
> > > 
> > > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit-5C7GfCeVMHo@public.gmane.org>
> > > ---
> > >  arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 23 +++++++++++++++++++++++
> > >  1 file changed, 23 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > index a7fc059..bfccfea 100644
> > > --- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > +++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > @@ -210,6 +210,7 @@
> > >  			device_type = "pci";
> > >  			bus-range = <0 0x7f>;
> > >  			msi-parent = <&v2m0>;
> > > +			#stream-id-cells = <16>;
> > >  			reg = <0 0xf0000000 0 0x10000000>;
> > >  
> > >  			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> > > @@ -230,6 +231,28 @@
> > >  				<0x03000000 0x01 0x00000000 0x01 0x00000000 0x7f 0x00000000>;
> > >  		};
> > >  
> > > +		pcie0_smmu: smmu@e0a00000 {
> > > +			 compatible = "arm,mmu-401";
> > > +			 reg = <0 0xe0a00000 0 0x10000>;
> > > +			 #global-interrupts = <1>;
> > > +			 interrupts = /* Uses combined intr for both
> > > +				       * global and context
> > > +				       */
> > > +				      <0 333 4>,
> > > +				      <0 333 4>;
> > > +			/* Note:
> > > +			 * SID[2:0]  = PCIe function number
> > > +			 * SID[7:3]  = PCIe device number
> > > +			 * SID[14:8] = PCIe bus number
> > > +			 */
> > > +			 mmu-masters = <&pcie0
> > > +				/* 1:00:[0,3] */ 256 257 258 259
> > > +				/* 2:00:[0,3] */ 512 513 514 515
> > > +				/* 3:00:[0,3] */ 768 769 770 771
> > > +				/* 4:00:[0,3] */ 1024 1025 1026 1027
> > > +			 >;
> > > +		 };
> > 
> > This doesn't look right to me.
> > 
> > I didn't think that RID->SID mapping was actually defined by any
> > binding, so (how) are these numbers used?
> > 
> > I'm uncomfortable with this, given we should be moving towards the
> > generic IOMMU binding (and then we'd use the iommu-map binding [1] for
> > this).
> > 
> > Will, Robin, thoughts?
> 
> The driver currently assumes a 1:1 RID:SID mapping when it sees a PCI
> device, so those numbers should be ignored.

Given that, they shouldn't be in the DT, then?

Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/13] dtb: amd: Add PCIe SMMU device tree node
Date: Thu, 28 Jan 2016 11:18:19 +0000	[thread overview]
Message-ID: <20160128111818.GH17123@leverpostej> (raw)
In-Reply-To: <20160128111738.GF30928@arm.com>

On Thu, Jan 28, 2016 at 11:17:39AM +0000, Will Deacon wrote:
> On Thu, Jan 28, 2016 at 11:14:53AM +0000, Mark Rutland wrote:
> > On Wed, Jan 27, 2016 at 03:11:59PM -0600, Suravee Suthikulpanit wrote:
> > > From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > > 
> > > Add PCIe SMMU device tree node for AMD Seattle SOC.
> > > 
> > > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > > ---
> > >  arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 23 +++++++++++++++++++++++
> > >  1 file changed, 23 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > index a7fc059..bfccfea 100644
> > > --- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > +++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
> > > @@ -210,6 +210,7 @@
> > >  			device_type = "pci";
> > >  			bus-range = <0 0x7f>;
> > >  			msi-parent = <&v2m0>;
> > > +			#stream-id-cells = <16>;
> > >  			reg = <0 0xf0000000 0 0x10000000>;
> > >  
> > >  			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> > > @@ -230,6 +231,28 @@
> > >  				<0x03000000 0x01 0x00000000 0x01 0x00000000 0x7f 0x00000000>;
> > >  		};
> > >  
> > > +		pcie0_smmu: smmu at e0a00000 {
> > > +			 compatible = "arm,mmu-401";
> > > +			 reg = <0 0xe0a00000 0 0x10000>;
> > > +			 #global-interrupts = <1>;
> > > +			 interrupts = /* Uses combined intr for both
> > > +				       * global and context
> > > +				       */
> > > +				      <0 333 4>,
> > > +				      <0 333 4>;
> > > +			/* Note:
> > > +			 * SID[2:0]  = PCIe function number
> > > +			 * SID[7:3]  = PCIe device number
> > > +			 * SID[14:8] = PCIe bus number
> > > +			 */
> > > +			 mmu-masters = <&pcie0
> > > +				/* 1:00:[0,3] */ 256 257 258 259
> > > +				/* 2:00:[0,3] */ 512 513 514 515
> > > +				/* 3:00:[0,3] */ 768 769 770 771
> > > +				/* 4:00:[0,3] */ 1024 1025 1026 1027
> > > +			 >;
> > > +		 };
> > 
> > This doesn't look right to me.
> > 
> > I didn't think that RID->SID mapping was actually defined by any
> > binding, so (how) are these numbers used?
> > 
> > I'm uncomfortable with this, given we should be moving towards the
> > generic IOMMU binding (and then we'd use the iommu-map binding [1] for
> > this).
> > 
> > Will, Robin, thoughts?
> 
> The driver currently assumes a 1:1 RID:SID mapping when it sees a PCI
> device, so those numbers should be ignored.

Given that, they shouldn't be in the DT, then?

Mark.

  reply	other threads:[~2016-01-28 11:18 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 21:11 [PATCH 00/13] dtb: amd: Miscelleneous Updates for AMD Seattle DTS Suravee Suthikulpanit
2016-01-27 21:11 ` Suravee Suthikulpanit
2016-01-27 21:11 ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 01/13] MAINTAINERS: Adding Maintainers for AMD Seattle Device Tree Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-28  4:49   ` Martin Michlmayr
2016-01-28  4:49     ` Martin Michlmayr
2016-01-28  4:49     ` Martin Michlmayr
2016-01-27 21:11 ` [PATCH 02/13] dtb: amd: Fix GICv2 hypervisor and virtual interface sizes Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 03/13] dtb: amd: Fix DMA ranges in device tree Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 04/13] dtb: amd: Fix typo in SPI device nodes Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 05/13] dtb: amd: Misc changes for I2C " Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 06/13] dtb: amd: Misc changes for SATA device tree nodes Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 07/13] dtb: amd: Misc changes for GPIO devices Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 08/13] dtb: amd: Add PERF CCN-504 device tree node Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 09/13] dtb: amd: Add KCS " Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 10/13] dtb: amd: Add AMD XGBE device tree file Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11 ` [PATCH 11/13] dtb: amd: Add PCIe SMMU device tree node Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-27 21:11   ` Suravee Suthikulpanit
2016-01-28 11:14   ` Mark Rutland
2016-01-28 11:14     ` Mark Rutland
2016-01-28 11:17     ` Will Deacon
2016-01-28 11:17       ` Will Deacon
2016-01-28 11:17       ` Will Deacon
2016-01-28 11:18       ` Mark Rutland [this message]
2016-01-28 11:18         ` Mark Rutland
2016-01-28 11:18         ` Mark Rutland
2016-01-28 11:19         ` Will Deacon
2016-01-28 11:19           ` Will Deacon
2016-01-28 11:19           ` Will Deacon
2016-01-28 12:20     ` Robin Murphy
2016-01-28 12:20       ` Robin Murphy
2016-01-28 14:17       ` Arnd Bergmann
2016-01-28 14:17         ` Arnd Bergmann
2016-01-28 14:17         ` Arnd Bergmann
2016-01-28 14:27         ` Will Deacon
2016-01-28 14:27           ` Will Deacon
2016-01-28 14:27           ` Will Deacon
2016-03-30 15:37           ` Eric Auger
2016-03-30 15:37             ` Eric Auger
2016-03-30 15:45             ` Will Deacon
2016-03-30 15:45               ` Will Deacon
2016-03-30 15:45               ` Will Deacon
2016-03-30 15:57               ` Eric Auger
2016-03-30 15:57                 ` Eric Auger
2016-03-30 15:57                 ` Eric Auger
2016-03-30 17:24                 ` Will Deacon
2016-03-30 17:24                   ` Will Deacon
2016-03-31  7:39                   ` Eric Auger
2016-03-31  7:39                     ` Eric Auger
2016-03-31 17:34                     ` Will Deacon
2016-03-31 17:34                       ` Will Deacon
2016-01-27 21:12 ` [PATCH 12/13] dtb: amd: Add support for new AMD Overdrive boards Suravee Suthikulpanit
2016-01-27 21:12   ` Suravee Suthikulpanit
2016-01-27 21:12   ` Suravee Suthikulpanit
2016-01-27 21:12 ` [PATCH 13/13] dtb: amd: Add support for AMD/Linaro 96Boards Enterprise Edition Server board Suravee Suthikulpanit
2016-01-27 21:12   ` Suravee Suthikulpanit
2016-01-27 21:12   ` Suravee Suthikulpanit
2016-01-28 21:39 ` [PATCH 00/13] dtb: amd: Miscelleneous Updates for AMD Seattle DTS Olof Johansson
2016-01-28 21:39   ` Olof Johansson
2016-01-28 21:39   ` Olof Johansson
2016-01-28 22:20   ` Suravee Suthikulanit
2016-01-28 22:20     ` Suravee Suthikulanit
2016-01-28 22:20     ` Suravee Suthikulanit
2016-01-29  2:43     ` Olof Johansson
2016-01-29  2:43       ` Olof Johansson
2016-01-29  2:43       ` Olof Johansson
2016-01-30  0:02       ` Suravee Suthikulanit
2016-01-30  0:02         ` Suravee Suthikulanit
2016-01-30  0:02         ` Suravee Suthikulanit
2016-01-30  1:02       ` Frank Rowand
2016-01-30  1:02         ` Frank Rowand
2016-01-30  1:02         ` Frank Rowand

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=20160128111818.GH17123@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=brijeshkumar.singh@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=leo.duran@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=thomas.lendacky@amd.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 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.