]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu-v3: Propagate ssid_bits
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 15 Jan 2020 12:52:34 +0000 (13:52 +0100)
committerWill Deacon <will@kernel.org>
Wed, 15 Jan 2020 16:05:53 +0000 (16:05 +0000)
commit20d0c4436423d510f939461f6ef10fb78da84509
treed79b073410ed08c79d535116d55a6430110ad680
parentecaf7421bb40f42793bfdce132a345a864435c89
iommu/arm-smmu-v3: Propagate ssid_bits

Now that we support substream IDs, initialize s1cdmax with the number of
SSID bits supported by a master and the SMMU.

Context descriptor tables are allocated once for the first master
attached to a domain. Therefore attaching multiple devices with
different SSID sizes is tricky, and we currently don't support it.

As a future improvement it would be nice to at least support attaching a
SSID-capable device to a domain that isn't using SSID, by reallocating
the SSID table. This would allow supporting a SSID-capable device that
is in the same IOMMU group as a bridge, for example. Varying SSID size
is less of a concern, since the PCIe specification "highly recommends"
that devices supporting PASID implement all 20 bits of it.

Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm-smmu-v3.c