[PATCH 5/6] arm64: Add the arm64.nosme command line option
Marc Zyngier
maz at kernel.org
Mon Jun 27 11:08:42 PDT 2022
On Mon, 27 Jun 2022 18:04:05 +0100,
Mark Brown <broonie at kernel.org> wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On Mon, Jun 27, 2022 at 04:14:11PM +0100, Marc Zyngier wrote:
>
> > +.Linit_sme: /* SME register access and priority mapping */
> > + msr cptr_el2, x0 // Disable SME traps
> > + bic x0, x0, #CPTR_EL2_TSM
> > + msr cptr_el2, x0
>
> Should the first msr there be a mrs? If not it should probably have a
> comment explaining what it's doing.
Duh. Copy-paste programming, I'm sure it'll go far. :-/
>
> > + mov x1, #0 // SMCR controls
> > +
> > + mrs_s x2, SYS_ID_AA64SMFR0_EL1
> > + ubfx x2, x2, #ID_AA64SMFR0_FA64_SHIFT, #1 // Full FP in SM?
> > + cbz x2, .Lskip_sme_fa64
>
> I'm sure any firmware authors who enable SME will remember to also
> enable FA64 if it's supported in their hardware!
I could add check the override here too. It is a bit ugly as SMFR0
isn't encoded as 4 bit features, but hey, why not.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list