diff options
author | Jason Gunthorpe <[email protected]> | 2024-09-06 12:47:48 -0300 |
---|---|---|
committer | Will Deacon <[email protected]> | 2024-09-09 15:47:14 +0100 |
commit | ce410410f1a7db0259ca9282a285fb80fd553b8c (patch) | |
tree | e00f0ab06d668282008c4043d272e87e766bae5f /include/linux/overflow.h | |
parent | 19eb465c969f3d6ed1b98506d3e470e863b41e16 (diff) |
iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx()
Don't open code the calculations of the indexes for each level, provide
two functions to do that math and call them in all the places. Update all
the places computing indexes.
Calculate the L1 table size directly based on the max required index from
the cap. Remove STRTAB_L1_SZ_SHIFT in favour of STRTAB_NUM_L2_STES.
Use STRTAB_NUM_L2_STES to replace remaining open coded 1 << STRTAB_SPLIT.
Tested-by: Nicolin Chen <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions