]> www.infradead.org Git - users/dwmw2/linux.git/commit
iommu/arm-smmu-v3: Add types for each level of the 2 level stream table
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 6 Sep 2024 15:47:49 +0000 (12:47 -0300)
committerWill Deacon <will@kernel.org>
Mon, 9 Sep 2024 14:47:14 +0000 (15:47 +0100)
commitabb4f9d323a8d53870cc842d3c5024f71c2d4951
treea45cbb1d8cd207b48a14e2d7e73f5c8f81d793a6
parentce410410f1a7db0259ca9282a285fb80fd553b8c
iommu/arm-smmu-v3: Add types for each level of the 2 level stream table

Add types struct arm_smmu_strtab_l1 and l2 to represent the HW layout of
the descriptors, and use them in most places, following patches will get
the remaing places. The size of the l1 and l2 HW allocations are
sizeof(struct arm_smmu_strtab_l1/2).

This provides some more clarity than having raw __le64 *'s and sizes
computed via macros.

Remove STRTAB_L1_DESC_DWORDS.

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