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