iommu/arm-smmu: add support for multi-master iommu groups
authorWill Deacon <will.deacon@arm.com>
Tue, 15 Jul 2014 10:27:08 +0000 (11:27 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 16 Sep 2014 18:14:16 +0000 (19:14 +0100)
Whilst the driver currently creates one IOMMU group per device, this
will soon change when we start supporting non-transparent PCI bridges
which require all upstream masters to be assigned to the same address
space.

This patch reworks our IOMMU group code so that we can easily support
multi-master groups. The master configuration (streamids and smrs) is
stored as private iommudata on the group, whilst the low-level attach/detach
code is updated to avoid double alloc/free when dealing with multiple
masters sharing the same SMMU configuration. This unifies device
handling, regardless of whether the device sits on the platform or pci
bus.

Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c

Simple merge