diff options
author | Mark Brown <broonie@kernel.org> | 2022-04-19 12:22:40 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2022-04-28 17:57:11 +0100 |
commit | 4126bde025c8f973dfd278879fa32e293f563df5 (patch) | |
tree | 59cbbc58fdec93e8814e49acb6554d147c579695 /tools/testing/selftests/arm64/fp/ssve-stress | |
parent | a0f2eb641b7c4ff753374f8b2043b8bbb1666a96 (diff) | |
download | linux-4126bde025c8f973dfd278879fa32e293f563df5.tar.gz linux-4126bde025c8f973dfd278879fa32e293f563df5.tar.bz2 linux-4126bde025c8f973dfd278879fa32e293f563df5.zip |
kselftest/arm64: sme: Provide streaming mode SVE stress test
One of the features of SME is the addition of streaming mode, in which we
have access to a set of streaming mode SVE registers at the SME vector
length. Since these are accessed using the SVE instructions let's reuse
the existing SVE stress test for testing with a compile time option for
controlling the few small differences needed:
- Enter streaming mode immediately on starting the program.
- In streaming mode FFR is removed so skip reading and writing FFR.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419112247.711548-33-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64/fp/ssve-stress')
-rw-r--r-- | tools/testing/selftests/arm64/fp/ssve-stress | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/fp/ssve-stress b/tools/testing/selftests/arm64/fp/ssve-stress new file mode 100644 index 000000000000..e2bd2cc184ad --- /dev/null +++ b/tools/testing/selftests/arm64/fp/ssve-stress @@ -0,0 +1,59 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only +# Copyright (C) 2015-2019 ARM Limited. +# Original author: Dave Martin <Dave.Martin@arm.com> + +set -ue + +NR_CPUS=`nproc` + +pids= +logs= + +cleanup () { + trap - INT TERM CHLD + set +e + + if [ -n "$pids" ]; then + kill $pids + wait $pids + pids= + fi + + if [ -n "$logs" ]; then + cat $logs + rm $logs + logs= + fi +} + +interrupt () { + cleanup + exit 0 +} + +child_died () { + cleanup + exit 1 +} + +trap interrupt INT TERM EXIT + +for x in `seq 0 $((NR_CPUS * 4))`; do + log=`mktemp` + logs=$logs\ $log + ./ssve-test >$log & + pids=$pids\ $! +done + +# Wait for all child processes to be created: +sleep 10 + +while :; do + kill -USR1 $pids +done & +pids=$pids\ $! + +wait + +exit 1 |