[PATCH v10 02/30] arm64/fpsimd: Update FA64 and ZT0 enables when loading SME state

Mark Brown broonie at kernel.org
Tue May 26 08:19:30 PDT 2026


On Tue, May 26, 2026 at 03:20:52PM +0100, Mark Rutland wrote:
> On Tue, May 26, 2026 at 02:25:56PM +0100, Mark Brown wrote:

> > I was explicitly going for the opposite of that in order to make it
> > harder for someone implementing a future extension to miss a place where
> > an update is required, having the callers independently constructing the
> > register values feels like it's asking for trouble.

> I didn't say callers should *construct* the value independently, and I
> showed how to centralize the construction in a __task_smcr() function.

> I think callers should pass the entire value around rather than a
> collection of discrete booleans: constructing a collection of discrete
> booleans is functionally equivalent to construction the entire value,
> and we can more easily manage the construction and passing of the entire
> value.

I got that, the problem I see is that it's equivalent to passing the
entire value right up until the point where there's another field that
needs managing and then every place that sets a new value needs to make
sure it does the right thing.  I think a __task_smcr() that constructs
the value each time time as you suggest avoids that well enough.
-------------- 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/20260526/ffafb15a/attachment.sig>


More information about the linux-arm-kernel mailing list