This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does Linux IOMMU subsystem support that "a device have mulitple master interfaces to multiple IOMMU devices"?

Hello. Community members.

Today I have a question on the configuration of device tree about SMMU.

We are developing a device that has several MMU-600 devices. each MMU-600 device is connected to multiple masters. 

We want to use  IOMMU subsystem in the Linux kernel to use SMMUs of our device.

I found a text from <www.kernel.org/.../iommu.txt>

"Devices that access memory through an IOMMU are called masters. A device can have multiple master interfaces (to one or more IOMMU devices)."

from the above comment, I was wondering if the following device tree configuration works well with Linux kernels.

device tree code example (our device has 8 SMMU devices and each SMMU device has 8 masters, totally our device has 64 master interfaces to 8 IOMMU devices)

  smmu0 {

   #iommu-cells = <1>;

  };

.

.

  smmu7 {

  /* the specifier represents the ID of the master */

  #iommu-cells = <1>;

  };

  our-device@50000000 {

  /* our device has master IDs 0~7 in the SMMU0, 0~7 in SMMU1, .. 0~7 in SMMU7 */

  iommus = <&{/smmu0} 0>, <&{/smmu0} 1>, <&{/smmu0} 2>, .. , <&{/smmu0} 7>,

                                            <&{/smmu1} 0>, <&{/smmu1} 1>, <&{/smmu1} 2>, .. , <&{/smmu1} 7>,

  <&{/smmu2} 0>, <&{/smmu2} 1>, <&{/smmu2} 2>, .. , <&{/smmu2} 7>,

  <&{/smmu3} 0>, <&{/smmu3} 1>, <&{/smmu3} 2>, .. , <&{/smmu3} 7>,

  <&{/smmu4} 0>, <&{/smmu4} 1>, <&{/smmu4} 2>, .. , <&{/smmu4} 7>,

  <&{/smmu5} 0>, <&{/smmu5} 1>, <&{/smmu5} 2>, .. , <&{/smmu5} 7>,

  <&{/smmu6} 0>, <&{/smmu6} 1>, <&{/smmu6} 2>, .. , <&{/smmu6} 7>,

  <&{/smmu7} 0>, <&{/smmu7} 1>, <&{/smmu7} 2>, .. , <&{/smmu7} 7>;

  };

Thanks in advance.