13 #include <linux/sched.h>
16 #include <linux/kernel.h>
17 #include <linux/signal.h>
18 #include <linux/errno.h>
19 #include <linux/wait.h>
21 #include <linux/stddef.h>
22 #include <linux/personality.h>
24 #include <asm/cacheflush.h>
25 #include <asm/ucontext.h>
26 #include <asm/uaccess.h>
32 unsigned long r2,
unsigned long r3,
unsigned long r4,
62 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
99 unsigned long r2,
unsigned long r3,
unsigned long r4,
113 if (restore_sigcontext(regs, &frame->
uc.uc_mcontext, &
result))
136 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
173 static inline void __user *
174 get_sigframe(
struct k_sigaction *ka,
unsigned long sp,
size_t frame_size)
178 if (sas_ss_flags(sp) == 0)
182 return (
void __user *)((sp - frame_size) & -8ul);
192 frame = get_sigframe(ka, regs->
spu,
sizeof(*frame));
218 &frame->
uc.uc_stack.ss_flags);
220 err |= setup_sigcontext(&frame->
uc.uc_mcontext, regs,
set->sig[0]);
226 regs->
lr = (
unsigned long)ka->
sa.sa_restorer;
232 regs->
r2 = (
unsigned long)&frame->
uc;
233 regs->
bpc = (
unsigned long)ka->
sa.sa_handler;
238 printk(
"SIG deliver (%s:%d): sp=%p pc=%p\n",
249 static int prev_insn(
struct pt_regs *regs)
254 if ((inst & 0xfff0) == 0x10f0)
287 if (prev_insn(regs) < 0)
293 if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs))
328 handle_signal(signr, &ka, &info, regs);
347 restore_saved_sigmask();
366 tracehook_notify_resume(regs);