aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/include/utils.h
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2020-05-20 12:11:03 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-06-22 14:18:45 +1000
commit620a6473df36f8dc6f70bc85ff3465b2e21d1254 (patch)
tree480e60723b5d887102cd89b84aaa91f2d1ae80b1 /tools/testing/selftests/powerpc/include/utils.h
parentselftests/powerpc: Allow choice of CI memory location in alignment_handler test (diff)
downloadlinux-dev-620a6473df36f8dc6f70bc85ff3465b2e21d1254.tar.xz
linux-dev-620a6473df36f8dc6f70bc85ff3465b2e21d1254.zip
selftests/powerpc: Add prefixed loads/stores to alignment_handler test
Extend the alignment handler selftest to exercise prefixed load store instructions. Add tests for prefixed VSX, floating point and integer instructions. Skip prefix tests if ISA version does not support prefixed instructions. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Tested-by: Alistair Popple <alistair@popple.id.au> [mpe: Fixup PPC_FEATURE2_ARCH_3_1 naming as noted by Alistair] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200520021103.19798-2-jniethe5@gmail.com
Diffstat (limited to 'tools/testing/selftests/powerpc/include/utils.h')
-rw-r--r--tools/testing/selftests/powerpc/include/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h
index e089a0c30d9a..2e39b297054f 100644
--- a/tools/testing/selftests/powerpc/include/utils.h
+++ b/tools/testing/selftests/powerpc/include/utils.h
@@ -101,6 +101,11 @@ do { \
#define PPC_FEATURE2_ARCH_3_00 0x00800000
#endif
+/* POWER10 feature */
+#ifndef PPC_FEATURE2_ARCH_3_1
+#define PPC_FEATURE2_ARCH_3_1 0x00040000
+#endif
+
#if defined(__powerpc64__)
#define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
#define UCONTEXT_MSR(UC) (UC)->uc_mcontext.gp_regs[PT_MSR]