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

Mark Brown broonie at kernel.org
Wed Aug 2 05:21:25 PDT 2023


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:

   https://lore.kernel.org/r/20230731-arm64-sme-fa64-hotplug-v2-1

which also addresses your issue?
-------------- 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/20230802/a30b8f8d/attachment.sig>


More information about the linux-arm-kernel mailing list