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>
20 #include <linux/personality.h>
21 #include <linux/ptrace.h>
23 #include <linux/stddef.h>
25 #include <asm/ucontext.h>
26 #include <asm/uaccess.h>
27 #include <asm/pgtable.h>
28 #include <asm/cacheflush.h>
37 #define REF_REG_RET regs->regs[REG_RET]
38 #define REF_REG_SP regs->regs[REG_SP]
39 #define DEREF_REG_PR regs->regs[REG_PR]
58 no_system_call_restart:
64 goto no_system_call_restart;
100 handle_syscall_restart(regs, &ka.sa);
103 handle_signal(signr, &info, &ka, regs);
127 restore_saved_sigmask();
137 siginitset(&blocked, mask);
156 siginitset(&new_ka.
sa.sa_mask, mask);
164 __put_user(old_ka.
sa.sa_restorer, &oact->sa_restorer) ||
175 unsigned long r4,
unsigned long r5,
unsigned long r6,
217 (
sizeof(
long long) * 32) + (
sizeof(
int) * 1));
242 (
sizeof(
long long) * 32) + (
sizeof(
int) * 1));
263 unsigned int err = 0;
264 unsigned long long current_sr, new_sr;
265 #define SR_MASK 0xffff8cfd
267 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
291 current_sr = regs->
sr;
302 err |= restore_sigcontext_fpu(regs, sc);
310 unsigned long r4,
unsigned long r5,
311 unsigned long r6,
unsigned long r7,
344 unsigned long r4,
unsigned long r5,
345 unsigned long r6,
unsigned long r7,
389 err |= setup_sigcontext_fpu(regs, sc);
391 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
423 static inline void __user *
426 if ((ka->
sa.sa_flags &
SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
429 return (
void __user *)((sp - frame_size) & -8ul);
474 ka->
sa.sa_restorer | 0x1);
502 regs->
regs[
REG_SP] = neff_sign_extend((
unsigned long)frame);
517 regs->
pc = neff_sign_extend((
unsigned long)ka->
sa.sa_handler);
522 pr_debug(
"SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
524 regs->
pc >> 32, regs->
pc & 0xffffffff,
564 &frame->
uc.uc_stack.ss_sp);
566 &frame->
uc.uc_stack.ss_flags);
583 ka->
sa.sa_restorer | 0x1);
611 regs->
regs[
REG_SP] = neff_sign_extend((
unsigned long)frame);
614 regs->
regs[
REG_ARG3] = (
unsigned long long)(
unsigned long)(
signed long)&frame->
uc.uc_mcontext;
615 regs->
pc = neff_sign_extend((
unsigned long)ka->
sa.sa_handler);
619 pr_debug(
"SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
621 regs->
pc >> 32, regs->
pc & 0xffffffff,
638 sigset_t *oldset = sigmask_to_save();
643 ret = setup_rt_frame(sig, ka, info, oldset, regs);
645 ret = setup_frame(sig, ka, oldset, regs);
661 tracehook_notify_resume(regs);