From 8e5207d1fc1d666938f59d3b4f13a7fd6da2cc6e Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Thu, 9 Jul 2015 15:29:35 -0700 Subject: [PATCH] iommu/arm-smmu: Disable coherent table walk by default Coherent hardware table walking hasn't been properly validated or characterized, so all clients are expected to disable it. This is a recipe for disaster since it could be easy for a new client to come along without knowing that they need to disable it. Just disable it by default. Clients can always explicitly enable it in the future if it's found to be beneficial. Change-Id: I4badfe33e815a6ba7b25507f5dd5a42f68d4bfa6 Signed-off-by: Mitchel Humpherys --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 230e8c2159d3..1124ff3286e0 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1436,6 +1436,8 @@ static int arm_smmu_domain_init(struct iommu_domain *domain) return -ENOMEM; smmu_domain->secure_vmid = VMID_INVAL; + /* disable coherent htw by default */ + smmu_domain->attributes = (1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE); INIT_LIST_HEAD(&smmu_domain->pte_info_list); mutex_init(&smmu_domain->init_mutex); spin_lock_init(&smmu_domain->pgtbl_lock);