treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / alpha / include / asm / ptrace.h
blobdf5f317ab3fcba67152fae5971c3471f105b125d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASMAXP_PTRACE_H
3 #define _ASMAXP_PTRACE_H
5 #include <uapi/asm/ptrace.h>
8 #define arch_has_single_step() (1)
9 #define user_mode(regs) (((regs)->ps & 8) != 0)
10 #define instruction_pointer(regs) ((regs)->pc)
11 #define profile_pc(regs) instruction_pointer(regs)
12 #define current_user_stack_pointer() rdusp()
14 #define task_pt_regs(task) \
15 ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1)
17 #define current_pt_regs() \
18 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
19 #define signal_pt_regs current_pt_regs
21 #define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
23 static inline unsigned long regs_return_value(struct pt_regs *regs)
25 return regs->r0;
28 #endif