Skip to contentSkip to conversation

dt-bindings: PCI: host-generic-pci: Allow IOMMU and MSI properties

PATCH Applied Rob Herring 3 participants 6 messages Jul 28, 2022 – Aug 3, 2022

Subsystems (4)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: PCI: host-generic-pci: Allow IOMMU and MSI properties

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

---
 Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +3 -0
index 6bcaa8f2c3cf..d25423aa7167 100644
@@ -106,6 +106,9 @@ properties:
     maxItems: 3
 
   dma-coherent: true
+  iommu-map: true
+  iommu-map-mask: true
+  msi-parent: true
 
 required:
   - compatible
Signature · 1 line
2.34.1
#1 lore raw
Quoted 5 lines · Rob Herring

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

I assume you'll merge this, Rob? Let me know if you want me to.

Quoted 26 lines
---
 Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +3 -0
index 6bcaa8f2c3cf..d25423aa7167 100644
@@ -106,6 +106,9 @@ properties:
     maxItems: 3
 
   dma-coherent: true
+  iommu-map: true
+  iommu-map-mask: true
+  msi-parent: true
 
 required:
   - compatible
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

---
 Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
 1 file changed, 3 insertions(+)

Applied, thanks!

#3 lore raw
In reply to Rob Herring
Quoted 14 lines · Rob Herring

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

---
  Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
  1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +0 -0
index 6bcaa8f2c3cf..d25423aa7167 100644

Documentation/devicetree/bindings/pci/host-generic-pci.yaml properties: · line 111

Quoted 6 lines
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +3 -0
@@ -106,6 +106,9 @@ properties:
      maxItems: 3
 
    dma-coherent: true
+  iommu-map: true
+  iommu-map-mask: true
+  msi-parent: true

Hmm, in general this set looks suspiciously incomplete without msi-map and msi-map-mask too. Am I right in thinking that the ideal thing to do here would be to convert pci-msi.txt and pci-iommu.txt to schema and $ref them?

Robin.

Quoted 3 lines
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +0 -0
  required:
    - compatible
author maintainer
#4 lore raw
Quoted 18 lines · Robin Murphy
Quoted 16 lines · Rob Herring

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

---
  Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
  1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +0 -0
index 6bcaa8f2c3cf..d25423aa7167 100644
@@ -106,6 +106,9 @@ properties:
      maxItems: 3
 
Quoted 9 lines

Documentation/devicetree/bindings/pci/host-generic-pci.yaml properties: · line 111

Quoted 4 lines
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +3 -0
    dma-coherent: true
+  iommu-map: true
+  iommu-map-mask: true
+  msi-parent: true

Hmm, in general this set looks suspiciously incomplete without msi-map and msi-map-mask too. Am I right in thinking that the ideal thing to do here would be to convert pci-msi.txt and pci-iommu.txt to schema and $ref them?

I already added msi-map/msi-map-mask to pci-bus.yaml[1] as well as schemas for iommu-map/iommu-map-mask[2] and msi-parent[3]. Since msi-map is already in the referenced schema, it is allowed here. msi-parent is separate because it is used elsewhere. iommu-map is separate largely to make copying pci-iommu.txt as-is easier.

And yes, pci-iommu.txt can now be removed. pci-msi.txt is more complicated as all of it hasn't been moved into schemas.

Rob

[1] https://github.com/devicetree-org/dt-schema/commit/109bde712466281e8c96a4fadb0f68e7a90a6eca
[2] https://github.com/devicetree-org/dt-schema/commit/3d44bf2b46a9ac638550ca3916d7d7f70823bb58
[3] https://github.com/devicetree-org/dt-schema/commit/59f2e3103b6e776afe4f42e45897f7eabae06fa4

#5 lore raw
Quoted 29 lines · Rob Herring
Quoted 18 lines · Robin Murphy
Quoted 16 lines · Rob Herring

Allow 'iommu-map', 'iommu-map-mask', and 'msi-parent' properties for generic host. This fixes unevaluated property warnings on Arm Juno, AMD Seattle, and FSL LS1028a.

---
   Documentation/devicetree/bindings/pci/host-generic-pci.yaml | 3 +++
   1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +0 -0
index 6bcaa8f2c3cf..d25423aa7167 100644
@@ -106,6 +106,9 @@ properties:
       maxItems: 3
 
Quoted 9 lines

Documentation/devicetree/bindings/pci/host-generic-pci.yaml properties: · line 111

Quoted 4 lines
Documentation/devicetree/bindings/pci/host-generic-pci.yaml +3 -0
     dma-coherent: true
+  iommu-map: true
+  iommu-map-mask: true
+  msi-parent: true

Hmm, in general this set looks suspiciously incomplete without msi-map and msi-map-mask too. Am I right in thinking that the ideal thing to do here would be to convert pci-msi.txt and pci-iommu.txt to schema and $ref them?

Quoted 8 lines

I already added msi-map/msi-map-mask to pci-bus.yaml[1] as well as schemas for iommu-map/iommu-map-mask[2] and msi-parent[3]. Since msi-map is already in the referenced schema, it is allowed here. msi-parent is separate because it is used elsewhere. iommu-map is separate largely to make copying pci-iommu.txt as-is easier.

And yes, pci-iommu.txt can now be removed. pci-msi.txt is more complicated as all of it hasn't been moved into schemas.

Ah, great! One general comment, though - iommu-map/msi-map have pretty much grown into common IOMMU/MSI consumer properties by now, so IMO they'd be better off living alongside their respective iommus/msi-parent counterparts, so that other consumers like fsl-mc and host1x can reference a common definition rather than duplicating their own. The only aspect that should still belong to the PCI binding is the detail of how PCI B:D:F forms the input ID for the mappings (and equivalently for other bus bindings).

Thanks,
Robin.

Quoted 6 lines

Rob

[1] https://github.com/devicetree-org/dt-schema/commit/109bde712466281e8c96a4fadb0f68e7a90a6eca
[2] https://github.com/devicetree-org/dt-schema/commit/3d44bf2b46a9ac638550ca3916d7d7f70823bb58
[3] https://github.com/devicetree-org/dt-schema/commit/59f2e3103b6e776afe4f42e45897f7eabae06fa4