|
@@ -1381,7 +1381,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
|
|
|
|
|
|
do {
|
|
do {
|
|
next = pmd_addr_end(addr, end);
|
|
next = pmd_addr_end(addr, end);
|
|
- ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, end, pfn,
|
|
|
|
|
|
+ ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, next, pfn,
|
|
prot, stage);
|
|
prot, stage);
|
|
phys += next - addr;
|
|
phys += next - addr;
|
|
} while (pmd++, addr = next, addr < end);
|
|
} while (pmd++, addr = next, addr < end);
|
|
@@ -1499,7 +1499,7 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
|
|
|
|
|
|
ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0);
|
|
ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0);
|
|
arm_smmu_tlb_inv_context(&smmu_domain->root_cfg);
|
|
arm_smmu_tlb_inv_context(&smmu_domain->root_cfg);
|
|
- return ret ? ret : size;
|
|
|
|
|
|
+ return ret ? 0 : size;
|
|
}
|
|
}
|
|
|
|
|
|
static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
|
|
static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
|