xref: /openbmc/linux/arch/m68k/include/asm/ptrace.h (revision cfbb9be8)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _M68K_PTRACE_H
3 #define _M68K_PTRACE_H
4 
5 #include <uapi/asm/ptrace.h>
6 
7 #ifndef __ASSEMBLY__
8 
9 #ifndef PS_S
10 #define PS_S  (0x2000)
11 #define PS_M  (0x1000)
12 #endif
13 
14 #define user_mode(regs) (!((regs)->sr & PS_S))
15 #define instruction_pointer(regs) ((regs)->pc)
16 #define profile_pc(regs) instruction_pointer(regs)
17 #define current_pt_regs() \
18 	(struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1
19 #define current_user_stack_pointer() rdusp()
20 
21 #define arch_has_single_step()	(1)
22 
23 #ifdef CONFIG_MMU
24 #define arch_has_block_step()	(1)
25 #endif
26 
27 #endif /* __ASSEMBLY__ */
28 #endif /* _M68K_PTRACE_H */
29