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

Jason Gunthorpe jgg at nvidia.com
Wed Jun 12 05:09:18 PDT 2024


On Tue, Jun 11, 2024 at 05:30:53PM -0700, Daniel Mentz wrote:
> 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.

Sure

> > +#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.

I presonally dislike the random vertical alignments, but sure

Thanks,
Jason



More information about the linux-arm-kernel mailing list