arm64: dts: qcom: Remove "iommus" property from PCIe nodes
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 8 Mar 2023 07:56:48 +0000 (13:26 +0530)
committerBjorn Andersson <andersson@kernel.org>
Thu, 6 Apr 2023 18:32:54 +0000 (11:32 -0700)
Currently, most of the Qualcomm SoCs specify both "iommus" and "iommu-map"
properties for the PCIe nodes. First one passes the SMR mask to the iommu
driver and the latter specifies the SID for each PCIe device.

But with "iommus" property, the PCIe controller will be added to the
iommu group along with the devices. This makes no sense because the
controller will not initiate any DMA transaction on its own. And moreover,
it is not strictly required to pass the SMR mask to the iommu driver. If
the "iommus" property is not present, then the default mask of "0" would be
used which should work for all PCIe devices.

On the other side, if the SMR mask specified doesn't match the one expected
by the hypervisor, then all the PCIe transactions will end up triggering
"Unidentified Stream Fault" by the SMMU.

So to get rid of these hassles and also prohibit PCIe controllers from
adding to the iommu group, let's remove the "iommus" property from PCIe
nodes.

Reported-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-arm-msm/20230227195535.GA749409-robh@kernel.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230308075648.134119-1-manivannan.sadhasivam@linaro.org
arch/arm64/boot/dts/qcom/sc7280.dtsi
arch/arm64/boot/dts/qcom/sdm845.dtsi
arch/arm64/boot/dts/qcom/sm8150.dtsi
arch/arm64/boot/dts/qcom/sm8250.dtsi
arch/arm64/boot/dts/qcom/sm8350.dtsi
arch/arm64/boot/dts/qcom/sm8450.dtsi
arch/arm64/boot/dts/qcom/sm8550.dtsi

index 0cdb1631602191c9e1f58eb24c36ecea66fa62d7..f4003e0f8fac6c5401b9f44820ba37d9d844daba 100644 (file)
 
                        dma-coherent;
 
-                       iommus = <&apps_smmu 0x1c80 0x1>;
-
                        iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
                                    <0x100 &apps_smmu 0x1c81 0x1>;
 
index da4b200281d889cd8e5c3f2731e29b62ee2ab5b0..e35add9f329984a71a73336e33f60cbd87168041 100644 (file)
                                      "slave_q2a",
                                      "tbu";
 
-                       iommus = <&apps_smmu 0x1c10 0xf>;
                        iommu-map = <0x0   &apps_smmu 0x1c10 0x1>,
                                    <0x100 &apps_smmu 0x1c11 0x1>,
                                    <0x200 &apps_smmu 0x1c12 0x1>,
                        assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
                        assigned-clock-rates = <19200000>;
 
-                       iommus = <&apps_smmu 0x1c00 0xf>;
                        iommu-map = <0x0   &apps_smmu 0x1c00 0x1>,
                                    <0x100 &apps_smmu 0x1c01 0x1>,
                                    <0x200 &apps_smmu 0x1c02 0x1>,
index c9c04ac9bfcd8d3e3b1842acea4f45371656dbd2..72e4ae0b6aa71e92806743c96b5ed44b4005beed 100644 (file)
                                      "slave_q2a",
                                      "tbu";
 
-                       iommus = <&apps_smmu 0x1d80 0x3f>;
                        iommu-map = <0x0   &apps_smmu 0x1d80 0x1>,
                                    <0x100 &apps_smmu 0x1d81 0x1>;
 
                        assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
                        assigned-clock-rates = <19200000>;
 
-                       iommus = <&apps_smmu 0x1e00 0x3f>;
                        iommu-map = <0x0   &apps_smmu 0x1e00 0x1>,
                                    <0x100 &apps_smmu 0x1e01 0x1>;
 
index fe569b07efe3523724042e588d386048d3f2de63..bde8bdd2e811fd179409cc8e48e77322f8852c7f 100644 (file)
                                      "tbu",
                                      "ddrss_sf_tbu";
 
-                       iommus = <&apps_smmu 0x1c00 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c00 0x1>,
                                    <0x100 &apps_smmu 0x1c01 0x1>;
 
                        assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
                        assigned-clock-rates = <19200000>;
 
-                       iommus = <&apps_smmu 0x1c80 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c80 0x1>,
                                    <0x100 &apps_smmu 0x1c81 0x1>;
 
                        assigned-clocks = <&gcc GCC_PCIE_2_AUX_CLK>;
                        assigned-clock-rates = <19200000>;
 
-                       iommus = <&apps_smmu 0x1d00 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1d00 0x1>,
                                    <0x100 &apps_smmu 0x1d01 0x1>;
 
index 8985a59602f9b9e7e8ead0a5af4b5a463084088d..ebcb481571c28267f0938b6b97394140fbf5a36f 100644 (file)
                                      "aggre1",
                                      "aggre0";
 
-                       iommus = <&apps_smmu 0x1c00 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c00 0x1>,
                                    <0x100 &apps_smmu 0x1c01 0x1>;
 
                                      "ddrss_sf_tbu",
                                      "aggre1";
 
-                       iommus = <&apps_smmu 0x1c80 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c80 0x1>,
                                    <0x100 &apps_smmu 0x1c81 0x1>;
 
index eebad05cd941610272a8004ed2d9675cb09b38c6..0bd205a11f2b9edc53e64535de1566f57be3103e 100644 (file)
                                      "aggre0",
                                      "aggre1";
 
-                       iommus = <&apps_smmu 0x1c00 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c00 0x1>,
                                    <0x100 &apps_smmu 0x1c01 0x1>;
 
                                      "ddrss_sf_tbu",
                                      "aggre1";
 
-                       iommus = <&apps_smmu 0x1c80 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1c80 0x1>,
                                    <0x100 &apps_smmu 0x1c81 0x1>;
 
index 7a1994bf40861fb83e22beaed81a106e2a99df9d..68a60eadd03f2f898f5feac4c050a8c586b84d30 100644 (file)
                                        <&gem_noc MASTER_APPSS_PROC 0 &cnoc_main SLAVE_PCIE_0 0>;
                        interconnect-names = "pcie-mem", "cpu-pcie";
 
-                       iommus = <&apps_smmu 0x1400 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1400 0x1>,
                                    <0x100 &apps_smmu 0x1401 0x1>;
 
                                        <&gem_noc MASTER_APPSS_PROC 0 &cnoc_main SLAVE_PCIE_1 0>;
                        interconnect-names = "pcie-mem", "cpu-pcie";
 
-                       iommus = <&apps_smmu 0x1480 0x7f>;
                        iommu-map = <0x0   &apps_smmu 0x1480 0x1>,
                                    <0x100 &apps_smmu 0x1481 0x1>;