summaryrefslogtreecommitdiff
path: root/arch/arm64/mm
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2016-07-25 15:45:51 -0700
committerLiam Mark <lmark@codeaurora.org>2016-08-01 13:49:20 -0700
commit805f58d1f5abaa4a58b405b7cf228a83fcb04c02 (patch)
treeecadfb3008025103fc491f83b7c85cce084ca940 /arch/arm64/mm
parentf1fa301f977f06dcf990c0452d85e2f67d8cbbf1 (diff)
Revert "arm64: dma-mapping: Attach IOMMUs as groups"
This reverts commit commit 6a70911936b5 ("arm64: dma-mapping: Attach IOMMUs as groups"). PCIe endpoint devices are no longer placed into groups with the root complex device so we no longer need to attach as groups in the DMA layer. CRs-Fixed: 1036401 Change-Id: I953808314ed92e9da1ac15dc5be3d1d223fee188 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r--arch/arm64/mm/dma-mapping.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 7cf7e4f94f36..416b2afc6555 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -2115,19 +2115,12 @@ int arm_iommu_attach_device(struct device *dev,
{
int err;
int s1_bypass = 0, is_fast = 0;
- struct iommu_group *group;
iommu_domain_get_attr(mapping->domain, DOMAIN_ATTR_FAST, &is_fast);
if (is_fast)
return fast_smmu_attach_device(dev, mapping);
- group = iommu_group_get(dev);
- if (!group) {
- dev_err(dev, "Couldn't get group\n");
- return -ENODEV;
- }
-
- err = iommu_attach_group(mapping->domain, group);
+ err = iommu_attach_device(mapping->domain, dev);
if (err)
return err;
@@ -2155,7 +2148,6 @@ void arm_iommu_detach_device(struct device *dev)
{
struct dma_iommu_mapping *mapping;
int is_fast;
- struct iommu_group *group;
mapping = to_dma_iommu_mapping(dev);
if (!mapping) {
@@ -2169,13 +2161,7 @@ void arm_iommu_detach_device(struct device *dev)
return;
}
- group = iommu_group_get(dev);
- if (!group) {
- dev_err(dev, "Couldn't get group\n");
- return;
- }
-
- iommu_detach_group(mapping->domain, group);
+ iommu_detach_device(mapping->domain, dev);
kref_put(&mapping->kref, release_iommu_mapping);
dev->archdata.mapping = NULL;
set_dma_ops(dev, NULL);