1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2006 Atmark Techno, Inc. 4 */ 5 #ifndef _ASM_MICROBLAZE_PTRACE_H 6 #define _ASM_MICROBLAZE_PTRACE_H 7 8 #include <uapi/asm/ptrace.h> 9 10 #ifndef __ASSEMBLY__ 11 #define kernel_mode(regs) ((regs)->pt_mode) 12 #define user_mode(regs) (!kernel_mode(regs)) 13 14 #define instruction_pointer(regs) ((regs)->pc) 15 #define profile_pc(regs) instruction_pointer(regs) 16 #define user_stack_pointer(regs) ((regs)->r1) 17 18 static inline long regs_return_value(struct pt_regs *regs) 19 { 20 return regs->r3; 21 } 22 23 #endif /* __ASSEMBLY__ */ 24 #endif /* _ASM_MICROBLAZE_PTRACE_H */ 25