diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2020-08-03 12:07:19 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-08-03 22:12:41 +1000 |
commit | 872d11bca9c29ed19595c993b9f552ffe9b63dcb (patch) | |
tree | 101f33625913e951cad50b2ea693162014d6efb0 /tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c | |
parent | powerpc/40x: Fix assembler warning about r0 (diff) | |
download | linux-dev-872d11bca9c29ed19595c993b9f552ffe9b63dcb.tar.xz linux-dev-872d11bca9c29ed19595c993b9f552ffe9b63dcb.zip |
selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs
Some of our tests use VSX or newer VMX instructions, so need to be
skipped on older CPUs to avoid SIGILL'ing.
Similarly TAR was added in v2.07, and the PMU event used in the stcx
fail test only works on Power8 or later.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200803020719.96114-1-mpe@ellerman.id.au
Diffstat (limited to '')
-rw-r--r-- | tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c b/tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c index c4fe0e893306..cb9875f764ca 100644 --- a/tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c +++ b/tools/testing/selftests/powerpc/ptrace/ptrace-vsx.c @@ -61,6 +61,8 @@ int ptrace_vsx(void) pid_t pid; int ret, status, i; + SKIP_IF(!have_hwcap(PPC_FEATURE_HAS_VSX)); + shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); for (i = 0; i < VEC_MAX; i++) |