]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/iommu/qcom_iommu.c
Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[linux.git] / drivers / iommu / qcom_iommu.c
index c31e7bc4ccbec2f7083ba30541e2a2b70df7431a..52f38292df5b634e6c25adf56649b90eef76610e 100644 (file)
@@ -284,9 +284,9 @@ static int qcom_iommu_init_domain(struct iommu_domain *domain,
 
                /* MAIRs (stage-1 only) */
                iommu_writel(ctx, ARM_SMMU_CB_S1_MAIR0,
-                               pgtbl_cfg.arm_lpae_s1_cfg.mair[0]);
+                               pgtbl_cfg.arm_lpae_s1_cfg.mair);
                iommu_writel(ctx, ARM_SMMU_CB_S1_MAIR1,
-                               pgtbl_cfg.arm_lpae_s1_cfg.mair[1]);
+                               pgtbl_cfg.arm_lpae_s1_cfg.mair >> 32);
 
                /* SCTLR */
                reg = SCTLR_CFIE | SCTLR_CFRE | SCTLR_AFE | SCTLR_TRE |
@@ -423,7 +423,7 @@ static void qcom_iommu_detach_dev(struct iommu_domain *domain, struct device *de
 }
 
 static int qcom_iommu_map(struct iommu_domain *domain, unsigned long iova,
-                         phys_addr_t paddr, size_t size, int prot)
+                         phys_addr_t paddr, size_t size, int prot, gfp_t gfp)
 {
        int ret;
        unsigned long flags;
@@ -539,8 +539,8 @@ static int qcom_iommu_add_device(struct device *dev)
        }
 
        group = iommu_group_get_for_dev(dev);
-       if (IS_ERR_OR_NULL(group))
-               return PTR_ERR_OR_ZERO(group);
+       if (IS_ERR(group))
+               return PTR_ERR(group);
 
        iommu_group_put(group);
        iommu_device_link(&qcom_iommu->iommu, dev);