devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Xu <xuwei5@hisilicon.com>
To: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	lorenzo.pieralisi@arm.com, robin.murphy@arm.com,
	marc.zyngier@arm.com, will.deacon@arm.com
Cc: devicetree@vger.kernel.org, joro@8bytes.org,
	john.garry@huawei.com, linuxarm@huawei.com,
	linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org,
	guohanjun@huawei.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v12 3/3] arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07
Date: Fri, 2 Mar 2018 16:34:02 +0000	[thread overview]
Message-ID: <5A997CFA.9080306@hisilicon.com> (raw)
In-Reply-To: <20171214160957.13716-4-shameerali.kolothum.thodi@huawei.com>

Hi Shameer,

On 2017/12/14 16:09, Shameer Kolothum wrote:
> The HiSilicon erratum 161010801 describes the limitation of
> HiSilicon platforms hip06/hip07 to support the SMMUv3 mappings
> for MSI transactions.
> 
> PCIe controller on these platforms has to differentiate the
> MSI payload against other DMA payload and has to modify the
> MSI  payload. This makes it difficult for these platforms to
> have SMMU translation for MSI. In order to workaround this,
> ARM SMMUv3 driver requires a quirk to treat the MSI regions
> separately. Such a quirk is currently missing for DT based
> systems and therefore we need to explicitly disable the
> hip06/hip07 smmu entries in dts.
> 
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
> ---

Thanks!
Applied into hisilicon dt tree.

BR,
Wei

