This source file includes following definitions.
- regs_return_value
1
2
3
4
5
6
7
8
9
10 #ifndef _XTENSA_PTRACE_H
11 #define _XTENSA_PTRACE_H
12
13 #include <asm/kmem_layout.h>
14 #include <uapi/asm/ptrace.h>
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 #define NO_SYSCALL (-1)
43
44 #ifndef __ASSEMBLY__
45
46 #include <asm/coprocessor.h>
47
48
49
50
51
52 struct pt_regs {
53 unsigned long pc;
54 unsigned long ps;
55 unsigned long depc;
56 unsigned long exccause;
57 unsigned long excvaddr;
58 unsigned long debugcause;
59 unsigned long wmask;
60 unsigned long lbeg;
61 unsigned long lend;
62 unsigned long lcount;
63 unsigned long sar;
64 unsigned long windowbase;
65 unsigned long windowstart;
66 unsigned long syscall;
67 unsigned long icountlevel;
68 unsigned long scompare1;
69 unsigned long threadptr;
70
71
72 xtregs_opt_t xtregs_opt;
73
74
75 int align[0] __attribute__ ((aligned(16)));
76
77
78
79
80 unsigned long areg[16];
81 };
82
83 #include <asm/core.h>
84
85 # define arch_has_single_step() (1)
86 # define task_pt_regs(tsk) ((struct pt_regs*) \
87 (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
88 # define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
89 # define instruction_pointer(regs) ((regs)->pc)
90 # define return_pointer(regs) (MAKE_PC_FROM_RA((regs)->areg[0], \
91 (regs)->areg[1]))
92
93 # ifndef CONFIG_SMP
94 # define profile_pc(regs) instruction_pointer(regs)
95 # else
96 # define profile_pc(regs) \
97 ({ \
98 in_lock_functions(instruction_pointer(regs)) ? \
99 return_pointer(regs) : instruction_pointer(regs); \
100 })
101 # endif
102
103 #define user_stack_pointer(regs) ((regs)->areg[1])
104
105 static inline unsigned long regs_return_value(struct pt_regs *regs)
106 {
107 return regs->areg[2];
108 }
109
110 #else
111
112 # include <asm/asm-offsets.h>
113 #define PT_REGS_OFFSET (KERNEL_STACK_SIZE - PT_USER_SIZE)
114
115 #endif
116
117 #endif