Lines Matching refs:regs
35 extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
78 static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs) in _sys_rt_sigsuspend() argument
84 sigsetsize = regs.regs[5]; in _sys_rt_sigsuspend()
88 unewset = (sigset_t *) regs.regs[4]; in _sys_rt_sigsuspend()
99 regs.regs[2] = EINTR; in _sys_rt_sigsuspend()
100 regs.regs[7] = 1; in _sys_rt_sigsuspend()
104 if (do_signal(&saveset, ®s)) in _sys_rt_sigsuspend()
109 asmlinkage int sys_sigaltstack(abi64_no_regargs, struct pt_regs regs) in sys_sigaltstack() argument
111 const stack_t *uss = (const stack_t *) regs.regs[4]; in sys_sigaltstack()
112 stack_t *uoss = (stack_t *) regs.regs[5]; in sys_sigaltstack()
113 unsigned long usp = regs.regs[29]; in sys_sigaltstack()
118 asmlinkage int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) in restore_sigcontext() argument
122 err |= __get_user(regs->cp0_epc, &sc->sc_pc); in restore_sigcontext()
123 err |= __get_user(regs->hi, &sc->sc_mdhi); in restore_sigcontext()
124 err |= __get_user(regs->lo, &sc->sc_mdlo); in restore_sigcontext()
127 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \ in restore_sigcontext()
163 asmlinkage void sys_rt_sigreturn(abi64_no_regargs, struct pt_regs regs) in sys_rt_sigreturn() argument
169 frame = (struct rt_sigframe *) regs.regs[29]; in sys_rt_sigreturn()
181 if (restore_sigcontext(®s, &frame->rs_uc.uc_mcontext)) in sys_rt_sigreturn()
188 do_sigaltstack(&st, NULL, regs.regs[29]); in sys_rt_sigreturn()
197 :"r" (®s)); in sys_rt_sigreturn()
204 int inline setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc) in setup_sigcontext() argument
208 err |= __put_user(regs->cp0_epc, &sc->sc_pc); in setup_sigcontext()
209 err |= __put_user(regs->cp0_status, &sc->sc_status); in setup_sigcontext()
212 err |= __put_user(regs->regs[i], &sc->sc_regs[i]); \ in setup_sigcontext()
225 err |= __put_user(regs->hi, &sc->sc_mdhi); in setup_sigcontext()
226 err |= __put_user(regs->lo, &sc->sc_mdlo); in setup_sigcontext()
227 err |= __put_user(regs->cp0_cause, &sc->sc_cause); in setup_sigcontext()
228 err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr); in setup_sigcontext()
252 static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, in get_sigframe() argument
258 sp = regs->regs[29]; in get_sigframe()
275 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info) in setup_rt_frame() argument
280 frame = get_sigframe(ka, regs, sizeof(*frame)); in setup_rt_frame()
302 err |= __put_user(sas_ss_flags(regs->regs[29]), in setup_rt_frame()
306 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); in setup_rt_frame()
322 regs->regs[ 4] = signr; in setup_rt_frame()
323 regs->regs[ 5] = (unsigned long) &frame->rs_info; in setup_rt_frame()
324 regs->regs[ 6] = (unsigned long) &frame->rs_uc; in setup_rt_frame()
325 regs->regs[29] = (unsigned long) frame; in setup_rt_frame()
326 regs->regs[31] = (unsigned long) frame->rs_code; in setup_rt_frame()
327 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; in setup_rt_frame()
332 frame, regs->cp0_epc, regs->regs[31]); in setup_rt_frame()
343 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info);
346 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) in handle_signal() argument
350 setup_rt_frame_n32 (ka, regs, sig, oldset, info); in handle_signal()
353 setup_rt_frame(ka, regs, sig, oldset, info); in handle_signal()
366 static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) in syscall_restart() argument
368 switch(regs->regs[0]) { in syscall_restart()
370 regs->regs[2] = EINTR; in syscall_restart()
374 regs->regs[2] = EINTR; in syscall_restart()
379 regs->regs[7] = regs->regs[26]; in syscall_restart()
380 regs->cp0_epc -= 8; in syscall_restart()
383 regs->regs[0] = 0; /* Don't deal with this again. */ in syscall_restart()
386 extern int do_irix_signal(sigset_t *oldset, struct pt_regs *regs);
387 extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
389 asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) in do_signal() argument
396 return do_signal32(oldset, regs); in do_signal()
482 if (do_coredump(signr, regs)) in do_signal()
492 if (regs->regs[0]) in do_signal()
493 syscall_restart(regs, ka); in do_signal()
495 handle_signal(signr, ka, &info, oldset, regs); in do_signal()
504 if (regs->regs[0]) { in do_signal()
505 if (regs->regs[2] == ERESTARTNOHAND || in do_signal()
506 regs->regs[2] == ERESTARTSYS || in do_signal()
507 regs->regs[2] == ERESTARTNOINTR) { in do_signal()
508 regs->regs[7] = regs->regs[26]; in do_signal()
509 regs->cp0_epc -= 8; in do_signal()