]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 6 Sep 2024 15:47:55 +0000 (12:47 -0300)
committerWill Deacon <will@kernel.org>
Mon, 9 Sep 2024 14:47:15 +0000 (15:47 +0100)
commite3b1be2e73dbe599f8b8886e120d206aa87e90f9
tree4586b8602c124630b7d63fff8ff706c88b15fc31
parent7c567eb1e1d2a835140091ff8d4b73ac5454ba7b
iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_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 CTXDESC_CD_DWORDS by changing the last places to use
sizeof(struct arm_smmu_cd).

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/8-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