Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a3b68bf authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu/arm-smmu: Fix size parameter in .unprepare_pgtable()"

parents d8851ada 56cbc415
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -924,7 +924,7 @@ static void arm_smmu_flush_pgtable(void *addr, size_t size, void *cookie)
}

static void arm_smmu_prepare_pgtable(void *addr, void *cookie);
static void arm_smmu_unprepare_pgtable(void *cookie, void *addr, size_t size);
static void arm_smmu_unprepare_pgtable(void *cookie, void *addr);

static struct iommu_gather_ops arm_smmu_gather_ops = {
	.tlb_flush_all	= arm_smmu_tlb_inv_context,
@@ -1689,7 +1689,7 @@ static void arm_smmu_assign_table(struct arm_smmu_domain *smmu_domain)
	}
}

static void arm_smmu_unprepare_pgtable(void *cookie, void *addr, size_t size)
static void arm_smmu_unprepare_pgtable(void *cookie, void *addr)
{
	struct arm_smmu_domain *smmu_domain = cookie;
	int ret;
@@ -1700,7 +1700,7 @@ static void arm_smmu_unprepare_pgtable(void *cookie, void *addr, size_t size)
	if (smmu_domain->secure_vmid == VMID_INVAL)
		return;

	ret = hyp_assign_phys((phys_addr_t)virt_to_phys(addr), size,
	ret = hyp_assign_phys((phys_addr_t)virt_to_phys(addr), PAGE_SIZE,
			source_vmlist, 2, &dest_vmids, &dest_perms, 1);
	WARN_ON(ret);
}
+1 −2
Original line number Diff line number Diff line
@@ -413,8 +413,7 @@ static void __arm_lpae_free_pgtable(struct arm_lpae_io_pgtable *data, int lvl,
		__arm_lpae_free_pgtable(data, lvl + 1, iopte_deref(pte, data));
	}

	data->iop.cfg.tlb->unprepare_pgtable(data->iop.cookie, start,
								table_size);
	data->iop.cfg.tlb->unprepare_pgtable(data->iop.cookie, start);
	free_pages_exact(start, table_size);
}

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ struct iommu_gather_ops {
	void (*tlb_sync)(void *cookie);
	void (*flush_pgtable)(void *ptr, size_t size, void *cookie);
	void (*prepare_pgtable)(void *addr, void *cookie);
	void (*unprepare_pgtable)(void *cookie, void *addr, size_t size);
	void (*unprepare_pgtable)(void *cookie, void *addr);
};

/**