iommu/arm-smmu: Don't allocate resources for bypass domains
authorRobin Murphy <robin.murphy@arm.com>
Wed, 20 Apr 2016 13:53:33 +0000 (14:53 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 21 Apr 2016 14:47:32 +0000 (16:47 +0200)
commit9800699c645952da6a7399194d3e762b84cde3cd
tree14365ce42655652ef3e4a990385745bcce1b91ff
parent5f634956cc550768ebd75cf26fdba01044bc600e
iommu/arm-smmu: Don't allocate resources for bypass domains

Until we get fully plumbed into of_iommu_configure, our default
IOMMU_DOMAIN_DMA domains just bypass translation. Since we achieve that
by leaving the stream table entries set to bypass instead of pointing at
a translation context, the context bank we allocate for the domain is
completely wasted. Context banks are typically a rather limited
resource, so don't hog ones we don't need.

Reported-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm-smmu.c