aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/include/asm/ptrace.h')
-rw-r--r--arch/arc/include/asm/ptrace.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h
index 3afadefe335f..3ec89f467ac3 100644
--- a/arch/arc/include/asm/ptrace.h
+++ b/arch/arc/include/asm/ptrace.h
@@ -50,7 +50,17 @@ struct pt_regs {
50 long r0; 50 long r0;
51 long sp; /* user/kernel sp depending on where we came from */ 51 long sp; /* user/kernel sp depending on where we came from */
52 long orig_r0; 52 long orig_r0;
53 long orig_r8; /*to distinguish bet excp, sys call, int1 or int2 */ 53
54 /*to distinguish bet excp, syscall, irq */
55 union {
56#ifdef CONFIG_CPU_BIG_ENDIAN
57 /* so that assembly code is same for LE/BE */
58 unsigned long orig_r8:16, event:16;
59#else
60 unsigned long event:16, orig_r8:16;
61#endif
62 long orig_r8_word;
63 };
54}; 64};
55 65
56/* Callee saved registers - need to be saved only when you are scheduled out */ 66/* Callee saved registers - need to be saved only when you are scheduled out */
@@ -87,9 +97,8 @@ struct callee_regs {
87 sp; \ 97 sp; \
88}) 98})
89 99
90/* return 1 if in syscall, 0 if Intr or Exception */ 100#define in_syscall(regs) (regs->event & orig_r8_IS_SCALL)
91#define in_syscall(regs) (((regs->orig_r8) >= 0 && \ 101#define in_brkpt_trap(regs) (regs->event & orig_r8_IS_BRKPT)
92 (regs->orig_r8 <= NR_syscalls)) ? 1 : 0)
93 102
94#define current_pt_regs() \ 103#define current_pt_regs() \
95({ \ 104({ \
@@ -101,6 +110,13 @@ struct callee_regs {
101 110
102#endif /* !__ASSEMBLY__ */ 111#endif /* !__ASSEMBLY__ */
103 112
113#define orig_r8_IS_SCALL 0x0001
114#define orig_r8_IS_SCALL_RESTARTED 0x0002
115#define orig_r8_IS_BRKPT 0x0004
116#define orig_r8_IS_EXCPN 0x0004
117#define orig_r8_IS_IRQ1 0x0010
118#define orig_r8_IS_IRQ2 0x0020
119
104#endif /* __KERNEL__ */ 120#endif /* __KERNEL__ */
105 121
106#ifndef __ASSEMBLY__ 122#ifndef __ASSEMBLY__