iommu/exynos: Reuse SysMMU constants for page size and order
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 14 Jul 2022 16:55:45 +0000 (19:55 +0300)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:30:43 +0000 (10:30 +0200)
commitbc0d9af21f463b1705b35ea3f8a7266ac333fc14
tree00c8b9f2eb58f75e39b51bcf4b352a83a6c4c526
parent32977242f80e343e2247f77e53fe20e8f7c23938
iommu/exynos: Reuse SysMMU constants for page size and order

Using SZ_4K in context of SysMMU driver is better than using PAGE_SIZE,
as PAGE_SIZE might have different value on different platforms. Though
it would be even better to use more specific constants, already existing
in SysMMU driver. Make the code more strict by using SPAGE_ORDER and
SPAGE_SIZE constants.

It also makes sense, as __sysmmu_tlb_invalidate_entry() also uses
SPAGE_* constants for further calculations with num_inv param, so it's
logical that num_inv should be previously calculated using also SPAGE_*
values.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20220714165550.8884-2-semen.protsenko@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c