5 #include <linux/sched.h>
7 #include <linux/slab.h>
8 #include <linux/kernel.h>
9 #include <linux/signal.h>
10 #include <linux/errno.h>
11 #include <linux/wait.h>
12 #include <linux/ptrace.h>
14 #include <linux/stddef.h>
19 #include <asm/processor.h>
20 #include <asm/ucontext.h>
21 #include <asm/uaccess.h>
22 #include <arch/ptrace.h>
34 #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->erp -= 2;
62 siginitset(&blocked, mask);
84 siginitset(&newk.
sa.sa_mask, mask);
89 if (!retval && oact) {
111 unsigned int err = 0;
112 unsigned long old_usp;
145 unsigned long oldspc = regs->
spc;
146 unsigned long oldccs = regs->
ccs;
155 if (((
long)frame) & 3)
164 sizeof(frame->extramask))))
169 if (restore_sigcontext(regs, &frame->sc))
188 unsigned long oldspc = regs->
spc;
189 unsigned long oldccs = regs->
ccs;
198 if (((
long)frame) & 3)
209 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
248 static inline void __user *
257 if (!on_sig_stack(sp))
264 return (
void __user *)(sp - frame_size);
279 unsigned long return_ip;
283 frame = get_sigframe(ka, regs,
sizeof(*frame));
288 err |= setup_sigcontext(&frame->
sc, regs,
set->sig[0]);
306 return_ip = (
unsigned long)ka->
sa.sa_restorer;
333 regs->
erp = (
unsigned long) ka->
sa.sa_handler;
334 regs->
srp = return_ip;
352 unsigned long return_ip;
356 frame = get_sigframe(ka, regs,
sizeof(*frame));
372 err |= setup_sigcontext(&frame->
uc.uc_mcontext, regs,
set->sig[0]);
383 return_ip = (
unsigned long) ka->
sa.sa_restorer;
398 (
short __user*)(frame->
retcode+2));
415 regs->
erp = (
unsigned long) ka->
sa.sa_handler;
416 regs->
srp = return_ip;
418 regs->
r11 = (
unsigned long) &frame->
info;
422 wrusp((
unsigned long)frame);
433 handle_signal(
int canrestart,
unsigned long sig,
437 sigset_t *oldset = sigmask_to_save();
483 ret = setup_rt_frame(sig, ka, info, oldset, regs);
485 ret = setup_frame(sig, ka, oldset, regs);
521 handle_signal(canrestart, signr, &info, &ka, regs);
542 restore_saved_sigmask();
575 printk(
"Q flag but no S flag?");
587 }
else if (regs->
spc) {