From 2fc4031194a77dc46f21640b89b6539681a55d8c Mon Sep 17 00:00:00 2001 From: Liam Mark Date: Thu, 20 Oct 2016 13:50:45 -0700 Subject: [PATCH] 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 --- drivers/iommu/arm-smmu.c | 4 ++++ 1 file changed, 4 insertions(+) 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)