16 #include <linux/sched.h>
19 #include <linux/kernel.h>
20 #include <linux/signal.h>
21 #include <linux/errno.h>
22 #include <linux/wait.h>
23 #include <linux/ptrace.h>
25 #include <linux/stddef.h>
27 #include <asm/processor.h>
28 #include <asm/ucontext.h>
29 #include <asm/uaccess.h>
30 #include <arch/system.h>
40 #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2;
52 siginitset(&blocked, mask);
70 siginitset(&new_ka.
sa.sa_mask, mask);
115 unsigned int err = 0;
116 unsigned long old_usp;
131 regs->
dccr |= 1 << 8;
166 if (((
long)frame) & 3)
174 sizeof(frame->extramask))))
179 if (restore_sigcontext(regs, &frame->sc))
204 if (((
long)frame) & 3)
214 if (restore_sigcontext(regs, &frame->uc.uc_mcontext))
231 static int setup_sigcontext(
struct sigcontext __user *
sc,
235 unsigned long usp = rdusp();
258 static inline void __user *
261 unsigned long sp = rdusp();
265 if (! on_sig_stack(sp))
273 return (
void __user*)(sp - frame_size);
288 unsigned long return_ip;
291 frame = get_sigframe(ka, regs,
sizeof(*frame));
296 err |= setup_sigcontext(&frame->
sc, regs,
set->sig[0]);
310 return_ip = (
unsigned long)ka->
sa.sa_restorer;
325 regs->
irp = (
unsigned long) ka->
sa.sa_handler;
326 regs->
srp = return_ip;
344 unsigned long return_ip;
347 frame = get_sigframe(ka, regs,
sizeof(*frame));
361 err |= setup_sigcontext(&frame->
uc.uc_mcontext, regs,
set->sig[0]);
371 return_ip = (
unsigned long)ka->
sa.sa_restorer;
378 (
short __user *)(frame->
retcode+2));
390 regs->
irp = (
unsigned long) ka->
sa.sa_handler;
392 regs->
srp = return_ip;
396 regs->
r11 = (
unsigned long)&frame->
info;
401 wrusp((
unsigned long)frame);
414 static inline void handle_signal(
int canrestart,
unsigned long sig,
418 sigset_t *oldset = sigmask_to_save();
451 ret = setup_rt_frame(sig, ka, info, oldset, regs);
453 ret = setup_frame(sig, ka, oldset, regs);
489 handle_signal(canrestart, signr, &info, &ka, regs);
509 restore_saved_sigmask();