Lines Matching refs:regs
36 extern asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
79 static_unused int _sys_sigsuspend(struct pt_regs regs) in _sys_sigsuspend() argument
83 uset = (sigset_t *) regs.regs[4]; in _sys_sigsuspend()
94 regs.regs[2] = EINTR; in _sys_sigsuspend()
95 regs.regs[7] = 1; in _sys_sigsuspend()
99 if (do_signal(&saveset, ®s)) in _sys_sigsuspend()
105 static_unused int _sys_rt_sigsuspend(struct pt_regs regs) in _sys_rt_sigsuspend() argument
111 sigsetsize = regs.regs[5]; in _sys_rt_sigsuspend()
115 unewset = (sigset_t *) regs.regs[4]; in _sys_rt_sigsuspend()
126 regs.regs[2] = EINTR; in _sys_rt_sigsuspend()
127 regs.regs[7] = 1; in _sys_rt_sigsuspend()
131 if (do_signal(&saveset, ®s)) in _sys_rt_sigsuspend()
175 asmlinkage int sys_sigaltstack(struct pt_regs regs) in sys_sigaltstack() argument
177 const stack_t *uss = (const stack_t *) regs.regs[4]; in sys_sigaltstack()
178 stack_t *uoss = (stack_t *) regs.regs[5]; in sys_sigaltstack()
179 unsigned long usp = regs.regs[29]; in sys_sigaltstack()
184 static int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) in restore_sigcontext() argument
189 err |= __get_user(regs->cp0_epc, &sc->sc_pc); in restore_sigcontext()
192 regs->hi = (int) reg; in restore_sigcontext()
194 regs->lo = (int) reg; in restore_sigcontext()
198 regs->regs[i] = reg; \ in restore_sigcontext()
241 asmlinkage void sys_sigreturn(struct pt_regs regs) in sys_sigreturn() argument
246 frame = (struct sigframe *) regs.regs[29]; in sys_sigreturn()
258 if (restore_sigcontext(®s, &frame->sf_sc)) in sys_sigreturn()
270 :"r" (®s)); in sys_sigreturn()
277 asmlinkage void sys_rt_sigreturn(struct pt_regs regs) in sys_rt_sigreturn() argument
283 frame = (struct rt_sigframe *) regs.regs[29]; in sys_rt_sigreturn()
295 if (restore_sigcontext(®s, &frame->rs_uc.uc_mcontext)) in sys_rt_sigreturn()
302 do_sigaltstack(&st, NULL, regs.regs[29]); in sys_rt_sigreturn()
311 :"r" (®s)); in sys_rt_sigreturn()
318 static int inline setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc) in setup_sigcontext() argument
323 reg = regs->cp0_epc; err |= __put_user(reg, &sc->sc_pc); in setup_sigcontext()
324 err |= __put_user(regs->cp0_status, &sc->sc_status); in setup_sigcontext()
327 reg = regs->regs[i]; \ in setup_sigcontext()
342 reg = regs->hi; err |= __put_user(reg, &sc->sc_mdhi); in setup_sigcontext()
343 reg = regs->lo; err |= __put_user(reg, &sc->sc_mdlo); in setup_sigcontext()
344 err |= __put_user(regs->cp0_cause, &sc->sc_cause); in setup_sigcontext()
345 err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr); in setup_sigcontext()
369 static inline void * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, in get_sigframe() argument
375 sp = regs->regs[29]; in get_sigframe()
391 static void inline setup_frame(struct k_sigaction * ka, struct pt_regs *regs, in setup_frame() argument
397 frame = get_sigframe(ka, regs, sizeof(*frame)); in setup_frame()
411 err |= setup_sigcontext(regs, &frame->sf_sc); in setup_frame()
426 regs->regs[ 4] = signr; in setup_frame()
427 regs->regs[ 5] = 0; in setup_frame()
428 regs->regs[ 6] = (unsigned long) &frame->sf_sc; in setup_frame()
429 regs->regs[29] = (unsigned long) frame; in setup_frame()
430 regs->regs[31] = (unsigned long) frame->sf_code; in setup_frame()
431 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; in setup_frame()
436 frame, regs->cp0_epc, frame->sf_code); in setup_frame()
446 static void inline setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, in setup_rt_frame() argument
452 frame = get_sigframe(ka, regs, sizeof(*frame)); in setup_rt_frame()
474 err |= __put_user(sas_ss_flags(regs->regs[29]), in setup_rt_frame()
478 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); in setup_rt_frame()
494 regs->regs[ 4] = signr; in setup_rt_frame()
495 regs->regs[ 5] = (unsigned long) &frame->rs_info; in setup_rt_frame()
496 regs->regs[ 6] = (unsigned long) &frame->rs_uc; in setup_rt_frame()
497 regs->regs[29] = (unsigned long) frame; in setup_rt_frame()
498 regs->regs[31] = (unsigned long) frame->rs_code; in setup_rt_frame()
499 regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler; in setup_rt_frame()
504 frame, regs->cp0_epc, frame->rs_code); in setup_rt_frame()
515 siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) in handle_signal() argument
518 setup_rt_frame(ka, regs, sig, oldset, info); in handle_signal()
520 setup_frame(ka, regs, sig, oldset); in handle_signal()
533 static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) in syscall_restart() argument
535 switch(regs->regs[0]) { in syscall_restart()
537 regs->regs[2] = EINTR; in syscall_restart()
541 regs->regs[2] = EINTR; in syscall_restart()
546 regs->regs[7] = regs->regs[26]; in syscall_restart()
547 regs->cp0_epc -= 8; in syscall_restart()
550 regs->regs[0] = 0; /* Don't deal with this again. */ in syscall_restart()
553 extern int do_irix_signal(sigset_t *oldset, struct pt_regs *regs);
555 asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) in do_signal() argument
562 return do_irix_signal(oldset, regs); in do_signal()
647 if (do_coredump(signr, regs)) in do_signal()
657 if (regs->regs[0]) in do_signal()
658 syscall_restart(regs, ka); in do_signal()
660 handle_signal(signr, ka, &info, oldset, regs); in do_signal()
669 if (regs->regs[0]) { in do_signal()
670 if (regs->regs[2] == ERESTARTNOHAND || in do_signal()
671 regs->regs[2] == ERESTARTSYS || in do_signal()
672 regs->regs[2] == ERESTARTNOINTR) { in do_signal()
673 regs->regs[7] = regs->regs[26]; in do_signal()
674 regs->cp0_epc -= 8; in do_signal()