* [PATCH 01/22] arm64: dts: qcom: kaanapali: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 02/22] arm64: dts: qcom: kodiak: " Manivannan Sadhasivam via B4 Relay
` (22 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 2eeb5767d53f ("arm64: dts: qcom: Introduce Kaanapali SoC")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/kaanapali.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/kaanapali.dtsi b/arch/arm64/boot/dts/qcom/kaanapali.dtsi
index 7aa9653bd456..011fb00beb0e 100644
--- a/arch/arm64/boot/dts/qcom/kaanapali.dtsi
+++ b/arch/arm64/boot/dts/qcom/kaanapali.dtsi
@@ -2310,8 +2310,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
operating-points-v2 = <&pcie0_opp_table>;
- iommu-map = <0 &apps_smmu 0x1400 0x1>,
- <0x100 &apps_smmu 0x1401 0x1>;
+ iommu-map = <0 &apps_smmu 0x1400 0x0 0x1>,
+ <0x100 &apps_smmu 0x1401 0x0 0x1>;
interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &intc 0 0 GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>,
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 02/22] arm64: dts: qcom: kodiak: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 01/22] arm64: dts: qcom: kaanapali: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:08 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 03/22] arm64: dts: qcom: sar2130p: " Manivannan Sadhasivam via B4 Relay
` (21 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: f8328b7549e1 ("arm64: dts: qcom: sc7280: Describe the first PCIe controller and PHY")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/kodiak.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi
index fa540d8c2615..2eb613dd6716 100644
--- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
+++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
@@ -2278,8 +2278,8 @@ pcie0: pcie@1c00000 {
"aggre0",
"aggre1";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2424,8 +2424,8 @@ pcie1: pcie@1c08000 {
dma-coherent;
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>;
status = "disabled";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 02/22] arm64: dts: qcom: kodiak: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 02/22] arm64: dts: qcom: kodiak: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:08 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:08 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [High] Changing the `iommu-map` entries from 4 cells to 5 cells breaks the manual parsing logic in the QCOM PCIe driver, resulting in corrupted BDF-to-SID hardware configurations.
Pre-existing issues:
- [Medium] The patch corrects an incorrectly formatted 4-cell `iommu-map` property by adding the missing SID mask cell to match the 2-cell `apps_smmu` provider in `kodiak.dtsi`. However, it fails to address the exact same defect present in numerous other Qualcomm SoC device trees and their YAML bindings.
--
--- Patch [2]: [PATCH 02/22] arm64: dts: qcom: kodiak: Fix the PCIe iommu-map entries ---
commit 3a1ab560afad0b97b3e224b3201d2ab8bc8cd668
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: kodiak: Fix the PCIe iommu-map entries
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41. This patch fixes the entries to match the provider's
'#iommu-cells' property.
> diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi
> index fa540d8c2615d..2eb613dd67165 100644
> --- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
> +++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
> @@ -2278,8 +2278,8 @@ pcie0: pcie@1c00000 {
> "aggre0",
> "aggre1";
>
> - iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
> - <0x100 &apps_smmu 0x1c01 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c01 0x0 0x1>;
[Severity: High]
Will changing this to 5 cells break the manual parsing logic in the QCOM
PCIe driver?
Looking at drivers/pci/controller/dwc/pcie-qcom.c,
qcom_pcie_config_sid_1_9_0() manually casts the raw iommu-map property into
a 4-u32 struct array:
struct {
u32 bdf;
u32 phandle;
u32 smmu_sid;
u32 smmu_sid_len;
} *map;
If the device tree format is updated to 5 cells, will reading this array
cause out-of-sync reads? For the second entry, map[1].bdf would read the
length cell of the first entry (0x1), and map[1].smmu_sid would read the
phandle of the second entry. This could result in corrupted BDF-to-SID
hardware configurations, causing PCIe devices to use invalid SIDs for DMA.
[Severity: Medium]
This is a pre-existing issue, but does this fix need to be applied to other
Qualcomm SoCs as well?
This patch corrects an incorrectly formatted 4-cell iommu-map property by
adding the missing SID mask cell to match the 2-cell apps_smmu provider in
kodiak.dtsi, but fails to address the exact same defect present in numerous
other Qualcomm SoC device trees.
For example, in arch/arm64/boot/dts/qcom/sm8550.dtsi, pcie0 contains:
iommu-map = <0x0 &apps_smmu 0x1400 0x1>,
Other SoCs like sm8650 and sc8180x also seem to omit the SID mask. The OF
core warning will continue to be generated for all other affected Qualcomm
SoCs until they are updated.
(Note that fixing these DTs directly would also break the driver as mentioned
above, so the driver must likely be updated first to handle variable-length
cells or use standard OF core parsing before applying these DT changes).
>
> resets = <&gcc GCC_PCIE_0_BCR>;
> reset-names = "pci";
[ ... ]
> @@ -2424,8 +2424,8 @@ pcie1: pcie@1c08000 {
>
> dma-coherent;
>
> - iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
> - <0x100 &apps_smmu 0x1c81 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c81 0x0 0x1>;
>
> status = "disabled";
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 03/22] arm64: dts: qcom: sar2130p: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 01/22] arm64: dts: qcom: kaanapali: " Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 02/22] arm64: dts: qcom: kodiak: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 04/22] arm64: dts: qcom: sc8180x: " Manivannan Sadhasivam via B4 Relay
` (20 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: be9115bfe5bf ("arm64: dts: qcom: sar2130p: add support for SAR2130P")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sar2130p.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sar2130p.dtsi b/arch/arm64/boot/dts/qcom/sar2130p.dtsi
index 3c9529bb2f76..99002ddaf6f6 100644
--- a/arch/arm64/boot/dts/qcom/sar2130p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sar2130p.dtsi
@@ -1329,8 +1329,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
&config_noc SLAVE_PCIE_0 QCOM_ICC_TAG_ALWAYS>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -1455,8 +1455,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
&config_noc SLAVE_PCIE_1 QCOM_ICC_TAG_ALWAYS>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &apps_smmu 0x1e00 0x1>,
- <0x100 &apps_smmu 0x1e01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1e00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1e01 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>,
<&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 04/22] arm64: dts: qcom: sc8180x: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (2 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 03/22] arm64: dts: qcom: sar2130p: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:11 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 05/22] arm64: dts: qcom: sdm845: " Manivannan Sadhasivam via B4 Relay
` (19 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sc8180x.dtsi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
index 45391768e245..5d3f0c4d7b46 100644
--- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
@@ -1767,8 +1767,8 @@ pcie0: pcie@1c00000 {
assigned-clocks = <&gcc GCC_PCIE_0_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1d80 0x1>,
- <0x100 &apps_smmu 0x1d81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1d80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1d81 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -1886,8 +1886,8 @@ pcie3: pcie@1c08000 {
assigned-clocks = <&gcc GCC_PCIE_3_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1e00 0x1>,
- <0x100 &apps_smmu 0x1e01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1e00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1e01 0x0 0x1>;
resets = <&gcc GCC_PCIE_3_BCR>;
reset-names = "pci";
@@ -2006,8 +2006,8 @@ pcie1: pcie@1c10000 {
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
@@ -2126,8 +2126,8 @@ pcie2: pcie@1c18000 {
assigned-clocks = <&gcc GCC_PCIE_2_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1d00 0x1>,
- <0x100 &apps_smmu 0x1d01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1d00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1d01 0x0 0x1>;
resets = <&gcc GCC_PCIE_2_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 04/22] arm64: dts: qcom: sc8180x: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 04/22] arm64: dts: qcom: sc8180x: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:11 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:11 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: conor+dt, devicetree, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Fixing `iommu-map` to use 5 cells breaks rigid 4-cell parsing in the `pcie-qcom.c` driver, corrupting PCIe SID translation.
--
--- Patch [4]: [PATCH 04/22] arm64: dts: qcom: sc8180x: Fix the PCIe iommu-map entries ---
commit 2707161425e0efca5af00d7a068414771d8112e9
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: sc8180x: Fix the PCIe iommu-map entries
This commit fixes the PCIe iommu-map entries to match the apps_smmu
provider's #iommu-cells = <2> property. It adds the missing SID mask cell to
prevent warnings from the OF core about 1-cell entries targeting 2-cell
outputs.
> diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
> --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi
> @@ -1767,8 +1767,8 @@ pcie0: pcie@1c00000 {
> assigned-clocks = <&gcc GCC_PCIE_0_AUX_CLK>;
> assigned-clock-rates = <19200000>;
>
> - iommu-map = <0x0 &apps_smmu 0x1d80 0x1>,
> - <0x100 &apps_smmu 0x1d81 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1d80 0x0 0x1>,
> + <0x100 &apps_smmu 0x1d81 0x0 0x1>;
[Severity: High]
Does this change break the manual iommu-map parsing in the PCIe driver?
Looking at qcom_pcie_config_sid_1_9_0() in
drivers/pci/controller/dwc/pcie-qcom.c, the driver assumes a rigid 4-cell
length for iommu-map entries:
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_config_sid_1_9_0() {
...
struct {
u32 bdf;
u32 phandle;
u32 smmu_sid;
u32 smmu_sid_len;
} *map;
...
of_property_read_u32_array(dev->of_node, "iommu-map", (u32 *)map,
size / sizeof(u32));
...
}
By increasing the iommu-map property to 5 cells per entry, will this misalign
the array when the driver parses multiple entries?
For the second entry here, map[1].bdf would read the 5th cell of the first
entry (length), map[1].phandle would read the BDF of the second entry, and
map[1].smmu_sid would read the phandle pointer.
Does this corrupt the SID translation and lead to IOMMU faults for downstream
PCIe endpoints?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=4
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 05/22] arm64: dts: qcom: sdm845: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (3 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 04/22] arm64: dts: qcom: sc8180x: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 06/22] arm64: dts: qcom: sm8150: " Manivannan Sadhasivam via B4 Relay
` (18 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 5c538e09cb19 ("arm64: dts: qcom: sdm845: Add first PCIe controller and PHY")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 64 ++++++++++++++++++------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 4ae8627d6dbc..7c2a439dffdb 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -2372,22 +2372,22 @@ pcie0: pcie@1c00000 {
"slave_q2a",
"tbu";
- iommu-map = <0x0 &apps_smmu 0x1c10 0x1>,
- <0x100 &apps_smmu 0x1c11 0x1>,
- <0x200 &apps_smmu 0x1c12 0x1>,
- <0x300 &apps_smmu 0x1c13 0x1>,
- <0x400 &apps_smmu 0x1c14 0x1>,
- <0x500 &apps_smmu 0x1c15 0x1>,
- <0x600 &apps_smmu 0x1c16 0x1>,
- <0x700 &apps_smmu 0x1c17 0x1>,
- <0x800 &apps_smmu 0x1c18 0x1>,
- <0x900 &apps_smmu 0x1c19 0x1>,
- <0xa00 &apps_smmu 0x1c1a 0x1>,
- <0xb00 &apps_smmu 0x1c1b 0x1>,
- <0xc00 &apps_smmu 0x1c1c 0x1>,
- <0xd00 &apps_smmu 0x1c1d 0x1>,
- <0xe00 &apps_smmu 0x1c1e 0x1>,
- <0xf00 &apps_smmu 0x1c1f 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c10 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c11 0x0 0x1>,
+ <0x200 &apps_smmu 0x1c12 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c13 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c14 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c15 0x0 0x1>,
+ <0x600 &apps_smmu 0x1c16 0x0 0x1>,
+ <0x700 &apps_smmu 0x1c17 0x0 0x1>,
+ <0x800 &apps_smmu 0x1c18 0x0 0x1>,
+ <0x900 &apps_smmu 0x1c19 0x0 0x1>,
+ <0xa00 &apps_smmu 0x1c1a 0x0 0x1>,
+ <0xb00 &apps_smmu 0x1c1b 0x0 0x1>,
+ <0xc00 &apps_smmu 0x1c1c 0x0 0x1>,
+ <0xd00 &apps_smmu 0x1c1d 0x0 0x1>,
+ <0xe00 &apps_smmu 0x1c1e 0x0 0x1>,
+ <0xf00 &apps_smmu 0x1c1f 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2502,22 +2502,22 @@ pcie1: pcie@1c08000 {
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>,
- <0x200 &apps_smmu 0x1c02 0x1>,
- <0x300 &apps_smmu 0x1c03 0x1>,
- <0x400 &apps_smmu 0x1c04 0x1>,
- <0x500 &apps_smmu 0x1c05 0x1>,
- <0x600 &apps_smmu 0x1c06 0x1>,
- <0x700 &apps_smmu 0x1c07 0x1>,
- <0x800 &apps_smmu 0x1c08 0x1>,
- <0x900 &apps_smmu 0x1c09 0x1>,
- <0xa00 &apps_smmu 0x1c0a 0x1>,
- <0xb00 &apps_smmu 0x1c0b 0x1>,
- <0xc00 &apps_smmu 0x1c0c 0x1>,
- <0xd00 &apps_smmu 0x1c0d 0x1>,
- <0xe00 &apps_smmu 0x1c0e 0x1>,
- <0xf00 &apps_smmu 0x1c0f 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>,
+ <0x200 &apps_smmu 0x1c02 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c03 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c04 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c05 0x0 0x1>,
+ <0x600 &apps_smmu 0x1c06 0x0 0x1>,
+ <0x700 &apps_smmu 0x1c07 0x0 0x1>,
+ <0x800 &apps_smmu 0x1c08 0x0 0x1>,
+ <0x900 &apps_smmu 0x1c09 0x0 0x1>,
+ <0xa00 &apps_smmu 0x1c0a 0x0 0x1>,
+ <0xb00 &apps_smmu 0x1c0b 0x0 0x1>,
+ <0xc00 &apps_smmu 0x1c0c 0x0 0x1>,
+ <0xd00 &apps_smmu 0x1c0d 0x0 0x1>,
+ <0xe00 &apps_smmu 0x1c0e 0x0 0x1>,
+ <0xf00 &apps_smmu 0x1c0f 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 06/22] arm64: dts: qcom: sm8150: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (4 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 05/22] arm64: dts: qcom: sdm845: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 07/22] arm64: dts: qcom: sm8250: " Manivannan Sadhasivam via B4 Relay
` (17 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: a1c86c680533 ("arm64: dts: qcom: sm8150: Add PCIe nodes")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 0e101096209a..109a76f4ca75 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1893,8 +1893,8 @@ pcie0: pcie@1c00000 {
"bus_slave",
"slave_q2a";
- iommu-map = <0x0 &apps_smmu 0x1d80 0x1>,
- <0x100 &apps_smmu 0x1d81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1d80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1d81 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2011,8 +2011,8 @@ pcie1: pcie@1c08000 {
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1e00 0x1>,
- <0x100 &apps_smmu 0x1e01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1e00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1e01 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 07/22] arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (5 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 06/22] arm64: dts: qcom: sm8150: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:06 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 08/22] arm64: dts: qcom: sm8350: " Manivannan Sadhasivam via B4 Relay
` (16 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: e53bdfc00977 ("arm64: dts: qcom: sm8250: Add PCIe support")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 7076720413ab..c6f49ae9d253 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2190,8 +2190,8 @@ pcie0: pcie@1c00000 {
"tbu",
"ddrss_sf_tbu";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2317,8 +2317,8 @@ pcie1: pcie@1c08000 {
assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
@@ -2444,8 +2444,8 @@ pcie2: pcie@1c10000 {
assigned-clocks = <&gcc GCC_PCIE_2_AUX_CLK>;
assigned-clock-rates = <19200000>;
- iommu-map = <0x0 &apps_smmu 0x1d00 0x1>,
- <0x100 &apps_smmu 0x1d01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1d00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1d01 0x0 0x1>;
resets = <&gcc GCC_PCIE_2_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 07/22] arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 07/22] arm64: dts: qcom: sm8250: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:06 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:06 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] Modifying `iommu-map` entries from 4 cells to 5 cells breaks backwards compatibility with older kernels.
- [High] Adding a 5th cell to `iommu-map` entries breaks PCIe on SM8250 because the QCOM PCIe driver hardcodes a 4-cell structure when parsing this property.
--
--- Patch [7]: [PATCH 07/22] arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries ---
commit a5815a8c934e5c94f8aea5e79e5ac8f47d1465b8
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries
The commit updates the iommu-map entries for PCIe to include two cells
for the IOMMU specifier, matching the apps_smmu #iommu-cells property.
This resolves a warning from the OF core about 1-cell entries targeting
2-cell #iommu-cells.
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 7076720413ab2..c6f49ae9d253c 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -2190,8 +2190,8 @@ pcie0: pcie@1c00000 {
> "tbu",
> "ddrss_sf_tbu";
>
> - iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
> - <0x100 &apps_smmu 0x1c01 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c01 0x0 0x1>;
[Severity: High]
Does this change break the qcom-pcie driver's parsing logic?
Looking at drivers/pci/controller/dwc/pcie-qcom.c, the driver has a fixed
structure it expects for iommu-map entries:
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_config_sid_1_9_0() {
/* iommu map structure */
struct {
u32 bdf;
u32 phandle;
u32 smmu_sid;
u32 smmu_sid_len;
} *map;
...
}
If the iommu-map property is updated to contain 5 cells instead of 4, will
this hardcoded struct misalign and read the wrong values for smmu_sid and
length?
[Severity: Critical]
Will this cause a regression for older kernels booting with this updated
device tree?
Prior to commit ccb2fd725d41, the generic of_map_id() function in
drivers/of/base.c enforced a length check that assumed exactly 4 cells per
entry. Adding a 5th cell will cause that modulo check to fail and return
-EINVAL.
Since device trees are often treated as firmware ABI, will older kernels
fail to parse these mappings entirely and break DMA isolation or cause SMMU
faults?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=7
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 08/22] arm64: dts: qcom: sm8350: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (6 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 07/22] arm64: dts: qcom: sm8250: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 09/22] arm64: dts: qcom: sm8450: " Manivannan Sadhasivam via B4 Relay
` (15 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 6daee40678a0 ("arm64: dts: qcom: sm8350: add PCIe devices")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8350.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index c830953156ec..20c3ab9465d2 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -1575,8 +1575,8 @@ pcie0: pcie@1c00000 {
"aggre1",
"aggre0";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -1684,8 +1684,8 @@ pcie1: pcie@1c08000 {
"ddrss_sf_tbu",
"aggre1";
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 09/22] arm64: dts: qcom: sm8450: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (7 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 08/22] arm64: dts: qcom: sm8350: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:04 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 10/22] arm64: dts: qcom: sm8550: " Manivannan Sadhasivam via B4 Relay
` (14 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 7b09b1b47335 ("arm64: dts: qcom: sm8450: add PCIe0 RC device")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 56cb6e959e4e..18ab94de4ac9 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -2023,8 +2023,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
"aggre0",
"aggre1";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2188,8 +2188,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
"ddrss_sf_tbu",
"aggre1";
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 09/22] arm64: dts: qcom: sm8450: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 09/22] arm64: dts: qcom: sm8450: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:04 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:04 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [High] Adding the SID mask cell to the `iommu-map` property breaks the Qualcomm PCIe driver's BDF-to-SID mapping configuration, leading to IOMMU faults for downstream PCIe endpoints. The driver (`drivers/pci/controller/dwc/pcie-qcom.c`) manually parses `iommu-map` using a hardcoded 4-element structure (`struct { u32 bdf; u32 phandle; u32 smmu_sid; u32 smmu_sid_len; }`) and a single `of_property_read_u32_array` call. Because the driver assumes each entry is exactly 16 bytes (4 cells), updating the device tree to pass 5 cells per entry (to comply with `#iommu-cells = <2>`) misaligns the driver's iteration for any entry after the first. For example, in the second entry of `sm8450`, the driver reads the 5th cell of the first entry as the BDF, and the phandle of the second entry as the SID, programming the hardware translation table with garbage.
Pre-existing issues:
- [Medium] The `iommu-map` cell-count mismatch bug is still present in several other Qualcomm device trees targeting `apps_smmu`, which were missed in this patch series. While patches were provided for platforms like sm8450 and sc8180x, other files such as `qcs6490-radxa-dragon-q6a.dts`, `qcs6490-rb3gen2.dts`, `sm8550.dtsi`, and `sm8750.dtsi` still contain the malformed 4-cell `iommu-map` entries targeting the 2-cell provider `&apps_smmu`.
--
--- Patch [9]: [PATCH 09/22] arm64: dts: qcom: sm8450: Fix the PCIe iommu-map entries ---
commit c8ad1d0139272d52fede75b2bf1bed447374969b
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: sm8450: Fix the PCIe iommu-map entries
This commit updates the iommu-map property in the sm8450 device tree to
include the SID mask cell, ensuring it matches the #iommu-cells = <2>
property of the apps_smmu IOMMU provider. This resolves warnings generated
by the OF core regarding cell count mismatches.
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 56cb6e959e4ee..18ab94de4ac9e 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -2023,8 +2023,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
> "aggre0",
> "aggre1";
>
> - iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
> - <0x100 &apps_smmu 0x1c01 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c01 0x0 0x1>;
[Severity: High]
Does this change break the Qualcomm PCIe driver's BDF-to-SID mapping?
Looking at the driver in drivers/pci/controller/dwc/pcie-qcom.c,
qcom_pcie_config_sid_1_9_0() parses the iommu-map property by reading it
into an array of a hardcoded 4-element structure:
struct {
u32 bdf;
u32 phandle;
u32 smmu_sid;
u32 smmu_sid_len;
} *map;
Because the driver assumes each entry is exactly 4 cells (16 bytes), updating
the device tree to pass 5 cells per entry misaligns the driver's iteration for
any entry after the first.
For example, when reading the second entry, will the driver read the 5th cell
of the first entry as the BDF, and the phandle of the second entry as the SID,
programming the hardware translation table with garbage?
[Severity: Medium]
This is a pre-existing issue, but other Qualcomm device trees targeting
apps_smmu seem to still have the malformed 4-cell iommu-map entries that were
missed in this patch.
For instance, in arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts:
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>;
and similarly in qcs6490-rb3gen2.dts. Will these unpatched device trees
continue to trigger the OF core parsing warnings on boot?
>
> resets = <&gcc GCC_PCIE_0_BCR>;
> reset-names = "pci";
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=9
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 10/22] arm64: dts: qcom: sm8550: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (8 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 09/22] arm64: dts: qcom: sm8450: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 13:39 ` Neil Armstrong
2026-07-30 11:55 ` [PATCH 11/22] arm64: dts: qcom: sm8650: " Manivannan Sadhasivam via B4 Relay
` (13 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 7d1158c984d3 ("arm64: dts: qcom: sm8550: Add PCIe PHYs and controllers nodes")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 396201905ef2..69babd26c678 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -2382,8 +2382,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
msi-map = <0x0 &gic_its 0x1400 0x1>,
<0x100 &gic_its 0x1401 0x1>;
- iommu-map = <0x0 &apps_smmu 0x1400 0x1>,
- <0x100 &apps_smmu 0x1401 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1400 0x0 0x1>,
+ <0x100 &apps_smmu 0x1401 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
@@ -2561,8 +2561,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
msi-map = <0x0 &gic_its 0x1480 0x1>,
<0x100 &gic_its 0x1481 0x1>;
- iommu-map = <0x0 &apps_smmu 0x1480 0x1>,
- <0x100 &apps_smmu 0x1481 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1480 0x0 0x1>,
+ <0x100 &apps_smmu 0x1481 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>,
<&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 10/22] arm64: dts: qcom: sm8550: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 10/22] arm64: dts: qcom: sm8550: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 13:39 ` Neil Armstrong
0 siblings, 0 replies; 36+ messages in thread
From: Neil Armstrong @ 2026-07-30 13:39 UTC (permalink / raw)
To: manivannan.sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio
On 7/30/26 13:55, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>
> The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
> iommu-map entries specify only one cell for the SID, omitting the SID
> mask. This went unnoticed until the OF core started warning with commit
> ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
>
> iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
>
> So fix the entries to match the provider's '#iommu-cells' property.
>
> Fixes: 7d1158c984d3 ("arm64: dts: qcom: sm8550: Add PCIe PHYs and controllers nodes")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/sm8550.dtsi | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> index 396201905ef2..69babd26c678 100644
> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> @@ -2382,8 +2382,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>
> msi-map = <0x0 &gic_its 0x1400 0x1>,
> <0x100 &gic_its 0x1401 0x1>;
> - iommu-map = <0x0 &apps_smmu 0x1400 0x1>,
> - <0x100 &apps_smmu 0x1401 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1400 0x0 0x1>,
> + <0x100 &apps_smmu 0x1401 0x0 0x1>;
>
> resets = <&gcc GCC_PCIE_0_BCR>;
> reset-names = "pci";
> @@ -2561,8 +2561,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>
> msi-map = <0x0 &gic_its 0x1480 0x1>,
> <0x100 &gic_its 0x1481 0x1>;
> - iommu-map = <0x0 &apps_smmu 0x1480 0x1>,
> - <0x100 &apps_smmu 0x1481 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x1480 0x0 0x1>,
> + <0x100 &apps_smmu 0x1481 0x0 0x1>;
>
> resets = <&gcc GCC_PCIE_1_BCR>,
> <&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 11/22] arm64: dts: qcom: sm8650: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (9 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 10/22] arm64: dts: qcom: sm8550: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 13:39 ` Neil Armstrong
2026-07-30 11:55 ` [PATCH 12/22] arm64: dts: qcom: sm8750: " Manivannan Sadhasivam via B4 Relay
` (12 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 160ead25ecf7..eabceb7d6904 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -3626,8 +3626,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
operating-points-v2 = <&pcie0_opp_table>;
- iommu-map = <0 &apps_smmu 0x1400 0x1>,
- <0x100 &apps_smmu 0x1401 0x1>;
+ iommu-map = <0 &apps_smmu 0x1400 0x0 0x1>,
+ <0x100 &apps_smmu 0x1401 0x0 0x1>;
interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH 0>,
<0 0 0 2 &intc 0 0 GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH 0>,
@@ -3819,8 +3819,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
operating-points-v2 = <&pcie1_opp_table>;
- iommu-map = <0 &apps_smmu 0x1480 0x1>,
- <0x100 &apps_smmu 0x1481 0x1>;
+ iommu-map = <0 &apps_smmu 0x1480 0x0 0x1>,
+ <0x100 &apps_smmu 0x1481 0x0 0x1>;
interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH 0>,
<0 0 0 2 &intc 0 0 GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH 0>,
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 11/22] arm64: dts: qcom: sm8650: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 11/22] arm64: dts: qcom: sm8650: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 13:39 ` Neil Armstrong
0 siblings, 0 replies; 36+ messages in thread
From: Neil Armstrong @ 2026-07-30 13:39 UTC (permalink / raw)
To: manivannan.sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio
On 7/30/26 13:55, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>
> The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
> iommu-map entries specify only one cell for the SID, omitting the SID
> mask. This went unnoticed until the OF core started warning with commit
> ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
>
> iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
>
> So fix the entries to match the provider's '#iommu-cells' property.
>
> Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes")
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/sm8650.dtsi | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> index 160ead25ecf7..eabceb7d6904 100644
> --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
> @@ -3626,8 +3626,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>
> operating-points-v2 = <&pcie0_opp_table>;
>
> - iommu-map = <0 &apps_smmu 0x1400 0x1>,
> - <0x100 &apps_smmu 0x1401 0x1>;
> + iommu-map = <0 &apps_smmu 0x1400 0x0 0x1>,
> + <0x100 &apps_smmu 0x1401 0x0 0x1>;
>
> interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH 0>,
> <0 0 0 2 &intc 0 0 GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH 0>,
> @@ -3819,8 +3819,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
>
> operating-points-v2 = <&pcie1_opp_table>;
>
> - iommu-map = <0 &apps_smmu 0x1480 0x1>,
> - <0x100 &apps_smmu 0x1481 0x1>;
> + iommu-map = <0 &apps_smmu 0x1480 0x0 0x1>,
> + <0x100 &apps_smmu 0x1481 0x0 0x1>;
>
> interrupt-map = <0 0 0 1 &intc 0 0 GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH 0>,
> <0 0 0 2 &intc 0 0 GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH 0>,
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 12/22] arm64: dts: qcom: sm8750: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (10 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 11/22] arm64: dts: qcom: sm8650: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 13/22] arm64: dts: qcom: talos: " Manivannan Sadhasivam via B4 Relay
` (11 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 19f1395333f8 ("arm64: dts: qcom: sm8750: Add PCIe PHY and controller node")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm8750.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qcom/sm8750.dtsi
index fafed417c66f..a858b15f991a 100644
--- a/arch/arm64/boot/dts/qcom/sm8750.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi
@@ -5280,8 +5280,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
interconnect-names = "pcie-mem",
"cpu-pcie";
- iommu-map = <0x0 &apps_smmu 0x1400 0x1>,
- <0x100 &apps_smmu 0x1401 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1400 0x0 0x1>,
+ <0x100 &apps_smmu 0x1401 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 13/22] arm64: dts: qcom: talos: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (11 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 12/22] arm64: dts: qcom: sm8750: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:07 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 14/22] arm64: dts: qcom: lemans: " Manivannan Sadhasivam via B4 Relay
` (10 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 718cc7542a00 ("arm64: dts: qcom: qcs615: enable pcie")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/talos.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom/talos.dtsi
index fb1bbc51bb8a..76b1e86b57b0 100644
--- a/arch/arm64/boot/dts/qcom/talos.dtsi
+++ b/arch/arm64/boot/dts/qcom/talos.dtsi
@@ -1349,8 +1349,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
&config_noc SLAVE_PCIE_0 QCOM_ICC_TAG_ACTIVE_ONLY>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &apps_smmu 0x400 0x1>,
- <0x100 &apps_smmu 0x401 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x400 0x0 0x1>,
+ <0x100 &apps_smmu 0x401 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>;
reset-names = "pci";
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 13/22] arm64: dts: qcom: talos: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 13/22] arm64: dts: qcom: talos: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:07 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:07 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: conor+dt, devicetree, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding the SID mask to `iommu-map` changes the entry size to 5 cells, which misaligns with the PCIe driver's hardcoded 4-cell parsing struct, causing incorrect hardware configuration.
--
--- Patch [13]: [PATCH 13/22] arm64: dts: qcom: talos: Fix the PCIe iommu-map entries ---
commit 398a25f1ebfa492fb313949f16b10fc5fb1ad185
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: talos: Fix the PCIe iommu-map entries
This commit modifies the PCIe iommu-map entries to add an extra cell (the
SID mask) to match the apps_smmu provider's #iommu-cells property. This
addresses an OF core warning about 1-cell entries targeting 2-cell outputs.
> diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom/talos.dtsi
> index fb1bbc51bb8a4..76b1e86b57b07 100644
> --- a/arch/arm64/boot/dts/qcom/talos.dtsi
> +++ b/arch/arm64/boot/dts/qcom/talos.dtsi
> @@ -1349,8 +1349,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
> &config_noc SLAVE_PCIE_0 QCOM_ICC_TAG_ACTIVE_ONLY>;
> interconnect-names = "pcie-mem", "cpu-pcie";
>
> - iommu-map = <0x0 &apps_smmu 0x400 0x1>,
> - <0x100 &apps_smmu 0x401 0x1>;
> + iommu-map = <0x0 &apps_smmu 0x400 0x0 0x1>,
> + <0x100 &apps_smmu 0x401 0x0 0x1>;
[Severity: High]
Does adding the SID mask cause a regression in the PCIe controller driver's
parsing of this property?
Looking at drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_config_sid_1_9_0(),
the driver appears to expect each iommu-map entry to be exactly 4 u32 cells:
struct {
u32 bdf;
u32 phandle;
u32 smmu_sid;
u32 smmu_sid_len;
} *map;
When it reads the property into this array via of_property_read_u32_array(),
the new 5-cell entries will cause the parsing to misalign.
For the second entry (BDF 0x100), the driver will read the previous entry's
length (0x1) as the BDF, the rid-base (0x100) as the phandle, and the phandle
as the smmu_sid. Could this result in corrupted hardware programming for downstream
PCIe devices?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=13
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 14/22] arm64: dts: qcom: lemans: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (12 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 13/22] arm64: dts: qcom: talos: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 15/22] arm64: dts: qcom: monaco: " Manivannan Sadhasivam via B4 Relay
` (9 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider pcie_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 489f14be0e0a ("arm64: dts: qcom: sa8775p: Add pcie0 and pcie1 nodes")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/lemans.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
index 353a6e6fd3ac..47d26dd832f7 100644
--- a/arch/arm64/boot/dts/qcom/lemans.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
@@ -2760,8 +2760,8 @@ pcie0: pcie@1c00000 {
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_0 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
- <0x100 &pcie_smmu 0x0001 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0000 0x0 0x1>,
+ <0x100 &pcie_smmu 0x0001 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>,
<&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
@@ -2933,8 +2933,8 @@ pcie1: pcie@1c10000 {
<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_PCIE_1 0>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &pcie_smmu 0x0080 0x1>,
- <0x100 &pcie_smmu 0x0081 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0080 0x0 0x1>,
+ <0x100 &pcie_smmu 0x0081 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>,
<&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 15/22] arm64: dts: qcom: monaco: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (13 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 14/22] arm64: dts: qcom: lemans: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:25 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 16/22] arm64: dts: qcom: monaco-monza-som: " Manivannan Sadhasivam via B4 Relay
` (8 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider pcie_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 46a7c01e7e9d ("arm64: dts: qcom: qcs8300: enable pcie0")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
index e4c8466f941b..799d13d7558f 100644
--- a/arch/arm64/boot/dts/qcom/monaco.dtsi
+++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
@@ -2349,8 +2349,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
interconnect-names = "pcie-mem",
"cpu-pcie";
- iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
- <0x100 &pcie_smmu 0x0001 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0000 0x0 0x1>,
+ <0x100 &pcie_smmu 0x0001 0x0 0x1>;
resets = <&gcc GCC_PCIE_0_BCR>,
<&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
@@ -2526,8 +2526,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
&config_noc SLAVE_PCIE_1 QCOM_ICC_TAG_ACTIVE_ONLY>;
interconnect-names = "pcie-mem", "cpu-pcie";
- iommu-map = <0x0 &pcie_smmu 0x0080 0x1>,
- <0x100 &pcie_smmu 0x0081 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0080 0x0 0x1>,
+ <0x100 &pcie_smmu 0x0081 0x0 0x1>;
resets = <&gcc GCC_PCIE_1_BCR>,
<&gcc GCC_PCIE_1_LINK_DOWN_BCR>;
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 15/22] arm64: dts: qcom: monaco: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 15/22] arm64: dts: qcom: monaco: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:25 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:25 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] Incomplete fix for malformed `iommu-map` entries. The patch series fixes base DTSI files (e.g., `monaco.dtsi`, `lemans.dtsi`) to provide 5-cell `iommu-map` entries when targeting an IOMMU with `#iommu-cells = <2>`. However, it misses board and overlay files that explicitly override `iommu-map` with the old broken 4-cell format. Because these overrides shadow the base DT configuration, compiling these specific boards will still result in the exact same `of: Respect #{iommu,msi}-cells in maps` warning the series intends to resolve.
--
--- Patch [15]: [PATCH 15/22] arm64: dts: qcom: monaco: Fix the PCIe iommu-map entries ---
commit fe3050666c02dc7e846b1c3b4ae001c0063dea37
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: monaco: Fix the PCIe iommu-map entries
This patch updates the PCIe iommu-map entries in monaco.dtsi to use 5 cells,
adding the missing SID mask. This matches the IOMMU provider's
#iommu-cells = <2> property and prevents a warning from the OF core.
> diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qcom/monaco.dtsi
> index e4c8466f941bd..799d13d7558f3 100644
> --- a/arch/arm64/boot/dts/qcom/monaco.dtsi
> +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi
> @@ -2349,8 +2349,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
> interconnect-names = "pcie-mem",
> "cpu-pcie";
>
> - iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
> - <0x100 &pcie_smmu 0x0001 0x1>;
> + iommu-map = <0x0 &pcie_smmu 0x0000 0x0 0x1>,
> + <0x100 &pcie_smmu 0x0001 0x0 0x1>;
[Severity: Medium]
This isn't a bug introduced by this patch, but this fix appears to be
incomplete. Board and overlay files explicitly override iommu-map using the
old 4-cell format, which will shadow this base DT fix and still trigger the
OF core warning.
For example, in arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi:&pcie0:
iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
In arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso:&pcie0:
iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
And in arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso:&pcie0:
iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
Should these files also be updated to use the 5-cell format?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=15
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 16/22] arm64: dts: qcom: monaco-monza-som: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (14 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 15/22] arm64: dts: qcom: monaco: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:55 ` [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: " Manivannan Sadhasivam via B4 Relay
` (7 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider pcie_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 5238f4e7169f ("arm64: dts: qcom: Add Monaco Monza SoM")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi b/arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi
index 9b5ed55939b8..36af1ad2105d 100644
--- a/arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi
+++ b/arch/arm64/boot/dts/qcom/monaco-monza-som.dtsi
@@ -196,14 +196,14 @@ &iris {
/* PCIe0 Gen4 x2 */
&pcie0 {
- iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
- <0x100 &pcie_smmu 0x0001 0x1>,
- <0x200 &pcie_smmu 0x0007 0x1>,
- <0x208 &pcie_smmu 0x0002 0x1>,
- <0x210 &pcie_smmu 0x0003 0x1>,
- <0x218 &pcie_smmu 0x0004 0x1>,
- <0x300 &pcie_smmu 0x0005 0x1>,
- <0x400 &pcie_smmu 0x0006 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0000 0x0 0x1>,
+ <0x100 &pcie_smmu 0x0001 0x0 0x1>,
+ <0x200 &pcie_smmu 0x0007 0x0 0x1>,
+ <0x208 &pcie_smmu 0x0002 0x0 0x1>,
+ <0x210 &pcie_smmu 0x0003 0x0 0x1>,
+ <0x218 &pcie_smmu 0x0004 0x0 0x1>,
+ <0x300 &pcie_smmu 0x0005 0x0 0x1>,
+ <0x400 &pcie_smmu 0x0006 0x0 0x1>;
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (15 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 16/22] arm64: dts: qcom: monaco-monza-som: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:09 ` sashiko-bot
2026-07-30 11:55 ` [PATCH 18/22] arm64: dts: qcom: lemans-evk-ifp-mezzanine: " Manivannan Sadhasivam via B4 Relay
` (6 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider pcie_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 5a67924d2fc5 ("arm64: dts: qcom: monaco-evk: Add IFP Mezzanine")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso b/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
index e6beb4393430..a6e57ec8a1e1 100644
--- a/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
@@ -50,15 +50,15 @@ nvmem-layout {
};
&pcie0 {
- iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
- <0x100 &pcie_smmu 0x1 0x1>,
- <0x208 &pcie_smmu 0x2 0x1>,
- <0x210 &pcie_smmu 0x3 0x1>,
- <0x218 &pcie_smmu 0x4 0x1>,
- <0x300 &pcie_smmu 0x5 0x1>,
- <0x400 &pcie_smmu 0x6 0x1>,
- <0x500 &pcie_smmu 0x7 0x1>,
- <0x501 &pcie_smmu 0x8 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0 0x0 0x1>,
+ <0x100 &pcie_smmu 0x1 0x0 0x1>,
+ <0x208 &pcie_smmu 0x2 0x0 0x1>,
+ <0x210 &pcie_smmu 0x3 0x0 0x1>,
+ <0x218 &pcie_smmu 0x4 0x0 0x1>,
+ <0x300 &pcie_smmu 0x5 0x0 0x1>,
+ <0x400 &pcie_smmu 0x6 0x0 0x1>,
+ <0x500 &pcie_smmu 0x7 0x0 0x1>,
+ <0x501 &pcie_smmu 0x8 0x0 0x1>;
};
&pcieport0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: Fix the PCIe iommu-map entries
2026-07-30 11:55 ` [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:09 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:09 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] The fix for 4-cell `iommu-map` entries is incomplete across the tree. Identical incorrect entries targeting IOMMUs with `#iommu-cells = <2>` remain in other related device trees (e.g., `lemans-evk-ifp-mezzanine.dtso` and `qcs6490-*.dts`).
--
--- Patch [17]: [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: Fix the PCIe iommu-map entries ---
commit 24efdfda849da979474e77045094935d85b3ae7b
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: monaco-evk-ifp-mezzanine: Fix the PCIe iommu-map entries
This commit fixes the iommu-map entries for the pcie0 node in the
monaco-evk-ifp-mezzanine device tree. It adds the missing SID mask cell to
each entry to match the 2-cell requirement of the pcie_smmu provider,
resolving a warning from the OF core during boot.
> diff --git a/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso b/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
> index e6beb4393430b..a6e57ec8a1e14 100644
> --- a/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
> +++ b/arch/arm64/boot/dts/qcom/monaco-evk-ifp-mezzanine.dtso
> @@ -50,15 +50,15 @@ nvmem-layout {
> };
>
> &pcie0 {
> - iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
> - <0x100 &pcie_smmu 0x1 0x1>,
[Severity: Medium]
This is a pre-existing issue, but this fix appears to be incomplete across
the tree.
Identical 4-cell iommu-map entries targeting 2-cell #iommu-cells providers
remain in other related device trees, such as:
arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso in pcie0:
iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts in pcie1:
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts in pcie1:
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
These will likely trigger the same OF core warning mentioned in the commit
message. Should these other files be updated in this patch or a follow-up
series?
> - <0x208 &pcie_smmu 0x2 0x1>,
> - <0x210 &pcie_smmu 0x3 0x1>,
> - <0x218 &pcie_smmu 0x4 0x1>,
> - <0x300 &pcie_smmu 0x5 0x1>,
> - <0x400 &pcie_smmu 0x6 0x1>,
> - <0x500 &pcie_smmu 0x7 0x1>,
> - <0x501 &pcie_smmu 0x8 0x1>;
> + iommu-map = <0x0 &pcie_smmu 0x0 0x0 0x1>,
> + <0x100 &pcie_smmu 0x1 0x0 0x1>,
> + <0x208 &pcie_smmu 0x2 0x0 0x1>,
> + <0x210 &pcie_smmu 0x3 0x0 0x1>,
> + <0x218 &pcie_smmu 0x4 0x0 0x1>,
> + <0x300 &pcie_smmu 0x5 0x0 0x1>,
> + <0x400 &pcie_smmu 0x6 0x0 0x1>,
> + <0x500 &pcie_smmu 0x7 0x0 0x1>,
> + <0x501 &pcie_smmu 0x8 0x0 0x1>;
> };
>
> &pcieport0 {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=17
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 18/22] arm64: dts: qcom: lemans-evk-ifp-mezzanine: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (16 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 17/22] arm64: dts: qcom: monaco-evk-ifp-mezzanine: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:55 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:56 ` [PATCH 19/22] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: " Manivannan Sadhasivam via B4 Relay
` (5 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:55 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider pcie_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: b64abb26a291 ("arm64: dts: qcom: lemans-evk: Add IFP Mezzanine")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
index 44bd9b1a1765..22c975628ed7 100644
--- a/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/lemans-evk-ifp-mezzanine.dtso
@@ -204,15 +204,15 @@ &mdss1_dp1_phy {
};
&pcie0 {
- iommu-map = <0x0 &pcie_smmu 0x0 0x1>,
- <0x100 &pcie_smmu 0x1 0x1>,
- <0x208 &pcie_smmu 0x2 0x1>,
- <0x210 &pcie_smmu 0x3 0x1>,
- <0x218 &pcie_smmu 0x4 0x1>,
- <0x300 &pcie_smmu 0x5 0x1>,
- <0x400 &pcie_smmu 0x6 0x1>,
- <0x500 &pcie_smmu 0x7 0x1>,
- <0x501 &pcie_smmu 0x8 0x1>;
+ iommu-map = <0x0 &pcie_smmu 0x0 0x0 0x1>,
+ <0x100 &pcie_smmu 0x1 0x0 0x1>,
+ <0x208 &pcie_smmu 0x2 0x0 0x1>,
+ <0x210 &pcie_smmu 0x3 0x0 0x1>,
+ <0x218 &pcie_smmu 0x4 0x0 0x1>,
+ <0x300 &pcie_smmu 0x5 0x0 0x1>,
+ <0x400 &pcie_smmu 0x6 0x0 0x1>,
+ <0x500 &pcie_smmu 0x7 0x0 0x1>,
+ <0x501 &pcie_smmu 0x8 0x0 0x1>;
};
&pcieport0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 19/22] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (17 preceding siblings ...)
2026-07-30 11:55 ` [PATCH 18/22] arm64: dts: qcom: lemans-evk-ifp-mezzanine: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:56 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 11:56 ` [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: " Manivannan Sadhasivam via B4 Relay
` (4 subsequent siblings)
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: ef254b12ec60 ("arm64: dts: qcom: qcs6490: Introduce Radxa Dragon Q6A")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts b/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
index bb5a42b038f1..696fef50f577 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts
@@ -546,15 +546,15 @@ &pcie1 {
pinctrl-names = "default";
/* Support for QPS615 PCIe switch */
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>,
- <0x208 &apps_smmu 0x1c84 0x1>,
- <0x210 &apps_smmu 0x1c85 0x1>,
- <0x218 &apps_smmu 0x1c86 0x1>,
- <0x300 &apps_smmu 0x1c87 0x1>,
- <0x400 &apps_smmu 0x1c88 0x1>,
- <0x500 &apps_smmu 0x1c89 0x1>,
- <0x501 &apps_smmu 0x1c90 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>,
+ <0x208 &apps_smmu 0x1c84 0x0 0x1>,
+ <0x210 &apps_smmu 0x1c85 0x0 0x1>,
+ <0x218 &apps_smmu 0x1c86 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c87 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c88 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c89 0x0 0x1>,
+ <0x501 &apps_smmu 0x1c90 0x0 0x1>;
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (18 preceding siblings ...)
2026-07-30 11:56 ` [PATCH 19/22] arm64: dts: qcom: qcs6490-radxa-dragon-q6a: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:56 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:29 ` sashiko-bot
2026-07-30 11:56 ` [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: " Manivannan Sadhasivam via B4 Relay
` (3 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 1cde54c54b83 ("arm64: dts: qcom: qcs6490: Add Thundercomm AI Mini PC G1 IoT")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
.../boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
index a5ad796cb65d..2fc8987204e9 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
@@ -711,15 +711,15 @@ &pcie1 {
<&pcie1_wake_n>;
pinctrl-names = "default";
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>,
- <0x208 &apps_smmu 0x1c84 0x1>,
- <0x210 &apps_smmu 0x1c85 0x1>,
- <0x218 &apps_smmu 0x1c86 0x1>,
- <0x300 &apps_smmu 0x1c87 0x1>,
- <0x400 &apps_smmu 0x1c88 0x1>,
- <0x500 &apps_smmu 0x1c89 0x1>,
- <0x501 &apps_smmu 0x1c90 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>,
+ <0x208 &apps_smmu 0x1c84 0x0 0x1>,
+ <0x210 &apps_smmu 0x1c85 0x0 0x1>,
+ <0x218 &apps_smmu 0x1c86 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c87 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c88 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c89 0x0 0x1>,
+ <0x501 &apps_smmu 0x1c90 0x0 0x1>;
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: Fix the PCIe iommu-map entries
2026-07-30 11:56 ` [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:29 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:29 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] The patch series successfully fixes incomplete `iommu-map` property entries for `qcs6490-thundercomm-minipc-g1iot.dts` and several other boards, but completely misses identical 4-cell entries targeting a 2-cell IOMMU provider in sibling board and devicetree files. The OF core will continue treating these maps as 1-cell output and emit warnings.
--
--- Patch [20]: [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: Fix the PCIe iommu-map entries ---
commit 8f2a940116e71ca780253365df0150f683e455ed
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: Fix the PCIe iommu-map entries
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps").
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
> --- a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts
> @@ -711,15 +711,15 @@ &pcie1 {
> <&pcie1_wake_n>;
> pinctrl-names = "default";
>
> - iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
> - <0x100 &apps_smmu 0x1c81 0x1>,
[ ... ]
> + iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c81 0x0 0x1>,
> + <0x208 &apps_smmu 0x1c84 0x0 0x1>,
> + <0x210 &apps_smmu 0x1c85 0x0 0x1>,
> + <0x218 &apps_smmu 0x1c86 0x0 0x1>,
> + <0x300 &apps_smmu 0x1c87 0x0 0x1>,
> + <0x400 &apps_smmu 0x1c88 0x0 0x1>,
> + <0x500 &apps_smmu 0x1c89 0x0 0x1>,
> + <0x501 &apps_smmu 0x1c90 0x0 0x1>;
[Severity: Medium]
This is a pre-existing issue, but since you are fixing the missing SID mask
for this board, should the identical malformed entries in other sibling boards
and devicetree files also be updated?
For example, in arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts for pcie1:
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
<0x100 &apps_smmu 0x1c81 0x1>,
In arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso for pcie0
and pcie1:
iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
<0x100 &apps_smmu 0x1c01 0x1>,
And in arch/arm/boot/dts/qcom/qcom-sdx55.dtsi for pcie_rc:
iommu-map = <0x0 &apps_smmu 0x0200 0x1>,
<0x100 &apps_smmu 0x0201 0x1>,
Leaving these unfixed will continue to trigger the OF core warning about
1-cell entries targeting 2-cell #iommu-cells. Would it make sense to
include fixes for these files as well?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=20
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (19 preceding siblings ...)
2026-07-30 11:56 ` [PATCH 20/22] arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:56 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:12 ` sashiko-bot
2026-07-30 11:56 ` [PATCH 22/22] arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: " Manivannan Sadhasivam via B4 Relay
` (2 subsequent siblings)
23 siblings, 1 reply; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 267643b3e3a4 ("arm64: dts: qcom: qcs6490-rb3gen2: Add PCIe nodes")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
index 37a3b51323ce..03fe7d58f6bf 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
@@ -846,15 +846,15 @@ &pcie1 {
pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>, <&pcie1_clkreq_n>;
pinctrl-names = "default";
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>,
- <0x208 &apps_smmu 0x1c84 0x1>,
- <0x210 &apps_smmu 0x1c85 0x1>,
- <0x218 &apps_smmu 0x1c86 0x1>,
- <0x300 &apps_smmu 0x1c87 0x1>,
- <0x400 &apps_smmu 0x1c88 0x1>,
- <0x500 &apps_smmu 0x1c89 0x1>,
- <0x501 &apps_smmu 0x1c90 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>,
+ <0x208 &apps_smmu 0x1c84 0x0 0x1>,
+ <0x210 &apps_smmu 0x1c85 0x0 0x1>,
+ <0x218 &apps_smmu 0x1c86 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c87 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c88 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c89 0x0 0x1>,
+ <0x501 &apps_smmu 0x1c90 0x0 0x1>;
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: Fix the PCIe iommu-map entries
2026-07-30 11:56 ` [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:12 ` sashiko-bot
0 siblings, 0 replies; 36+ messages in thread
From: sashiko-bot @ 2026-07-30 12:12 UTC (permalink / raw)
To: Manivannan Sadhasivam; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] The fix for malformed `iommu-map` entries is incomplete because it misses the `qcs6490-rb3gen2-industrial-mezzanine.dtso` overlay, which contains identically malformed entries.
--
--- Patch [21]: [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: Fix the PCIe iommu-map entries ---
commit b18d2572691fe332011993576c307feac443dbbf
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
arm64: dts: qcom: qcs6490-rb3gen2: Fix the PCIe iommu-map entries
This commit fixes malformed iommu-map entries for PCIe nodes in the
qcs6490-rb3gen2 device tree by adding the missing SID mask cell to match
the apps_smmu provider's 2-cell requirement.
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
[ ... ]
> @@ -846,15 +846,15 @@ &pcie1 {
> pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>, <&pcie1_clkreq_n>;
> pinctrl-names = "default";
>
> - iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
> - <0x100 &apps_smmu 0x1c81 0x1>,
[ ... ]
> + iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
> + <0x100 &apps_smmu 0x1c81 0x0 0x1>,
[Severity: Medium]
This is a pre-existing issue, but does this fix also need to be applied to
the qcs6490-rb3gen2-industrial-mezzanine.dtso overlay?
Looking at the mezzanine overlay file, it appears to contain identically
malformed iommu-map entries missing the 0x0 mask cell for both &pcie0
and &pcie1:
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso:&pcie0 {
...
iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
...
}
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso:&pcie1 {
...
iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
...
}
Will the OF core still warn and potentially misparse these entries when
booting a device with the industrial mezzanine overlay applied?
> + <0x208 &apps_smmu 0x1c84 0x0 0x1>,
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-iommu-map-fix-v1-0-83405d37ba41@oss.qualcomm.com?part=21
^ permalink raw reply [flat|nested] 36+ messages in thread
* [PATCH 22/22] arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (20 preceding siblings ...)
2026-07-30 11:56 ` [PATCH 21/22] arm64: dts: qcom: qcs6490-rb3gen2: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 11:56 ` Manivannan Sadhasivam via B4 Relay
2026-07-30 12:23 ` [PATCH 00/22] arm64: dts: qcom: " Dmitry Baryshkov
2026-07-30 12:46 ` Konrad Dybcio
23 siblings, 0 replies; 36+ messages in thread
From: Manivannan Sadhasivam via B4 Relay @ 2026-07-30 11:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski, Konrad Dybcio, Manivannan Sadhasivam
From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
The IOMMU provider apps_smmu uses '#iommu-cells = <2>', but the PCIe
iommu-map entries specify only one cell for the SID, omitting the SID
mask. This went unnoticed until the OF core started warning with commit
ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
So fix the entries to match the provider's '#iommu-cells' property.
Fixes: 4559b435f741 ("arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: Add TC9563 PCIe switch node for PCIe0")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
.../qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso | 50 +++++++++++-----------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
index 83908db335af..14c64439ae1e 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso
@@ -54,15 +54,15 @@ &pcie0 {
pinctrl-0 = <&pcie0_reset_n>, <&pcie0_wake_n>, <&pcie0_clkreq_n>;
pinctrl-names = "default";
- iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
- <0x100 &apps_smmu 0x1c01 0x1>,
- <0x208 &apps_smmu 0x1c04 0x1>,
- <0x210 &apps_smmu 0x1c05 0x1>,
- <0x218 &apps_smmu 0x1c06 0x1>,
- <0x300 &apps_smmu 0x1c07 0x1>,
- <0x400 &apps_smmu 0x1c08 0x1>,
- <0x500 &apps_smmu 0x1c09 0x1>,
- <0x501 &apps_smmu 0x1c10 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c00 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c01 0x0 0x1>,
+ <0x208 &apps_smmu 0x1c04 0x0 0x1>,
+ <0x210 &apps_smmu 0x1c05 0x0 0x1>,
+ <0x218 &apps_smmu 0x1c06 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c07 0x0 0x1>,
+ <0x400 &apps_smmu 0x1c08 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c09 0x0 0x1>,
+ <0x501 &apps_smmu 0x1c10 0x0 0x1>;
status = "okay";
};
@@ -151,22 +151,22 @@ pci@0,1 {
};
&pcie1 {
- iommu-map = <0x0 &apps_smmu 0x1c80 0x1>,
- <0x100 &apps_smmu 0x1c81 0x1>,
- <0x208 &apps_smmu 0x1c84 0x1>,
- <0x210 &apps_smmu 0x1c85 0x1>,
- <0x218 &apps_smmu 0x1c86 0x1>,
- <0x300 &apps_smmu 0x1c87 0x1>,
- <0x408 &apps_smmu 0x1c90 0x1>,
- <0x410 &apps_smmu 0x1c91 0x1>,
- <0x418 &apps_smmu 0x1c92 0x1>,
- <0x500 &apps_smmu 0x1c93 0x1>,
- <0x600 &apps_smmu 0x1c94 0x1>,
- <0x700 &apps_smmu 0x1c95 0x1>,
- <0x701 &apps_smmu 0x1c96 0x1>,
- <0x800 &apps_smmu 0x1c97 0x1>,
- <0x900 &apps_smmu 0x1c98 0x1>,
- <0x901 &apps_smmu 0x1c99 0x1>;
+ iommu-map = <0x0 &apps_smmu 0x1c80 0x0 0x1>,
+ <0x100 &apps_smmu 0x1c81 0x0 0x1>,
+ <0x208 &apps_smmu 0x1c84 0x0 0x1>,
+ <0x210 &apps_smmu 0x1c85 0x0 0x1>,
+ <0x218 &apps_smmu 0x1c86 0x0 0x1>,
+ <0x300 &apps_smmu 0x1c87 0x0 0x1>,
+ <0x408 &apps_smmu 0x1c90 0x0 0x1>,
+ <0x410 &apps_smmu 0x1c91 0x0 0x1>,
+ <0x418 &apps_smmu 0x1c92 0x0 0x1>,
+ <0x500 &apps_smmu 0x1c93 0x0 0x1>,
+ <0x600 &apps_smmu 0x1c94 0x0 0x1>,
+ <0x700 &apps_smmu 0x1c95 0x0 0x1>,
+ <0x701 &apps_smmu 0x1c96 0x0 0x1>,
+ <0x800 &apps_smmu 0x1c97 0x0 0x1>,
+ <0x900 &apps_smmu 0x1c98 0x0 0x1>,
+ <0x901 &apps_smmu 0x1c99 0x0 0x1>;
};
&pcie1_switch0_dsp1 {
--
2.43.0
^ permalink raw reply related [flat|nested] 36+ messages in thread* Re: [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (21 preceding siblings ...)
2026-07-30 11:56 ` [PATCH 22/22] arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: " Manivannan Sadhasivam via B4 Relay
@ 2026-07-30 12:23 ` Dmitry Baryshkov
2026-07-30 12:46 ` Konrad Dybcio
23 siblings, 0 replies; 36+ messages in thread
From: Dmitry Baryshkov @ 2026-07-30 12:23 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Manivannan Sadhasivam, linux-arm-msm, devicetree, linux-kernel,
Bjorn Andersson, Krzysztof Kozlowski, Konrad Dybcio
On Thu, Jul 30, 2026 at 01:55:41PM +0200, Manivannan Sadhasivam via B4 Relay wrote:
> Several Qualcomm SoCs declare their IOMMU providers like apps_smmu and
> pcie_smmu, with '#iommu-cells = <2>', where the two cells are the SID
> and the SID mask. But the PCIe iommu-map entries on these SoCs specify
> only one output cell for the SID and omit the mask. This went unnoticed
> until the OF core started warning with commit
> ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
>
> iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
>
> So this series fixes the iommu-map entries across the affected SoC, SoM, board
> and overlay files to match the provider's '#iommu-cells' property.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Note, this must be merged only after the commit fixing iommu-maps lands
in the qcom dt tree.
For the series itself:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 36+ messages in thread* Re: [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries
2026-07-30 11:55 [PATCH 00/22] arm64: dts: qcom: Fix the PCIe iommu-map entries Manivannan Sadhasivam via B4 Relay
` (22 preceding siblings ...)
2026-07-30 12:23 ` [PATCH 00/22] arm64: dts: qcom: " Dmitry Baryshkov
@ 2026-07-30 12:46 ` Konrad Dybcio
23 siblings, 0 replies; 36+ messages in thread
From: Konrad Dybcio @ 2026-07-30 12:46 UTC (permalink / raw)
To: manivannan.sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Manivannan Sadhasivam
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Krzysztof Kozlowski
On 7/30/26 1:55 PM, Manivannan Sadhasivam via B4 Relay wrote:
> Several Qualcomm SoCs declare their IOMMU providers like apps_smmu and
> pcie_smmu, with '#iommu-cells = <2>', where the two cells are the SID
> and the SID mask. But the PCIe iommu-map entries on these SoCs specify
> only one output cell for the SID and omit the mask. This went unnoticed
> until the OF core started warning with commit
> ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps"):
>
> iommu-map has 1-cell entries targeting 2-cell #iommu-cells, treating as 1-cell output
>
> So this series fixes the iommu-map entries across the affected SoC, SoM, board
> and overlay files to match the provider's '#iommu-cells' property.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 36+ messages in thread