diff options
| author | Wolfram Sang <wsa@kernel.org> | 2020-07-31 15:54:27 +0200 |
|---|---|---|
| committer | Wolfram Sang <wsa@kernel.org> | 2020-07-31 15:54:27 +0200 |
| commit | 073d398dc4841f62488ac6060ffeb9dfce6e0a98 (patch) | |
| tree | 2ae9d508d0cd27f02584b9befb063dda5cb11a0b /tools/testing/selftests/x86/syscall_arg_fault.c | |
| parent | afca861bc6a3141c858d08279eb9afca76584fa6 (diff) | |
| parent | 92ed301919932f777713b9172e525674157e983d (diff) | |
Merge tag 'v5.8-rc7' into i2c/for-5.9
Diffstat (limited to 'tools/testing/selftests/x86/syscall_arg_fault.c')
| -rw-r--r-- | tools/testing/selftests/x86/syscall_arg_fault.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/tools/testing/selftests/x86/syscall_arg_fault.c b/tools/testing/selftests/x86/syscall_arg_fault.c index bc0ecc2e862e..5b7abebbcbb9 100644 --- a/tools/testing/selftests/x86/syscall_arg_fault.c +++ b/tools/testing/selftests/x86/syscall_arg_fault.c @@ -15,30 +15,11 @@ #include <setjmp.h> #include <errno.h> -#ifdef __x86_64__ -# define WIDTH "q" -#else -# define WIDTH "l" -#endif +#include "helpers.h" /* Our sigaltstack scratch space. */ static unsigned char altstack_data[SIGSTKSZ]; -static unsigned long get_eflags(void) -{ - unsigned long eflags; - asm volatile ("pushf" WIDTH "\n\tpop" WIDTH " %0" : "=rm" (eflags)); - return eflags; -} - -static void set_eflags(unsigned long eflags) -{ - asm volatile ("push" WIDTH " %0\n\tpopf" WIDTH - : : "rm" (eflags) : "flags"); -} - -#define X86_EFLAGS_TF (1UL << 8) - static void sethandler(int sig, void (*handler)(int, siginfo_t *, void *), int flags) { |