Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. |
| 3 | * |
| 4 | * This file is subject to the terms and conditions of the GNU General Public |
| 5 | * License. See the file "COPYING" in the main directory of this archive |
| 6 | * for more details. |
| 7 | */ |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 8 | #ifndef _ASM_MICROBLAZE_PTRACE_H |
| 9 | #define _ASM_MICROBLAZE_PTRACE_H |
| 10 | |
David Howells | 3cb0eab | 2012-10-09 09:47:10 +0100 | [diff] [blame] | 11 | #include <uapi/asm/ptrace.h> |
| 12 | |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 13 | #ifndef __ASSEMBLY__ |
Michal Simek | ac3efab | 2009-04-16 10:58:47 +0200 | [diff] [blame] | 14 | #define kernel_mode(regs) ((regs)->pt_mode) |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 15 | #define user_mode(regs) (!kernel_mode(regs)) |
| 16 | |
| 17 | #define instruction_pointer(regs) ((regs)->pc) |
| 18 | #define profile_pc(regs) instruction_pointer(regs) |
Al Viro | 5208ba2 | 2012-12-14 01:50:19 -0500 | [diff] [blame] | 19 | #define user_stack_pointer(regs) ((regs)->r1) |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 20 | |
Eric Paris | d7e7528 | 2012-01-03 14:23:06 -0500 | [diff] [blame] | 21 | static inline long regs_return_value(struct pt_regs *regs) |
| 22 | { |
| 23 | return regs->r3; |
| 24 | } |
| 25 | |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 26 | #endif /* __ASSEMBLY__ */ |
Michal Simek | 2b43845 | 2009-03-27 14:25:27 +0100 | [diff] [blame] | 27 | #endif /* _ASM_MICROBLAZE_PTRACE_H */ |