[PATCH v2 03/10] iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx()

Daniel Mentz danielmentz at google.com
Tue Jun 11 17:30:53 PDT 2024


On Mon, Jun 10, 2024 at 5:31 PM Jason Gunthorpe <jgg at nvidia.com> wrote:
>                 dev_warn(smmu->dev,
> -                        "2-level strtab only covers %u/%u bits of SID\n",
> -                        size, smmu->sid_bits);
> +                        "2-level strtab only covers %u/%u of SIDs\n",
> +                        cfg->num_l1_ents * STRTAB_NUM_L2_STES,
> +                        1 << smmu->sid_bits);

Does this mean it'll change from printing

"2-level strtab only covers 25/32 bits of SID"

to

"2-level strtab only covers 33554432/4294967296 of SIDs"?

I think that's less helpful. I would prefer printing the values in bits.

> +#define STRTAB_NUM_L2_STES (1 << STRTAB_SPLIT)
> +#define STRTAB_MAX_L1_ENTRIES (1 << 17)

Consider adding some extra white space to nicely align these #defines
with the rest of this .h file.



More information about the linux-arm-kernel mailing list