]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 6 Sep 2024 15:47:50 +0000 (12:47 -0300)
committerWill Deacon <will@kernel.org>
Mon, 9 Sep 2024 14:47:14 +0000 (15:47 +0100)
commit85196f54743d97b0678e7889df72fdcc58ab2b02
treebbf0d5e632c74c87bdf6f4960a97a9933178a0aa
parentabb4f9d323a8d53870cc842d3c5024f71c2d4951
iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg

The members here are being used for both the linear and the 2 level case,
with the meaning of each item slightly different in the two cases.

Split it into a clean union where both cases have their own struct with
their own logical names and correct types.

Adjust all the users to detect linear/2lvl and use the right sub structure
and types consistently.

Remove STRTAB_STE_DWORDS by changing the last places to use
sizeof(struct arm_smmu_ste).

Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/3-v4-6416877274e1+1af-smmuv3_tidy_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h