[PATCH] kselftest/arm64: abi: fix SVCR detection

Mark Brown broonie at kernel.org
Mon Dec 9 05:12:53 PST 2024


On Mon, Dec 09, 2024 at 08:51:28PM +0800, Weizhao Ouyang wrote:
> On Mon, Dec 9, 2024 at 8:36 PM Mark Brown <broonie at kernel.org> wrote:

> > >       // Set SVCR if we're doing SME
> > > -     cbz     x1, 1f
> > >       adrp    x2, svcr_in
> > >       ldr     x2, [x2, :lo12:svcr_in]
> > > +     cbz     x1, 1f
> > >       msr     S3_3_C4_C2_2, x2

> > This is against an older verison of the code so wouldn't apply now.
> > It's not also checking the value of SVCR, this is checking the SME flag
> > the check is against x1.

> This patch aims to fix the second check (SVCR_ZA_SHIFT) instead of
> the first one (the x1 SME flag you're referring to):

If we don't have SME we should be skipping over all the SME code and
never even looking at the value of SVCR.  Looking at the current version
of the code it does that, it branches to check_sve_in if SME is not
enabled.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241209/f41466bc/attachment.sig>


More information about the linux-arm-kernel mailing list