Re: [PATCH] arm64/fpsimd: Only provide the length to cpufeature for xCR registers

From: Mark Brown
Date: Wed Aug 02 2023 - 08:21:35 EST

On Wed, Aug 02, 2023 at 12:21:23PM +0100, Will Deacon wrote:
> On Thu, Jul 27, 2023 at 10:31:44PM +0100, Mark Brown wrote:

> > - return zcr;
> > + return SYS_FIELD_GET(ZCR_ELx, LEN, zcr);

> Hmm, now this function looks like a mixture of code which relies on the
> LEN field living at the bottom of the register and code which is agnostic
> to that.

> Can we update the 'zcr |= vq_max - 1' part to use something like
> FIELD_PREP() instead?

There was a version 2 that was sent already which goes in the opposite
direction and just returns the value we would munge in without use of
any FIELD_ macros:

which also addresses your issue?

Attachment: signature.asc
Description: PGP signature