[PATCH v2 1/3] arm64/sve: Split _sve_flush macro into separate Z and predicate flushes

Dave Martin Dave.Martin at arm.com
Wed May 12 06:40:00 PDT 2021


On Tue, May 11, 2021 at 05:04:44PM +0100, Mark Brown wrote:
> Trivial refactoring to support further work, no change to generated code.
> 
> Signed-off-by: Mark Brown <broonie at kernel.org>

Reviewed-by: Dave Martin <Dave.Martin at arm.com>

> ---
>  arch/arm64/include/asm/fpsimdmacros.h | 4 +++-
>  arch/arm64/kernel/entry-fpsimd.S      | 3 ++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/fpsimdmacros.h b/arch/arm64/include/asm/fpsimdmacros.h
> index a2563992d2dc..059204477ce6 100644
> --- a/arch/arm64/include/asm/fpsimdmacros.h
> +++ b/arch/arm64/include/asm/fpsimdmacros.h
> @@ -213,8 +213,10 @@
>  	mov	v\nz\().16b, v\nz\().16b
>  .endm
>  
> -.macro sve_flush
> +.macro sve_flush_z
>   _for n, 0, 31, _sve_flush_z	\n
> +.endm
> +.macro sve_flush_p_ffr
>   _for n, 0, 15, _sve_pfalse	\n
>  		_sve_wrffr	0
>  .endm
> diff --git a/arch/arm64/kernel/entry-fpsimd.S b/arch/arm64/kernel/entry-fpsimd.S
> index 3ecec60d3295..7921d58427c2 100644
> --- a/arch/arm64/kernel/entry-fpsimd.S
> +++ b/arch/arm64/kernel/entry-fpsimd.S
> @@ -72,7 +72,8 @@ SYM_FUNC_END(sve_load_from_fpsimd_state)
>  
>  /* Zero all SVE registers but the first 128-bits of each vector */
>  SYM_FUNC_START(sve_flush_live)
> -	sve_flush
> +	sve_flush_z
> +	sve_flush_p_ffr
>  	ret
>  SYM_FUNC_END(sve_flush_live)
>  
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list