OSDN Git Service

iommu/tegra: Allow devices to be grouped
authorThierry Reding <treding@nvidia.com>
Thu, 12 Oct 2017 14:19:16 +0000 (16:19 +0200)
committerThierry Reding <treding@nvidia.com>
Fri, 15 Dec 2017 09:12:32 +0000 (10:12 +0100)
commit7f4c9176f760f4006af9f0863403f977a0bb3c52
treecd84cf3588e01d80726db4d3702b8fce2a79dce9
parent2a8102dfe0da7dbb61794e6b85dc7ac9271e5fc8
iommu/tegra: Allow devices to be grouped

Implement the ->device_group() and ->of_xlate() callbacks which are used
in order to group devices. Each group can then share a single domain.

This is implemented primarily in order to achieve the same semantics on
Tegra210 and earlier as on Tegra186 where the Tegra SMMU was replaced by
an ARM SMMU. Users of the IOMMU API can now use the same code to share
domains between devices, whereas previously they used to attach each
device individually.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/iommu/tegra-smmu.c