diff options
author | Sandipan Das <sandipan@linux.ibm.com> | 2020-07-27 09:30:35 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-07-29 21:02:10 +1000 |
commit | 128d3d0210076232b7d54c361082c8ee17e4b669 (patch) | |
tree | cfe19bd8b429a00be10024a91e2d28e3f61f8bd7 /tools/testing/selftests/powerpc/include/utils.h | |
parent | powerpc/pseries: Add KVM guest doorbell restrictions (diff) | |
download | linux-dev-128d3d0210076232b7d54c361082c8ee17e4b669.tar.xz linux-dev-128d3d0210076232b7d54c361082c8ee17e4b669.zip |
selftests/powerpc: Move pkey helpers to headers
This moves all the pkey-related helpers to a new header
file and also a helper to print error messages in signal
handlers to the existing utils header file.
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/28e633fa9ec1a6500c12188e09ea1887b10a10c1.1595821792.git.sandipan@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 9dbe607cc5ec..7f259f36e23b 100644 --- a/tools/testing/selftests/powerpc/include/utils.h +++ b/tools/testing/selftests/powerpc/include/utils.h @@ -97,6 +97,10 @@ do { \ #define _str(s) #s #define str(s) _str(s) +#define sigsafe_err(msg) ({ \ + ssize_t nbytes __attribute__((unused)); \ + nbytes = write(STDERR_FILENO, msg, strlen(msg)); }) + /* POWER9 feature */ #ifndef PPC_FEATURE2_ARCH_3_00 #define PPC_FEATURE2_ARCH_3_00 0x00800000 |