[PATCH 13/18] arm64: fpsimd: Use opaque type for SVE state
Mark Brown
broonie at kernel.org
Tue May 26 09:53:12 PDT 2026
On Thu, May 21, 2026 at 02:25:51PM +0100, Mark Rutland wrote:
> As the SVE state size can vary at runtime, we don't have a concrete type
> for the in-memory SVE state, and pass this around using a pointer to
> void. The functions which save/restore the SVE state have a very unusual
> calling convention, expecting a pointer to the FFR *in the middle of*
> the in-memory SVE state, which is also passed as a pointer to void.
> Passing a pointer to the FFR also requires that callers find the live VL
> and perform some arithmetic, which callers implement differently.
...
> Improve this by adding an opaque 'struct sve_state', and consistently
> passing a pointer to this, performing the necessary offsetting *within*
> the save/restore functions.
This is much more ergonomic:
Reviewed-by: Mark Brown <broonie at kernel.org>
-------------- 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/eed43aef/attachment.sig>
More information about the linux-arm-kernel
mailing list