mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
	Fuad Tabba <fuad.tabba@linux.dev>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 03/11] kselftest/arm64: Move exit calls out of fp-stress loads
Date: Tue, 29 Sep 2026 17:27:28 +0100	[thread overview]
Message-ID: <arvm8O6kL1I9Plrw@J2N7QTR9R3.cambridge.arm.com> (raw)
In-Reply-To: <20260901-arm64-fp-stress-kvm-v1-3-31bce995b49b@kernel.org>

On Tue, Sep 01, 2026 at 06:06:43PM +0100, Mark Brown wrote:
> When they detect corruption the fp-stress test loads print load specific
> diagnostics and exits with a failure status.  In preparation for
> building versions intended to run as KVM guests factor the exits into
> asm-utils-linux.S.
> 
> No functional change.

This is a good cleanup, but I do think it'd be worth noting that some of
the existing asm was wrong and worked by coincidence.

I did mention that in the patches I linked you to a while back:

  https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=922d15ef46cb486a79f168949e103f6df26f4fba

Mark.

> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/testing/selftests/arm64/fp/asm-utils-linux.S | 8 ++++++++
>  tools/testing/selftests/arm64/fp/fpsimd-test.S     | 4 +---
>  tools/testing/selftests/arm64/fp/sve-test.S        | 8 ++------
>  tools/testing/selftests/arm64/fp/za-test.S         | 8 ++------
>  tools/testing/selftests/arm64/fp/zt-test.S         | 4 +---
>  5 files changed, 14 insertions(+), 18 deletions(-)
> 
> diff --git a/tools/testing/selftests/arm64/fp/asm-utils-linux.S b/tools/testing/selftests/arm64/fp/asm-utils-linux.S
> index 3effeb1fbf50..9cd31dc47709 100644
> --- a/tools/testing/selftests/arm64/fp/asm-utils-linux.S
> +++ b/tools/testing/selftests/arm64/fp/asm-utils-linux.S
> @@ -84,3 +84,11 @@ function tickle_handler
>  	ret
>  endfunction
>  .globl	tickle_handler
> +
> +// Terminate the program, reporting failure.  Does not return.
> +function exit_error
> +	mov	x0, #1
> +	mov	x8, #__NR_exit
> +	svc	#0
> +endfunction
> +.globl	exit_error
> diff --git a/tools/testing/selftests/arm64/fp/fpsimd-test.S b/tools/testing/selftests/arm64/fp/fpsimd-test.S
> index 9db7b5419397..5ee8ef51ea4e 100644
> --- a/tools/testing/selftests/arm64/fp/fpsimd-test.S
> +++ b/tools/testing/selftests/arm64/fp/fpsimd-test.S
> @@ -298,7 +298,5 @@ function barf
>  	bl	dumphex
>  	puts	"]\n"
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
> diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S
> index 2aadb5c3c0f3..3447fe0e5554 100644
> --- a/tools/testing/selftests/arm64/fp/sve-test.S
> +++ b/tools/testing/selftests/arm64/fp/sve-test.S
> @@ -543,9 +543,7 @@ function vl_barf
>  	mov	x0, x10
>  	bl	putdecn
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
>  
>  function svcr_barf
> @@ -555,7 +553,5 @@ function svcr_barf
>  	mov	x0, x10
>  	bl	putdecn
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
> diff --git a/tools/testing/selftests/arm64/fp/za-test.S b/tools/testing/selftests/arm64/fp/za-test.S
> index 84e63e510f23..33dc4ce8bfa1 100644
> --- a/tools/testing/selftests/arm64/fp/za-test.S
> +++ b/tools/testing/selftests/arm64/fp/za-test.S
> @@ -354,9 +354,7 @@ function vl_barf
>  	mov	x0, x10
>  	bl	putdecn
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
>  
>  function svcr_barf
> @@ -366,7 +364,5 @@ function svcr_barf
>  	mov	x0, x10
>  	bl	putdecn
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
> diff --git a/tools/testing/selftests/arm64/fp/zt-test.S b/tools/testing/selftests/arm64/fp/zt-test.S
> index afcadb5aff23..c67242c2d5ab 100644
> --- a/tools/testing/selftests/arm64/fp/zt-test.S
> +++ b/tools/testing/selftests/arm64/fp/zt-test.S
> @@ -284,7 +284,5 @@ function svcr_barf
>  	mov	x0, x10
>  	bl	putdecn
>  
> -	mov	x8, #__NR_exit
> -	mov	x1, #1
> -	svc	#0
> +	b	exit_error
>  endfunction
> 
> -- 
> 2.47.3
> 

  parent reply	other threads:[~2026-09-29 16:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:06 [PATCH 00/11] kselftest/arm64: Add coverage of interactions with KVM to fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 01/11] kselftest/arm64: Factor Linux syscalls out of asm-utils.S Mark Brown
2026-09-29 16:01   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 02/11] kselftest/arm64: Factor shared signal handlers out of fp-stress loads Mark Brown
2026-09-29 16:07   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 03/11] kselftest/arm64: Move exit calls " Mark Brown
2026-09-29 16:22   ` Lorenzo Stoakes (ARM)
2026-09-29 21:56     ` Mark Brown
2026-09-30  8:41       ` Lorenzo Stoakes (ARM)
2026-09-29 16:27   ` Mark Rutland [this message]
2026-09-29 22:03     ` Mark Brown
2026-09-30  8:51     ` Mark Rutland
2026-09-01 17:06 ` [PATCH 04/11] kselftest/arm64: Use exit_error() rather than SIGABRT in fp-stress Mark Brown
2026-09-29 16:28   ` Mark Rutland
2026-09-29 16:31   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 05/11] kselftest/arm64: Exit with an error code on data mismatches " Mark Brown
2026-09-29 16:37   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 06/11] kselftest/arm64: Factor startup code out of fp-stress load programs Mark Brown
2026-09-30 12:39   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 07/11] kselftest/arm64: Remove the sched_yield()s from the fp-stress loads Mark Brown
2026-09-30 14:17   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 08/11] kselftest/arm64: Add a very simple VMM for use in fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 09/11] kselftest/arm64: Build KVM guest versions of the fp-stress loads Mark Brown
2026-09-01 17:06 ` [PATCH 10/11] kselftest/arm64: Use execv() to start fp-stress test loads Mark Brown
2026-09-01 17:06 ` [PATCH 11/11] kselftest/arm64: Run KVM guests from fp-stress Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arvm8O6kL1I9Plrw@J2N7QTR9R3.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®