iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Thu, 26 Sep 2019 11:20:27 +0000 (14:20 +0300)
committerJulien Grall <julien.grall@arm.com>
Thu, 26 Sep 2019 13:31:04 +0000 (14:31 +0100)
commit9001ad4d7c5f3ac2a1087794c3b8ab651dc324b3
treee3ec3feb1f1233481947f4622fada2bfc95c3257
parent52633db2c5ed2df352004f97e2272edc90af3cb4
iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff

Introduce a separate file to keep various helpers which could be used
by more than one IOMMU driver in order not to duplicate code.

The first candidates to be moved to the new file are SMMU driver's
"map_page/unmap_page" callbacks. These callbacks neither contain any
SMMU specific info nor perform any SMMU specific actions and are going
to be the same across all IOMMU drivers which H/W IP shares P2M
with the CPU like SMMU does.

So, move callbacks to iommu_helpers.c for the upcoming IPMMU driver
to be able to re-use them.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/drivers/passthrough/arm/Makefile
xen/drivers/passthrough/arm/iommu_helpers.c [new file with mode: 0644]
xen/drivers/passthrough/arm/smmu.c
xen/include/asm-arm/iommu.h