summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-01-30 22:22:34 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-01-30 22:22:33 -0800
commitb2aa44c5d5b892798307a92aaacb3c50fa581842 (patch)
tree6177d61748734ff2bb477eb9487e9d210913154f /drivers/iommu
parent1bc2a5fa8337018731393b8d6b2f83203ff0f5d3 (diff)
parentcf61d4f2ea8417b5686926524842159e9f24ebd0 (diff)
Merge "Merge android-4.4.171 (b355d4f) into msm-4.4"
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 7feaa82f8c7c..8b4a4d95669a 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2041,7 +2041,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
* than default. Unnecessary for PT mode.
*/
if (translation != CONTEXT_TT_PASS_THROUGH) {
- for (agaw = domain->agaw; agaw != iommu->agaw; agaw--) {
+ for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) {
ret = -ENOMEM;
pgd = phys_to_virt(dma_pte_addr(pgd));
if (!dma_pte_present(pgd))
@@ -2055,7 +2055,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
translation = CONTEXT_TT_MULTI_LEVEL;
context_set_address_root(context, virt_to_phys(pgd));
- context_set_address_width(context, iommu->agaw);
+ context_set_address_width(context, agaw);
} else {
/*
* In pass through mode, AW must be programmed to