>  arch/arm64/boot/dts/hisilicon/hip06.dtsi | 56 ++++++++++++++++++++++++++++++++
>  arch/arm64/boot/dts/hisilicon/hip07.dtsi | 25 ++++++++++++++
>  2 files changed, 81 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hip06.dtsi b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> index a049b64..35202eb 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> @@ -291,6 +291,13 @@
>  			#interrupt-cells = <2>;
>  			num-pins = <128>;
>  		};
> +
> +		mbigen_pcie0: intc_pcie0 {
> +			msi-parent = <&its_dsa 0x40085>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +			num-pins = <10>;
> +		};
>  	};
>  
>  	mbigen_dsa@c0080000 {
> @@ -312,6 +319,31 @@
>  		};
>  	};
>  
> +	/**
> +	 *  HiSilicon erratum 161010801: This describes the limitation
> +	 *  of HiSilicon platforms hip06/hip07 to support the SMMUv3
> +	 *  mappings for PCIe MSI transactions.
> +	 *  PCIe controller on these platforms has to differentiate the
> +	 *  MSI payload against other DMA payload and has to modify the
> +	 *  MSI payload. This makes it difficult for these platforms to
> +	 *  have a SMMU translation for MSI. In order to workaround this,
> +	 *  ARM SMMUv3 driver requires a quirk to treat the MSI regions
> +	 *  separately. Such a quirk is currently missing for DT based
> +	 *  systems. Hence please make sure that the smmu pcie node on
> +	 *  hip06 is disabled as this will break the PCIe functionality
> +	 *  when iommu-map entry is used along with the PCIe node.
> +	 *  Refer:https://www.spinics.net/lists/arm-kernel/msg602812.html
> +	 */
> +	smmu0: smmu_pcie {
> +		compatible = "arm,smmu-v3";
> +		reg = <0x0 0xa0040000 0x0 0x20000>;
> +		#iommu-cells = <1>;
> +		dma-coherent;
> +		smmu-cb-memtype = <0x0 0x1>;
> +		hisilicon,broken-prefetch-cmd;
> +		status = "disabled";
> +	};
> +
>  	soc {
>  		compatible = "simple-bus";
>  		#address-cells = <2>;
> @@ -676,6 +708,30 @@
>  				     <637 1>,<638 1>,<639 1>;
>  			status = "disabled";
>  		};
> +
> +		pcie0: pcie@a0090000 {
> +			compatible = "hisilicon,hip06-pcie-ecam";
> +			reg = <0 0xb0000000 0 0x2000000>,
> +			      <0 0xa0090000 0 0x10000>;
> +			bus-range = <0  31>;
> +			msi-map = <0x0000 &its_dsa 0x0000 0x2000>;
> +			msi-map-mask = <0xffff>;
> +			#address-cells = <3>;
> +			#size-cells = <2>;
> +			device_type = "pci";
> +			dma-coherent;
> +			ranges = <0x02000000 0 0xb2000000 0x0 0xb2000000 0
> +				 0x5ff0000 0x01000000 0 0 0 0xb7ff0000
> +				 0 0x10000>;
> +			#interrupt-cells = <1>;
> +			interrupt-map-mask = <0xf800 0 0 7>;
> +			interrupt-map = <0x0 0 0 1 &mbigen_pcie0 650 4
> +					0x0 0 0 2 &mbigen_pcie0 650 4
> +					0x0 0 0 3 &mbigen_pcie0 650 4
> +					0x0 0 0 4 &mbigen_pcie0 650 4>;
> +			status = "disabled";
> +		};
> +
>  	};
>  
>  };
> diff --git a/arch/arm64/boot/dts/hisilicon/hip07.dtsi b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> index 2c01a21..3e80bf3 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> @@ -1083,6 +1083,31 @@
>  		};
>  	};
>  
> +	/**
> +	 *  HiSilicon erratum 161010801: This describes the limitation
> +	 *  of HiSilicon platforms hip06/hip07 to support the SMMUv3
> +	 *  mappings for PCIe MSI transactions.
> +	 *  PCIe controller on these platforms has to differentiate the
> +	 *  MSI payload against other DMA payload and has to modify the
> +	 *  MSI payload. This makes it difficult for these platforms to
> +	 *  have a SMMU translation for MSI. In order to workaround this,
> +	 *  ARM SMMUv3 driver requires a quirk to treat the MSI regions
> +	 *  separately. Such a quirk is currently missing for DT based
> +	 *  systems. Hence please make sure that the smmu pcie node on
> +	 *  hip07 is disabled as this will break the PCIe functionality
> +	 *  when iommu-map entry is used along with the PCIe node.
> +	 *  Refer:https://www.spinics.net/lists/arm-kernel/msg602812.html
> +	 */
> +	smmu0: smmu_pcie {
> +		compatible = "arm,smmu-v3";
> +		reg = <0x0 0xa0040000 0x0 0x20000>;
> +		#iommu-cells = <1>;
> +		dma-coherent;
> +		smmu-cb-memtype = <0x0 0x1>;
> +		hisilicon,broken-prefetch-cmd;
> +		status = "disabled";
> +	};
> +
>  	soc {
>  		compatible = "simple-bus";
>  		#address-cells = <2>;
> 

  reply	other threads:[~2018-03-02 16:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 16:09 [PATCH v12 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI) Shameer Kolothum
2017-12-14 16:09 ` [PATCH v12 1/3] ACPI/IORT: Add msi address regions reservation helper Shameer Kolothum
2017-12-15 10:29   ` Lorenzo Pieralisi
2017-12-15 14:49   ` Marc Zyngier
     [not found] ` <20171214160957.13716-1-shameerali.kolothum.thodi-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-12-14 16:09   ` [PATCH v12 2/3] iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation Shameer Kolothum
2017-12-14 16:09 ` [PATCH v12 3/3] arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07 Shameer Kolothum
2018-03-02 16:34   ` Wei Xu [this message]
2017-12-15 15:01 ` [PATCH v12 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI) Shameerali Kolothum Thodi
2018-01-12 14:48 ` Shameerali Kolothum Thodi
2018-01-29 15:39 ` Will Deacon
     [not found]   ` <20180129153939.GC24972-5wv7dgnIgG8@public.gmane.org>
2018-01-29 16:16     ` Shameerali Kolothum Thodi
     [not found]       ` <5FC3163CFD30C246ABAA99954A238FA83863FC88-WFPaWmAhWqtUuCJht5byYAK1hpo4iccwjNknBlVQO8k@public.gmane.org>
2018-01-29 16:21         ` Will Deacon
2018-01-29 16:41           ` Shameerali Kolothum Thodi
2018-01-31  9:30           ` Shameerali Kolothum Thodi
     [not found]           ` <20180129162109.GA25266-5wv7dgnIgG8@public.gmane.org>
2018-02-13  9:18             ` Shameerali Kolothum Thodi

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=5A997CFA.9080306@hisilicon.com \
    --to=xuwei5@hisilicon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=guohanjun@huawei.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=john.garry@huawei.com \
    --cc=joro@8bytes.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc.zyngier@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.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).