13 #include <linux/kernel.h>
14 #include <linux/sched.h>
17 #include <linux/errno.h>
18 #include <linux/ptrace.h>
21 #include <linux/signal.h>
23 #include <linux/elf.h>
26 #include <asm/uaccess.h>
28 #include <asm/pgtable.h>
29 #include <asm/processor.h>
30 #include <asm/unistd.h>
42 unsigned int pos,
unsigned int count,
43 void *kbuf,
void __user *ubuf)
48 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
49 iregs, 0,
sizeof(*iregs));
53 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
62 unsigned int pos,
unsigned int count,
63 const void *kbuf,
const void __user *ubuf)
66 unsigned int offs_gr0, offs_gr1;
81 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
87 ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
93 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
94 &iregs->
gr[1], offs_gr1,
sizeof(*iregs));
98 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
107 unsigned int pos,
unsigned int count,
108 void *kbuf,
void __user *ubuf)
113 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
114 fpregs, 0,
sizeof(*fpregs));
118 return user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
119 sizeof(*fpregs), -1);
127 unsigned int pos,
unsigned int count,
128 const void *kbuf,
const void __user *ubuf)
133 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
134 fpregs, 0,
sizeof(*fpregs));
138 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
139 sizeof(*fpregs), -1);
145 static int fpmregs_active(
struct task_struct *target,
168 .size =
sizeof(
long),
169 .
align =
sizeof(
long),
181 .
align =
sizeof(
long),
184 .active = fpmregs_active,
191 .regsets = frv_regsets,
197 return &user_frv_native_view;
207 if (regno < 0 || regno >=
PT__END)
210 return ((
unsigned long *) user)[regno];
221 if (regno < 0 || regno >=
PT__END)
231 ((
unsigned long *) user)[regno] =
data;
257 unsigned long addr,
unsigned long data)
261 int regno = addr >> 2;
262 unsigned long __user *datap = (
unsigned long __user *) data;
279 tmp = child->
mm->end_code - child->
mm->start_code;
283 tmp = child->
mm->end_data - child->
mm->start_data;
287 tmp = child->
mm->start_stack - child->
mm->start_brk;
291 tmp = child->
mm->start_code;
295 tmp = child->
mm->start_stack;
315 ret =
put_reg(child, regno, data);
321 return copy_regset_to_user(child, &user_frv_native_view,
323 0,
sizeof(child->
thread.user->i),
327 return copy_regset_from_user(child, &user_frv_native_view,
329 0,
sizeof(child->
thread.user->i),
333 return copy_regset_to_user(child, &user_frv_native_view,
335 0,
sizeof(child->
thread.user->f),
339 return copy_regset_from_user(child, &user_frv_native_view,
341 0,
sizeof(child->
thread.user->f),
358 if (tracehook_report_syscall_entry(__frame)) {
367 return __frame->syscallno;
376 tracehook_report_syscall_exit(__frame, 0);