1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2230d1866SGreg Ungerer #ifndef _M68K_PTRACE_H 3230d1866SGreg Ungerer #define _M68K_PTRACE_H 4230d1866SGreg Ungerer 510b3a979SDavid Howells #include <uapi/asm/ptrace.h> 6230d1866SGreg Ungerer 7230d1866SGreg Ungerer #ifndef __ASSEMBLY__ 8230d1866SGreg Ungerer 9230d1866SGreg Ungerer #ifndef PS_S 10230d1866SGreg Ungerer #define PS_S (0x2000) 11230d1866SGreg Ungerer #define PS_M (0x1000) 12230d1866SGreg Ungerer #endif 13230d1866SGreg Ungerer 14230d1866SGreg Ungerer #define user_mode(regs) (!((regs)->sr & PS_S)) 15230d1866SGreg Ungerer #define instruction_pointer(regs) ((regs)->pc) 16230d1866SGreg Ungerer #define profile_pc(regs) instruction_pointer(regs) 17d878d6daSAl Viro #define current_pt_regs() \ 18d878d6daSAl Viro (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1 191ca97bb5SAl Viro #define current_user_stack_pointer() rdusp() 20faa47b46SAndreas Schwab 21faa47b46SAndreas Schwab #define arch_has_single_step() (1) 22faa47b46SAndreas Schwab 23f60a5572SGreg Ungerer #ifdef CONFIG_MMU 24faa47b46SAndreas Schwab #define arch_has_block_step() (1) 25faa47b46SAndreas Schwab #endif 26faa47b46SAndreas Schwab 27230d1866SGreg Ungerer #endif /* __ASSEMBLY__ */ 28230d1866SGreg Ungerer #endif /* _M68K_PTRACE_H */ 29