Re: [PATCH v3 2/3] iommu/arm-smmu-v3: Detect Tegra264 erratum
From: Jason Gunthorpe
Date: Fri Jun 05 2026 - 10:18:38 EST
On Fri, Jun 05, 2026 at 07:35:35PM +0530, Ashish Mhetre wrote:
> > > +{
> > > + if (!(smmu->options & ARM_SMMU_OPT_TLBI_TWICE))
> > > + return false;
> > Maybe we should make this a static key?
>
> Okay. Shall I add just static key and remove option bit, or
> have static key alongside existing option bit such that
> static_branch_unlikely will precede the option bit check?
You'd have the static key and the options. Keep it simple, enable the
static key once if any driver probes to set TWICE. Check the key
before options to get the best code gen
But IDK if it is really worth it, there are already lots of branches
on the performance tlbi flow, and we didn't do this for other tlbi
affecting errata..
IDK if we really care about branches we should also be doing things
like disabling the range/non-range paths and ATC based on what is
actually in use..
Jason