diff options
| author | Benjamin Gray <bgray@linux.ibm.com> | 2023-06-19 10:36:27 +0300 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-06-19 10:36:28 +0300 |
| commit | bdb07f35a52f40c461c7da06ddcbaca1950fb9e0 (patch) | |
| tree | 2d3ef35d8ef3bede854c1a35e73ae2f9e03ae776 /tools/testing/selftests/powerpc/include/utils.h | |
| parent | b9125c9aa043a7556626e1aafb3190c61c1e2b2b (diff) | |
| download | linux-bdb07f35a52f40c461c7da06ddcbaca1950fb9e0.tar.xz | |
selftests/powerpc/dexcr: Add hashst/hashchk test
Test the kernel DEXCR[NPHIE] interface and hashchk exception handling.
Introduces with it a DEXCR utils library for common DEXCR operations.
Volatile is used to prevent the compiler optimising away the signal
tests.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230616034846.311705-11-bgray@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/powerpc/include/utils.h')
| -rw-r--r-- | tools/testing/selftests/powerpc/include/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h index 9dc53c4fbfe3..36c30c611457 100644 --- a/tools/testing/selftests/powerpc/include/utils.h +++ b/tools/testing/selftests/powerpc/include/utils.h @@ -11,6 +11,7 @@ #include <stdint.h> #include <stdio.h> #include <stdbool.h> +#include <sys/signal.h> #include <linux/auxvec.h> #include <linux/perf_event.h> #include <asm/cputable.h> @@ -111,6 +112,9 @@ static inline char *auxv_platform(void) bool is_ppc64le(void); int using_hash_mmu(bool *using_hash); +struct sigaction push_signal_handler(int sig, void (*fn)(int, siginfo_t *, void *)); +struct sigaction pop_signal_handler(int sig, struct sigaction old_handler); + /* Yes, this is evil */ #define FAIL_IF(x) \ do { \ |
