• Home
  • Raw
  • Download

Lines Matching refs:regs

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]
44 handle_signal(struct ksignal *ksig, struct pt_regs *regs);
47 handle_syscall_restart(struct pt_regs *regs, struct sigaction *sa) in handle_syscall_restart() argument
50 if (regs->syscall_nr < 0) in handle_syscall_restart()
54 switch (regs->regs[REG_RET]) { in handle_syscall_restart()
58 regs->regs[REG_RET] = -EINTR; in handle_syscall_restart()
67 regs->regs[REG_RET] = regs->syscall_nr; in handle_syscall_restart()
68 regs->pc -= 4; in handle_syscall_restart()
82 static void do_signal(struct pt_regs *regs) in do_signal() argument
92 if (!user_mode(regs)) in do_signal()
96 handle_syscall_restart(regs, &ksig.ka.sa); in do_signal()
99 handle_signal(&ksig, regs); in do_signal()
104 if (regs->syscall_nr >= 0) { in do_signal()
106 switch (regs->regs[REG_RET]) { in do_signal()
111 regs->regs[REG_RET] = regs->syscall_nr; in do_signal()
112 regs->pc -= 4; in do_signal()
116 regs->regs[REG_RET] = __NR_restart_syscall; in do_signal()
117 regs->pc -= 4; in do_signal()
145 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) in restore_sigcontext_fpu() argument
157 regs->sr |= SR_FD; in restore_sigcontext_fpu()
167 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) in setup_sigcontext_fpu() argument
182 regs->sr |= SR_FD; in setup_sigcontext_fpu()
193 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) in restore_sigcontext_fpu() argument
198 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) in setup_sigcontext_fpu() argument
205 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, long long *r2_p) in restore_sigcontext() argument
211 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) in restore_sigcontext()
213 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); in restore_sigcontext()
214 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); in restore_sigcontext()
215 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); in restore_sigcontext()
216 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); in restore_sigcontext()
217 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); in restore_sigcontext()
218 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); in restore_sigcontext()
219 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); in restore_sigcontext()
220 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); in restore_sigcontext()
221 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); in restore_sigcontext()
222 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); in restore_sigcontext()
223 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); in restore_sigcontext()
224 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); in restore_sigcontext()
225 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); in restore_sigcontext()
226 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); in restore_sigcontext()
227 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); in restore_sigcontext()
228 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); in restore_sigcontext()
235 current_sr = regs->sr; in restore_sigcontext()
237 regs->sr &= SR_MASK; in restore_sigcontext()
238 regs->sr |= (new_sr & ~SR_MASK); in restore_sigcontext()
246 err |= restore_sigcontext_fpu(regs, sc); in restore_sigcontext()
248 regs->syscall_nr = -1; /* disable syscall checks */ in restore_sigcontext()
256 struct pt_regs * regs) in sys_sigreturn() argument
276 if (restore_sigcontext(regs, &frame->sc, &ret)) in sys_sigreturn()
278 regs->pc -= 4; in sys_sigreturn()
290 struct pt_regs * regs) in sys_rt_sigreturn() argument
307 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ret)) in sys_rt_sigreturn()
309 regs->pc -= 4; in sys_rt_sigreturn()
325 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, in setup_sigcontext() argument
331 err |= setup_sigcontext_fpu(regs, sc); in setup_sigcontext()
333 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x) in setup_sigcontext()
335 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); in setup_sigcontext()
336 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); in setup_sigcontext()
337 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); in setup_sigcontext()
338 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); in setup_sigcontext()
339 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); in setup_sigcontext()
340 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); in setup_sigcontext()
341 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); in setup_sigcontext()
342 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); in setup_sigcontext()
343 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); in setup_sigcontext()
344 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); in setup_sigcontext()
345 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); in setup_sigcontext()
346 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); in setup_sigcontext()
347 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); in setup_sigcontext()
348 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); in setup_sigcontext()
349 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); in setup_sigcontext()
350 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); in setup_sigcontext()
377 static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_frame() argument
383 frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame)); in setup_frame()
388 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); in setup_frame()
437 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame); in setup_frame()
438 regs->regs[REG_ARG1] = sig; /* Arg for signal handler */ in setup_frame()
449 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc; in setup_frame()
450 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc; in setup_frame()
452 regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler); in setup_frame()
457 regs->pc >> 32, regs->pc & 0xffffffff, in setup_frame()
464 struct pt_regs *regs) in setup_rt_frame() argument
469 frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame)); in setup_rt_frame()
485 err |= __save_altstack(&frame->uc.uc_stack, regs->regs[REG_SP]); in setup_rt_frame()
487 regs, set->sig[0]); in setup_rt_frame()
529 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame); in setup_rt_frame()
530 regs->regs[REG_ARG1] = sig; /* Arg for signal handler */ in setup_rt_frame()
531 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info; in setup_rt_frame()
532 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext; in setup_rt_frame()
533 regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler); in setup_rt_frame()
537 regs->pc >> 32, regs->pc & 0xffffffff, in setup_rt_frame()
547 handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
554 ret = setup_rt_frame(ksig, oldset, regs); in handle_signal()
556 ret = setup_frame(ksig, oldset, regs); in handle_signal()
561 asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) in do_notify_resume() argument
564 do_signal(regs); in do_notify_resume()
568 tracehook_notify_resume(regs); in do_notify_resume()