[PATCH 12/27] arm64/sve: Support vector length resetting for new processes
Dave Martin
Dave.Martin at arm.com
Tue Aug 22 10:22:24 PDT 2017
On Tue, Aug 22, 2017 at 05:22:11PM +0100, Alex Bennée wrote:
>
> Dave Martin <Dave.Martin at arm.com> writes:
>
> > It's desirable to be able to reset the vector length to some sane
> > default for new processes, since the new binary and its libraries
> > processes may or may not be SVE-aware.
> >
> > This patch tracks the desired post-exec vector length (if any) in a
> > new thread member sve_vl_onexec, and adds a new thread flag
> > TIF_SVE_VL_INHERIT to control whether to inherit or reset the
> > vector length. Currently these are inactive. Subsequent patches
> > will provide the capability to configure them.
> >
> > Signed-off-by: Dave Martin <Dave.Martin at arm.com>
> > ---
> > arch/arm64/include/asm/processor.h | 1 +
> > arch/arm64/include/asm/thread_info.h | 1 +
> > arch/arm64/kernel/fpsimd.c | 13 +++++++++++++
> > 3 files changed, 15 insertions(+)
> >
> > diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
> > index 969feed..da8802a 100644
> > --- a/arch/arm64/include/asm/processor.h
> > +++ b/arch/arm64/include/asm/processor.h
> > @@ -87,6 +87,7 @@ struct thread_struct {
> > struct fpsimd_state fpsimd_state;
> > void *sve_state; /* SVE registers, if any */
> > u16 sve_vl; /* SVE vector length */
> > + u16 sve_vl_onexec; /* SVE vl after next
> > exec */
>
> Inconsistent size usage here as well...
Agreed, the same history applies as for sve_vl. I'll replace this with
an unsigned int.
[...]
Cheers
---Dave
More information about the linux-arm-kernel
mailing list