summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Daly <pdaly@codeaurora.org>2016-03-22 18:46:38 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-04-05 11:30:22 -0700
commit2a0c9c9dee97747b66fb51b525e5d6e9050e3b7f (patch)
treee5658fe6fe62194d361641f82dac5efe1d48452c /drivers
parentc1b29ef10efcb357a6f77ab55e81e79025049b1b (diff)
iommu/arm-smmu: Fix DOMAIN_ATTR_S1_BYPASS check
change "iommu/arm-smmu: Support DOMAIN_ATTR_S1_BYPASS" checks the wrong bit when determine whether to bypass or not to bypass stage1 translation. Fix it. CRs-Fixed: 995213 Change-Id: Id347f540f866be6b8442d5f166c6cf7b0ae4c000 Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/arm-smmu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 9552e5b6a3d1..a9b6b24725b4 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1454,7 +1454,9 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,
/* SCTLR */
reg = SCTLR_CFCFG | SCTLR_CFIE | SCTLR_CFRE | SCTLR_EAE_SBOP;
- if (!stage1 || !(smmu_domain->attributes & DOMAIN_ATTR_S1_BYPASS))
+
+ if (!(smmu_domain->attributes & (1 << DOMAIN_ATTR_S1_BYPASS)) ||
+ !stage1)
reg |= SCTLR_M;
if (stage1)
reg |= SCTLR_S1_ASIDPNE;