summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2016-10-20 13:50:45 -0700
committerLiam Mark <lmark@codeaurora.org>2016-10-20 13:50:45 -0700
commit2fc4031194a77dc46f21640b89b6539681a55d8c (patch)
tree0280b93c199c7ad68da00c42955aebf099cefd36
parent773f15cdab613a9cb921f3e1e49f96cadac75c14 (diff)
iommu/arm-smmu: on domain destroy invlidate domain cfg
Invalidate the domain cfg when destroying the domain otherwise this can cause issues on subsequent attaches. For example if the cfb cbndx is not cleared then a new context won't get assigned to the domain. Change-Id: If576c6c8a7da90c4ce3f1061df4b3ba0dce495e1 Signed-off-by: Liam Mark <lmark@codeaurora.org>
-rw-r--r--drivers/iommu/arm-smmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index afa519aa8203..62bd63972197 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1870,6 +1870,10 @@ free_irqs:
arm_smmu_free_context_idx(smmu, cfg->cbndx);
smmu_domain->smmu = NULL;
+ cfg->cbndx = INVALID_CBNDX;
+ cfg->irptndx = INVALID_IRPTNDX;
+ cfg->asid = INVALID_ASID;
+ cfg->vmid = INVALID_VMID;
}
static struct iommu_domain *arm_smmu_domain_alloc(unsigned type)