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
This commit is contained in:
committed by
Michael Ellerman
parent
107c55005f
commit
128d3d0210
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user