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