]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0910c7ace78e01b6f1ec71fbaf7a6515cfd83773
tree00c8b9f2eb58f75e39b51bcf4b352a83a6c4c526
parentc2a1d2210c023a5a3d5b2ea73bc12b0aec2a4d67
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