/linux-4.1.27/arch/sh/kernel/ |
H A D | process_64.c | 38 void show_regs(struct pt_regs *regs) show_regs() argument 45 ah = (regs->pc) >> 32; show_regs() 46 al = (regs->pc) & 0xffffffff; show_regs() 47 bh = (regs->regs[18]) >> 32; show_regs() 48 bl = (regs->regs[18]) & 0xffffffff; show_regs() 49 ch = (regs->regs[15]) >> 32; show_regs() 50 cl = (regs->regs[15]) & 0xffffffff; show_regs() 54 ah = (regs->sr) >> 32; show_regs() 55 al = (regs->sr) & 0xffffffff; show_regs() 67 ah = (regs->regs[0]) >> 32; show_regs() 68 al = (regs->regs[0]) & 0xffffffff; show_regs() 69 bh = (regs->regs[1]) >> 32; show_regs() 70 bl = (regs->regs[1]) & 0xffffffff; show_regs() 71 ch = (regs->regs[2]) >> 32; show_regs() 72 cl = (regs->regs[2]) & 0xffffffff; show_regs() 76 ah = (regs->regs[3]) >> 32; show_regs() 77 al = (regs->regs[3]) & 0xffffffff; show_regs() 78 bh = (regs->regs[4]) >> 32; show_regs() 79 bl = (regs->regs[4]) & 0xffffffff; show_regs() 80 ch = (regs->regs[5]) >> 32; show_regs() 81 cl = (regs->regs[5]) & 0xffffffff; show_regs() 85 ah = (regs->regs[6]) >> 32; show_regs() 86 al = (regs->regs[6]) & 0xffffffff; show_regs() 87 bh = (regs->regs[7]) >> 32; show_regs() 88 bl = (regs->regs[7]) & 0xffffffff; show_regs() 89 ch = (regs->regs[8]) >> 32; show_regs() 90 cl = (regs->regs[8]) & 0xffffffff; show_regs() 94 ah = (regs->regs[9]) >> 32; show_regs() 95 al = (regs->regs[9]) & 0xffffffff; show_regs() 96 bh = (regs->regs[10]) >> 32; show_regs() 97 bl = (regs->regs[10]) & 0xffffffff; show_regs() 98 ch = (regs->regs[11]) >> 32; show_regs() 99 cl = (regs->regs[11]) & 0xffffffff; show_regs() 103 ah = (regs->regs[12]) >> 32; show_regs() 104 al = (regs->regs[12]) & 0xffffffff; show_regs() 105 bh = (regs->regs[13]) >> 32; show_regs() 106 bl = (regs->regs[13]) & 0xffffffff; show_regs() 107 ch = (regs->regs[14]) >> 32; show_regs() 108 cl = (regs->regs[14]) & 0xffffffff; show_regs() 112 ah = (regs->regs[16]) >> 32; show_regs() 113 al = (regs->regs[16]) & 0xffffffff; show_regs() 114 bh = (regs->regs[17]) >> 32; show_regs() 115 bl = (regs->regs[17]) & 0xffffffff; show_regs() 116 ch = (regs->regs[19]) >> 32; show_regs() 117 cl = (regs->regs[19]) & 0xffffffff; show_regs() 121 ah = (regs->regs[20]) >> 32; show_regs() 122 al = (regs->regs[20]) & 0xffffffff; show_regs() 123 bh = (regs->regs[21]) >> 32; show_regs() 124 bl = (regs->regs[21]) & 0xffffffff; show_regs() 125 ch = (regs->regs[22]) >> 32; show_regs() 126 cl = (regs->regs[22]) & 0xffffffff; show_regs() 130 ah = (regs->regs[23]) >> 32; show_regs() 131 al = (regs->regs[23]) & 0xffffffff; show_regs() 132 bh = (regs->regs[24]) >> 32; show_regs() 133 bl = (regs->regs[24]) & 0xffffffff; show_regs() 134 ch = (regs->regs[25]) >> 32; show_regs() 135 cl = (regs->regs[25]) & 0xffffffff; show_regs() 139 ah = (regs->regs[26]) >> 32; show_regs() 140 al = (regs->regs[26]) & 0xffffffff; show_regs() 141 bh = (regs->regs[27]) >> 32; show_regs() 142 bl = (regs->regs[27]) & 0xffffffff; show_regs() 143 ch = (regs->regs[28]) >> 32; show_regs() 144 cl = (regs->regs[28]) & 0xffffffff; show_regs() 148 ah = (regs->regs[29]) >> 32; show_regs() 149 al = (regs->regs[29]) & 0xffffffff; show_regs() 150 bh = (regs->regs[30]) >> 32; show_regs() 151 bl = (regs->regs[30]) & 0xffffffff; show_regs() 152 ch = (regs->regs[31]) >> 32; show_regs() 153 cl = (regs->regs[31]) & 0xffffffff; show_regs() 157 ah = (regs->regs[32]) >> 32; show_regs() 158 al = (regs->regs[32]) & 0xffffffff; show_regs() 159 bh = (regs->regs[33]) >> 32; show_regs() 160 bl = (regs->regs[33]) & 0xffffffff; show_regs() 161 ch = (regs->regs[34]) >> 32; show_regs() 162 cl = (regs->regs[34]) & 0xffffffff; show_regs() 166 ah = (regs->regs[35]) >> 32; show_regs() 167 al = (regs->regs[35]) & 0xffffffff; show_regs() 168 bh = (regs->regs[36]) >> 32; show_regs() 169 bl = (regs->regs[36]) & 0xffffffff; show_regs() 170 ch = (regs->regs[37]) >> 32; show_regs() 171 cl = (regs->regs[37]) & 0xffffffff; show_regs() 175 ah = (regs->regs[38]) >> 32; show_regs() 176 al = (regs->regs[38]) & 0xffffffff; show_regs() 177 bh = (regs->regs[39]) >> 32; show_regs() 178 bl = (regs->regs[39]) & 0xffffffff; show_regs() 179 ch = (regs->regs[40]) >> 32; show_regs() 180 cl = (regs->regs[40]) & 0xffffffff; show_regs() 184 ah = (regs->regs[41]) >> 32; show_regs() 185 al = (regs->regs[41]) & 0xffffffff; show_regs() 186 bh = (regs->regs[42]) >> 32; show_regs() 187 bl = (regs->regs[42]) & 0xffffffff; show_regs() 188 ch = (regs->regs[43]) >> 32; show_regs() 189 cl = (regs->regs[43]) & 0xffffffff; show_regs() 193 ah = (regs->regs[44]) >> 32; show_regs() 194 al = (regs->regs[44]) & 0xffffffff; show_regs() 195 bh = (regs->regs[45]) >> 32; show_regs() 196 bl = (regs->regs[45]) & 0xffffffff; show_regs() 197 ch = (regs->regs[46]) >> 32; show_regs() 198 cl = (regs->regs[46]) & 0xffffffff; show_regs() 202 ah = (regs->regs[47]) >> 32; show_regs() 203 al = (regs->regs[47]) & 0xffffffff; show_regs() 204 bh = (regs->regs[48]) >> 32; show_regs() 205 bl = (regs->regs[48]) & 0xffffffff; show_regs() 206 ch = (regs->regs[49]) >> 32; show_regs() 207 cl = (regs->regs[49]) & 0xffffffff; show_regs() 211 ah = (regs->regs[50]) >> 32; show_regs() 212 al = (regs->regs[50]) & 0xffffffff; show_regs() 213 bh = (regs->regs[51]) >> 32; show_regs() 214 bl = (regs->regs[51]) & 0xffffffff; show_regs() 215 ch = (regs->regs[52]) >> 32; show_regs() 216 cl = (regs->regs[52]) & 0xffffffff; show_regs() 220 ah = (regs->regs[53]) >> 32; show_regs() 221 al = (regs->regs[53]) & 0xffffffff; show_regs() 222 bh = (regs->regs[54]) >> 32; show_regs() 223 bl = (regs->regs[54]) & 0xffffffff; show_regs() 224 ch = (regs->regs[55]) >> 32; show_regs() 225 cl = (regs->regs[55]) & 0xffffffff; show_regs() 229 ah = (regs->regs[56]) >> 32; show_regs() 230 al = (regs->regs[56]) & 0xffffffff; show_regs() 231 bh = (regs->regs[57]) >> 32; show_regs() 232 bl = (regs->regs[57]) & 0xffffffff; show_regs() 233 ch = (regs->regs[58]) >> 32; show_regs() 234 cl = (regs->regs[58]) & 0xffffffff; show_regs() 238 ah = (regs->regs[59]) >> 32; show_regs() 239 al = (regs->regs[59]) & 0xffffffff; show_regs() 240 bh = (regs->regs[60]) >> 32; show_regs() 241 bl = (regs->regs[60]) & 0xffffffff; show_regs() 242 ch = (regs->regs[61]) >> 32; show_regs() 243 cl = (regs->regs[61]) & 0xffffffff; show_regs() 247 ah = (regs->regs[62]) >> 32; show_regs() 248 al = (regs->regs[62]) & 0xffffffff; show_regs() 249 bh = (regs->tregs[0]) >> 32; show_regs() 250 bl = (regs->tregs[0]) & 0xffffffff; show_regs() 251 ch = (regs->tregs[1]) >> 32; show_regs() 252 cl = (regs->tregs[1]) & 0xffffffff; show_regs() 256 ah = (regs->tregs[2]) >> 32; show_regs() 257 al = (regs->tregs[2]) & 0xffffffff; show_regs() 258 bh = (regs->tregs[3]) >> 32; show_regs() 259 bl = (regs->tregs[3]) & 0xffffffff; show_regs() 260 ch = (regs->tregs[4]) >> 32; show_regs() 261 cl = (regs->tregs[4]) & 0xffffffff; show_regs() 265 ah = (regs->tregs[5]) >> 32; show_regs() 266 al = (regs->tregs[5]) & 0xffffffff; show_regs() 267 bh = (regs->tregs[6]) >> 32; show_regs() 268 bl = (regs->tregs[6]) & 0xffffffff; show_regs() 269 ch = (regs->tregs[7]) >> 32; show_regs() 270 cl = (regs->tregs[7]) & 0xffffffff; show_regs() 277 if (!user_mode(regs)) { show_regs() 279 unsigned long sp = regs->regs[15] & 0xffffffff; show_regs() 282 tsk->thread.kregs = regs; show_regs() 301 * existing FPU state to the FP regs field within exit_thread() 345 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) dump_fpu() argument 358 regs->sr |= SR_FD; dump_fpu() 395 childregs->regs[2] = (unsigned long)arg; copy_thread() 396 childregs->regs[3] = (unsigned long)usp; copy_thread() 411 childregs->regs[15] = neff_sign_extend(usp); copy_thread() 414 childregs->regs[9] = 0; /* Set return value for child */ copy_thread()
|
H A D | process_32.c | 32 void show_regs(struct pt_regs * regs) show_regs() argument 37 print_symbol("PC is at %s\n", instruction_pointer(regs)); show_regs() 38 print_symbol("PR is at %s\n", regs->pr); show_regs() 41 regs->pc, regs->regs[15], regs->sr); show_regs() 49 regs->regs[0],regs->regs[1], show_regs() 50 regs->regs[2],regs->regs[3]); show_regs() 52 regs->regs[4],regs->regs[5], show_regs() 53 regs->regs[6],regs->regs[7]); show_regs() 55 regs->regs[8],regs->regs[9], show_regs() 56 regs->regs[10],regs->regs[11]); show_regs() 58 regs->regs[12],regs->regs[13], show_regs() 59 regs->regs[14]); show_regs() 61 regs->mach, regs->macl, regs->gbr, regs->pr); show_regs() 63 show_trace(NULL, (unsigned long *)regs->regs[15], regs); show_regs() local 64 show_code(regs); show_regs() 67 void start_thread(struct pt_regs *regs, unsigned long new_pc, start_thread() argument 70 regs->pr = 0; start_thread() 71 regs->sr = SR_FD; start_thread() 72 regs->pc = new_pc; start_thread() 73 regs->regs[15] = new_sp; start_thread() 105 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) dump_fpu() argument 151 childregs->regs[4] = arg; copy_thread() 152 childregs->regs[5] = usp; copy_thread() 165 childregs->regs[15] = usp; copy_thread() 169 childregs->gbr = childregs->regs[0]; copy_thread() 171 childregs->regs[0] = 0; /* Set return value for child */ copy_thread()
|
H A D | signal_64.c | 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) handle_syscall_restart() argument 50 if (regs->syscall_nr < 0) handle_syscall_restart() 54 switch (regs->regs[REG_RET]) { handle_syscall_restart() 58 regs->regs[REG_RET] = -EINTR; handle_syscall_restart() 67 regs->regs[REG_RET] = regs->syscall_nr; handle_syscall_restart() 68 regs->pc -= 4; handle_syscall_restart() 82 static void do_signal(struct pt_regs *regs) do_signal() argument 92 if (!user_mode(regs)) do_signal() 96 handle_syscall_restart(regs, &ksig.ka.sa); do_signal() 99 handle_signal(&ksig, regs); do_signal() 104 if (regs->syscall_nr >= 0) { do_signal() 106 switch (regs->regs[REG_RET]) { do_signal() 111 regs->regs[REG_RET] = regs->syscall_nr; do_signal() 112 regs->pc -= 4; do_signal() 116 regs->regs[REG_RET] = __NR_restart_syscall; do_signal() 117 regs->pc -= 4; do_signal() 145 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext_fpu() argument 157 regs->sr |= SR_FD; restore_sigcontext_fpu() 167 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext_fpu() argument 182 regs->sr |= SR_FD; setup_sigcontext_fpu() 193 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext_fpu() argument 198 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext_fpu() argument 205 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, long long *r2_p) restore_sigcontext() argument 211 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) restore_sigcontext() 213 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); restore_sigcontext() 214 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); restore_sigcontext() 215 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); restore_sigcontext() 216 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); restore_sigcontext() 217 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); restore_sigcontext() 218 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); restore_sigcontext() 219 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); restore_sigcontext() 220 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); restore_sigcontext() 221 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); restore_sigcontext() 222 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); restore_sigcontext() 223 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); restore_sigcontext() 224 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); restore_sigcontext() 225 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); restore_sigcontext() 226 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); restore_sigcontext() 227 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); restore_sigcontext() 228 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); restore_sigcontext() 235 current_sr = regs->sr; restore_sigcontext() 237 regs->sr &= SR_MASK; restore_sigcontext() 238 regs->sr |= (new_sr & ~SR_MASK); restore_sigcontext() 244 /* Must do this last in case it sets regs->sr.fd (i.e. after rest of sr restore_sigcontext() 246 err |= restore_sigcontext_fpu(regs, sc); restore_sigcontext() 248 regs->syscall_nr = -1; /* disable syscall checks */ restore_sigcontext() 256 struct pt_regs * regs) sys_sigreturn() 276 if (restore_sigcontext(regs, &frame->sc, &ret)) sys_sigreturn() 278 regs->pc -= 4; sys_sigreturn() 290 struct pt_regs * regs) sys_rt_sigreturn() 307 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ret)) sys_rt_sigreturn() 309 regs->pc -= 4; sys_rt_sigreturn() 325 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, setup_sigcontext() argument 331 err |= setup_sigcontext_fpu(regs, sc); setup_sigcontext() 333 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x) setup_sigcontext() 335 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]); setup_sigcontext() 336 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]); setup_sigcontext() 337 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]); setup_sigcontext() 338 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]); setup_sigcontext() 339 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]); setup_sigcontext() 340 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]); setup_sigcontext() 341 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]); setup_sigcontext() 342 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]); setup_sigcontext() 343 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]); setup_sigcontext() 344 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]); setup_sigcontext() 345 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]); setup_sigcontext() 346 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]); setup_sigcontext() 347 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]); setup_sigcontext() 348 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]); setup_sigcontext() 349 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]); setup_sigcontext() 350 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]); setup_sigcontext() 377 static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_frame() argument 383 frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame)); setup_frame() 388 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); setup_frame() 437 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame); setup_frame() 438 regs->regs[REG_ARG1] = sig; /* Arg for signal handler */ setup_frame() 449 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc; setup_frame() 450 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc; setup_frame() 452 regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler); setup_frame() 457 regs->pc >> 32, regs->pc & 0xffffffff, setup_frame() 464 struct pt_regs *regs) setup_rt_frame() 469 frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame)); setup_rt_frame() 485 err |= __save_altstack(&frame->uc.uc_stack, regs->regs[REG_SP]); setup_rt_frame() 487 regs, set->sig[0]); setup_rt_frame() 529 regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame); setup_rt_frame() 530 regs->regs[REG_ARG1] = sig; /* Arg for signal handler */ setup_rt_frame() 531 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info; setup_rt_frame() 532 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext; setup_rt_frame() 533 regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler); setup_rt_frame() 537 regs->pc >> 32, regs->pc & 0xffffffff, setup_rt_frame() 547 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 554 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 556 ret = setup_frame(ksig, oldset, regs); handle_signal() 561 asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) do_notify_resume() argument 564 do_signal(regs); do_notify_resume() 568 tracehook_notify_resume(regs); do_notify_resume() 253 sys_sigreturn(unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs * regs) sys_sigreturn() argument 287 sys_rt_sigreturn(unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs * regs) sys_rt_sigreturn() argument 463 setup_rt_frame(struct ksignal *kig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | signal_32.c | 89 struct pt_regs *regs) save_sigcontext_fpu() 107 unlazy_fpu(tsk, regs); save_sigcontext_fpu() 114 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p) restore_sigcontext() argument 118 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) restore_sigcontext() 119 COPY(regs[1]); restore_sigcontext() 120 COPY(regs[2]); COPY(regs[3]); restore_sigcontext() 121 COPY(regs[4]); COPY(regs[5]); restore_sigcontext() 122 COPY(regs[6]); COPY(regs[7]); restore_sigcontext() 123 COPY(regs[8]); COPY(regs[9]); restore_sigcontext() 124 COPY(regs[10]); COPY(regs[11]); restore_sigcontext() 125 COPY(regs[12]); COPY(regs[13]); restore_sigcontext() 126 COPY(regs[14]); COPY(regs[15]); restore_sigcontext() 137 regs->sr |= SR_FD; /* Release FPU */ restore_sigcontext() 138 clear_fpu(tsk, regs); restore_sigcontext() 146 regs->tra = -1; /* disable syscall checks */ restore_sigcontext() 153 struct pt_regs *regs = current_pt_regs(); sys_sigreturn() local 154 struct sigframe __user *frame = (struct sigframe __user *)regs->regs[15]; sys_sigreturn() 172 if (restore_sigcontext(regs, &frame->sc, &r0)) sys_sigreturn() 183 struct pt_regs *regs = current_pt_regs(); sys_rt_sigreturn() local 184 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15]; sys_rt_sigreturn() 199 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) sys_rt_sigreturn() 217 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, setup_sigcontext() argument 222 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x) setup_sigcontext() 223 COPY(regs[0]); COPY(regs[1]); setup_sigcontext() 224 COPY(regs[2]); COPY(regs[3]); setup_sigcontext() 225 COPY(regs[4]); COPY(regs[5]); setup_sigcontext() 226 COPY(regs[6]); COPY(regs[7]); setup_sigcontext() 227 COPY(regs[8]); COPY(regs[9]); setup_sigcontext() 228 COPY(regs[10]); COPY(regs[11]); setup_sigcontext() 229 COPY(regs[12]); COPY(regs[13]); setup_sigcontext() 230 COPY(regs[14]); COPY(regs[15]); setup_sigcontext() 237 err |= save_sigcontext_fpu(sc, regs); setup_sigcontext() 266 struct pt_regs *regs) setup_frame() 271 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); setup_frame() 276 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); setup_frame() 285 regs->pr = (unsigned long) ksig->ka.sa.sa_restorer; setup_frame() 288 regs->pr = VDSO_SYM(&__kernel_sigreturn); setup_frame() 300 regs->pr = (unsigned long) frame->retcode; setup_frame() 301 flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode)); setup_frame() 308 regs->regs[15] = (unsigned long) frame; setup_frame() 309 regs->regs[4] = sig; /* Arg for signal handler */ setup_frame() 310 regs->regs[5] = 0; setup_frame() 311 regs->regs[6] = (unsigned long) &frame->sc; setup_frame() 317 err |= __get_user(regs->pc, &funcptr->text); setup_frame() 318 err |= __get_user(regs->regs[12], &funcptr->GOT); setup_frame() 320 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; setup_frame() 326 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); setup_frame() 332 struct pt_regs *regs) setup_rt_frame() 337 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); setup_rt_frame() 347 err |= __save_altstack(&frame->uc.uc_stack, regs->regs[15]); setup_rt_frame() 349 regs, set->sig[0]); setup_rt_frame() 355 regs->pr = (unsigned long) ksig->ka.sa.sa_restorer; setup_rt_frame() 358 regs->pr = VDSO_SYM(&__kernel_rt_sigreturn); setup_rt_frame() 370 regs->pr = (unsigned long) frame->retcode; setup_rt_frame() 371 flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode)); setup_rt_frame() 378 regs->regs[15] = (unsigned long) frame; setup_rt_frame() 379 regs->regs[4] = sig; /* Arg for signal handler */ setup_rt_frame() 380 regs->regs[5] = (unsigned long) &frame->info; setup_rt_frame() 381 regs->regs[6] = (unsigned long) &frame->uc; setup_rt_frame() 387 err |= __get_user(regs->pc, &funcptr->text); setup_rt_frame() 388 err |= __get_user(regs->regs[12], &funcptr->GOT); setup_rt_frame() 390 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; setup_rt_frame() 396 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); setup_rt_frame() 402 handle_syscall_restart(unsigned long save_r0, struct pt_regs *regs, handle_syscall_restart() argument 406 if (regs->tra < 0) handle_syscall_restart() 410 switch (regs->regs[0]) { handle_syscall_restart() 414 regs->regs[0] = -EINTR; handle_syscall_restart() 422 regs->regs[0] = save_r0; handle_syscall_restart() 423 regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); handle_syscall_restart() 432 handle_signal(struct ksignal *ksig, struct pt_regs *regs, unsigned int save_r0) handle_signal() argument 439 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 441 ret = setup_frame(ksig, oldset, regs); handle_signal() 455 static void do_signal(struct pt_regs *regs, unsigned int save_r0) do_signal() argument 465 if (!user_mode(regs)) do_signal() 469 handle_syscall_restart(save_r0, regs, &ksig.ka.sa); do_signal() 472 handle_signal(&ksig, regs, save_r0); do_signal() 477 if (regs->tra >= 0) { do_signal() 479 if (regs->regs[0] == -ERESTARTNOHAND || do_signal() 480 regs->regs[0] == -ERESTARTSYS || do_signal() 481 regs->regs[0] == -ERESTARTNOINTR) { do_signal() 482 regs->regs[0] = save_r0; do_signal() 483 regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); do_signal() 484 } else if (regs->regs[0] == -ERESTART_RESTARTBLOCK) { do_signal() 485 regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); do_signal() 486 regs->regs[3] = __NR_restart_syscall; do_signal() 497 asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0, do_notify_resume() argument 502 do_signal(regs, save_r0); do_notify_resume() 506 tracehook_notify_resume(regs); do_notify_resume() 88 save_sigcontext_fpu(struct sigcontext __user *sc, struct pt_regs *regs) save_sigcontext_fpu() argument 265 setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_frame() argument 331 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | traps.c | 17 void die(const char *str, struct pt_regs *regs, long err) die() argument 29 show_regs(regs); die() 34 if (!user_mode(regs) || in_interrupt()) die() 35 dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + die() 38 notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV); die() 46 crash_kexec(regs); die() 57 void die_if_kernel(const char *str, struct pt_regs *regs, long err) die_if_kernel() argument 59 if (!user_mode(regs)) die_if_kernel() 60 die(str, regs, err); die_if_kernel() 69 void die_if_no_fixup(const char *str, struct pt_regs *regs, long err) die_if_no_fixup() argument 71 if (!user_mode(regs)) { die_if_no_fixup() 73 fixup = search_exception_tables(regs->pc); die_if_no_fixup() 75 regs->pc = fixup->fixup; die_if_no_fixup() 79 die(str, regs, err); die_if_no_fixup() 84 static void handle_BUG(struct pt_regs *regs) handle_BUG() argument 87 unsigned long bugaddr = regs->pc; handle_BUG() 99 tt = report_bug(bugaddr, regs); handle_BUG() 101 regs->pc += instruction_size(bugaddr); handle_BUG() 106 die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); handle_BUG() 132 regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); BUILD_TRAP_HANDLER() 134 if (notify_die(DIE_TRAP, "debug trap", regs, 0, vec & 0xff, BUILD_TRAP_HANDLER() 149 regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); BUILD_TRAP_HANDLER() 151 if (notify_die(DIE_TRAP, "bug trap", regs, 0, TRAPA_BUG_OPCODE & 0xff, BUILD_TRAP_HANDLER() 156 if (__kernel_text_address(instruction_pointer(regs))) { BUILD_TRAP_HANDLER() 157 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs); BUILD_TRAP_HANDLER() 159 handle_BUG(regs); BUILD_TRAP_HANDLER() 175 switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { BUILD_TRAP_HANDLER() 180 die("Fatal Non-Maskable Interrupt", regs, SIGINT); BUILD_TRAP_HANDLER()
|
/linux-4.1.27/arch/x86/um/shared/sysdep/ |
H A D | syscalls_64.h | 17 #define EXECUTE_SYSCALL(syscall, regs) \ 19 (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \ 20 UPT_SYSCALL_ARG2(®s->regs), \ 21 UPT_SYSCALL_ARG3(®s->regs), \ 22 UPT_SYSCALL_ARG4(®s->regs), \ 23 UPT_SYSCALL_ARG5(®s->regs), \ 24 UPT_SYSCALL_ARG6(®s->regs)))
|
H A D | syscalls_32.h | 13 #define EXECUTE_SYSCALL(syscall, regs) \ 15 (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs))
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | a.out-core.h | 25 static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) aout_dump_thread() argument 30 dump->start_stack = regs->sp & ~(PAGE_SIZE - 1); aout_dump_thread() 42 dump->regs.bx = regs->bx; aout_dump_thread() 43 dump->regs.cx = regs->cx; aout_dump_thread() 44 dump->regs.dx = regs->dx; aout_dump_thread() 45 dump->regs.si = regs->si; aout_dump_thread() 46 dump->regs.di = regs->di; aout_dump_thread() 47 dump->regs.bp = regs->bp; aout_dump_thread() 48 dump->regs.ax = regs->ax; aout_dump_thread() 49 dump->regs.ds = (u16)regs->ds; aout_dump_thread() 50 dump->regs.es = (u16)regs->es; aout_dump_thread() 51 dump->regs.fs = (u16)regs->fs; aout_dump_thread() 52 dump->regs.gs = get_user_gs(regs); aout_dump_thread() 53 dump->regs.orig_ax = regs->orig_ax; aout_dump_thread() 54 dump->regs.ip = regs->ip; aout_dump_thread() 55 dump->regs.cs = (u16)regs->cs; aout_dump_thread() 56 dump->regs.flags = regs->flags; aout_dump_thread() 57 dump->regs.sp = regs->sp; aout_dump_thread() 58 dump->regs.ss = (u16)regs->ss; aout_dump_thread() 60 dump->u_fpvalid = dump_fpu(regs, &dump->i387); aout_dump_thread()
|
H A D | kmemcheck.h | 8 bool kmemcheck_active(struct pt_regs *regs); 10 void kmemcheck_show(struct pt_regs *regs); 11 void kmemcheck_hide(struct pt_regs *regs); 13 bool kmemcheck_fault(struct pt_regs *regs, 15 bool kmemcheck_trap(struct pt_regs *regs); 17 static inline bool kmemcheck_active(struct pt_regs *regs) kmemcheck_active() argument 22 static inline void kmemcheck_show(struct pt_regs *regs) kmemcheck_show() argument 26 static inline void kmemcheck_hide(struct pt_regs *regs) kmemcheck_hide() argument 30 static inline bool kmemcheck_fault(struct pt_regs *regs, kmemcheck_fault() argument 36 static inline bool kmemcheck_trap(struct pt_regs *regs) kmemcheck_trap() argument
|
H A D | syscall.h | 31 static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 33 return regs->orig_ax; syscall_get_nr() 37 struct pt_regs *regs) syscall_rollback() 39 regs->ax = regs->orig_ax; syscall_rollback() 43 struct pt_regs *regs) syscall_get_error() 45 unsigned long error = regs->ax; syscall_get_error() 62 struct pt_regs *regs) syscall_get_return_value() 64 return regs->ax; syscall_get_return_value() 68 struct pt_regs *regs, syscall_set_return_value() 71 regs->ax = (long) error ?: val; syscall_set_return_value() 77 struct pt_regs *regs, syscall_get_arguments() 82 memcpy(args, ®s->bx + i, n * sizeof(args[0])); syscall_get_arguments() 86 struct pt_regs *regs, syscall_set_arguments() 91 memcpy(®s->bx + i, args, n * sizeof(args[0])); syscall_set_arguments() 102 struct pt_regs *regs, syscall_get_arguments() 111 *args++ = regs->bx; syscall_get_arguments() 114 *args++ = regs->cx; syscall_get_arguments() 117 *args++ = regs->dx; syscall_get_arguments() 120 *args++ = regs->si; syscall_get_arguments() 123 *args++ = regs->di; syscall_get_arguments() 126 *args++ = regs->bp; syscall_get_arguments() 138 *args++ = regs->di; syscall_get_arguments() 141 *args++ = regs->si; syscall_get_arguments() 144 *args++ = regs->dx; syscall_get_arguments() 147 *args++ = regs->r10; syscall_get_arguments() 150 *args++ = regs->r8; syscall_get_arguments() 153 *args++ = regs->r9; syscall_get_arguments() 163 struct pt_regs *regs, syscall_set_arguments() 172 regs->bx = *args++; syscall_set_arguments() 175 regs->cx = *args++; syscall_set_arguments() 178 regs->dx = *args++; syscall_set_arguments() 181 regs->si = *args++; syscall_set_arguments() 184 regs->di = *args++; syscall_set_arguments() 187 regs->bp = *args++; syscall_set_arguments() 199 regs->di = *args++; syscall_set_arguments() 202 regs->si = *args++; syscall_set_arguments() 205 regs->dx = *args++; syscall_set_arguments() 208 regs->r10 = *args++; syscall_set_arguments() 211 regs->r8 = *args++; syscall_set_arguments() 214 regs->r9 = *args++; syscall_set_arguments() 36 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 42 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 61 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 67 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 76 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 85 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument 101 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 162 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | elf.h | 116 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is 120 #define ELF_CORE_COPY_REGS_COMMON(pr_reg, regs) \ 122 pr_reg[0] = regs->bx; \ 123 pr_reg[1] = regs->cx; \ 124 pr_reg[2] = regs->dx; \ 125 pr_reg[3] = regs->si; \ 126 pr_reg[4] = regs->di; \ 127 pr_reg[5] = regs->bp; \ 128 pr_reg[6] = regs->ax; \ 129 pr_reg[7] = regs->ds & 0xffff; \ 130 pr_reg[8] = regs->es & 0xffff; \ 131 pr_reg[9] = regs->fs & 0xffff; \ 132 pr_reg[11] = regs->orig_ax; \ 133 pr_reg[12] = regs->ip; \ 134 pr_reg[13] = regs->cs & 0xffff; \ 135 pr_reg[14] = regs->flags; \ 136 pr_reg[15] = regs->sp; \ 137 pr_reg[16] = regs->ss & 0xffff; \ 140 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 142 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\ 143 pr_reg[10] = get_user_gs(regs); \ 146 #define ELF_CORE_COPY_KERNEL_REGS(pr_reg, regs) \ 148 ELF_CORE_COPY_REGS_COMMON(pr_reg, regs);\ 172 struct pt_regs *regs, const u16 ds) elf_common_init() 175 /*regs->ax = regs->bx =*/ regs->cx = regs->dx = 0; elf_common_init() 176 regs->si = regs->di /*= regs->bp*/ = 0; elf_common_init() 177 regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0; elf_common_init() 178 /*regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;*/ elf_common_init() 187 #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ 188 elf_common_init(¤t->thread, regs, __USER_DS) 190 void start_thread_ia32(struct pt_regs *regs, u32 new_ip, u32 new_sp); 200 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is 205 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 208 (pr_reg)[0] = (regs)->r15; \ 209 (pr_reg)[1] = (regs)->r14; \ 210 (pr_reg)[2] = (regs)->r13; \ 211 (pr_reg)[3] = (regs)->r12; \ 212 (pr_reg)[4] = (regs)->bp; \ 213 (pr_reg)[5] = (regs)->bx; \ 214 (pr_reg)[6] = (regs)->r11; \ 215 (pr_reg)[7] = (regs)->r10; \ 216 (pr_reg)[8] = (regs)->r9; \ 217 (pr_reg)[9] = (regs)->r8; \ 218 (pr_reg)[10] = (regs)->ax; \ 219 (pr_reg)[11] = (regs)->cx; \ 220 (pr_reg)[12] = (regs)->dx; \ 221 (pr_reg)[13] = (regs)->si; \ 222 (pr_reg)[14] = (regs)->di; \ 223 (pr_reg)[15] = (regs)->orig_ax; \ 224 (pr_reg)[16] = (regs)->ip; \ 225 (pr_reg)[17] = (regs)->cs; \ 226 (pr_reg)[18] = (regs)->flags; \ 227 (pr_reg)[19] = (regs)->sp; \ 228 (pr_reg)[20] = (regs)->ss; \ 171 elf_common_init(struct thread_struct *t, struct pt_regs *regs, const u16 ds) elf_common_init() argument
|
H A D | ptrace.h | 35 * C ABI says these regs are callee-preserved. They aren't saved on kernel entry 44 /* These regs are callee-clobbered. Always saved on kernel entry. */ 77 extern unsigned long profile_pc(struct pt_regs *regs); 81 convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); 82 extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, 93 static inline unsigned long regs_return_value(struct pt_regs *regs) regs_return_value() argument 95 return regs->ax; regs_return_value() 99 * user_mode(regs) determines whether a register set came from user 107 static inline int user_mode(struct pt_regs *regs) user_mode() argument 110 return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >= USER_RPL; user_mode() 112 return !!(regs->cs & 3); user_mode() 116 static inline int v8086_mode(struct pt_regs *regs) v8086_mode() argument 119 return (regs->flags & X86_VM_MASK); v8086_mode() 126 static inline bool user_64bit_mode(struct pt_regs *regs) user_64bit_mode() argument 133 return regs->cs == __USER_CS; user_64bit_mode() 136 return regs->cs == __USER_CS || regs->cs == pv_info.extra_user_64bit_cs; user_64bit_mode() 145 extern unsigned long kernel_stack_pointer(struct pt_regs *regs); 147 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) kernel_stack_pointer() argument 149 return regs->sp; kernel_stack_pointer() 153 #define GET_IP(regs) ((regs)->ip) 154 #define GET_FP(regs) ((regs)->bp) 155 #define GET_USP(regs) ((regs)->sp) 166 * @regs: pt_regs from which register value is gotten. 170 * offset of the register in struct pt_regs address which specified by @regs. 173 static inline unsigned long regs_get_register(struct pt_regs *regs, regs_get_register() argument 184 regs->cs == __KERNEL_CS) regs_get_register() 185 return kernel_stack_pointer(regs); regs_get_register() 187 return *(unsigned long *)((unsigned long)regs + offset); regs_get_register() 192 * @regs: pt_regs which contains kernel stack pointer. 198 static inline int regs_within_kernel_stack(struct pt_regs *regs, regs_within_kernel_stack() argument 202 (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); regs_within_kernel_stack() 207 * @regs: pt_regs which contains kernel stack pointer. 211 * is specified by @regs. If the @n th entry is NOT in the kernel stack, 214 static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, regs_get_kernel_stack_nth() argument 217 unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); regs_get_kernel_stack_nth() 219 if (regs_within_kernel_stack(regs, (unsigned long)addr)) regs_get_kernel_stack_nth()
|
/linux-4.1.27/arch/microblaze/include/asm/ |
H A D | ptrace.h | 14 #define kernel_mode(regs) ((regs)->pt_mode) 15 #define user_mode(regs) (!kernel_mode(regs)) 17 #define instruction_pointer(regs) ((regs)->pc) 18 #define profile_pc(regs) instruction_pointer(regs) 19 #define user_stack_pointer(regs) ((regs)->r1) 21 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 23 return regs->r3; regs_return_value()
|
H A D | syscall.h | 11 struct pt_regs *regs) syscall_get_nr() 13 return regs->r12; syscall_get_nr() 17 struct pt_regs *regs) syscall_rollback() 23 struct pt_regs *regs) syscall_get_error() 25 return IS_ERR_VALUE(regs->r3) ? regs->r3 : 0; syscall_get_error() 29 struct pt_regs *regs) syscall_get_return_value() 31 return regs->r3; syscall_get_return_value() 35 struct pt_regs *regs, syscall_set_return_value() 39 regs->r3 = -error; syscall_set_return_value() 41 regs->r3 = val; syscall_set_return_value() 44 static inline microblaze_reg_t microblaze_get_syscall_arg(struct pt_regs *regs, microblaze_get_syscall_arg() argument 48 case 5: return regs->r10; microblaze_get_syscall_arg() 49 case 4: return regs->r9; microblaze_get_syscall_arg() 50 case 3: return regs->r8; microblaze_get_syscall_arg() 51 case 2: return regs->r7; microblaze_get_syscall_arg() 52 case 1: return regs->r6; microblaze_get_syscall_arg() 53 case 0: return regs->r5; microblaze_get_syscall_arg() 60 static inline void microblaze_set_syscall_arg(struct pt_regs *regs, microblaze_set_syscall_arg() argument 66 regs->r10 = val; microblaze_set_syscall_arg() 68 regs->r9 = val; microblaze_set_syscall_arg() 70 regs->r8 = val; microblaze_set_syscall_arg() 72 regs->r7 = val; microblaze_set_syscall_arg() 74 regs->r6 = val; microblaze_set_syscall_arg() 76 regs->r5 = val; microblaze_set_syscall_arg() 83 struct pt_regs *regs, syscall_get_arguments() 88 *args++ = microblaze_get_syscall_arg(regs, i++); syscall_get_arguments() 92 struct pt_regs *regs, syscall_set_arguments() 97 microblaze_set_syscall_arg(regs, i++, *args++); syscall_set_arguments() 100 asmlinkage unsigned long do_syscall_trace_enter(struct pt_regs *regs); 101 asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); 10 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 16 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 22 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 28 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 34 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 82 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 91 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/x86/um/ |
H A D | sysrq_32.c | 14 void show_regs(struct pt_regs *regs) show_regs() argument 18 0xffff & PT_REGS_CS(regs), PT_REGS_IP(regs), show_regs() 20 if (PT_REGS_CS(regs) & 3) show_regs() 21 printk(" ESP: %04lx:%08lx", 0xffff & PT_REGS_SS(regs), show_regs() 22 PT_REGS_SP(regs)); show_regs() 23 printk(" EFLAGS: %08lx\n %s\n", PT_REGS_EFLAGS(regs), show_regs() 26 PT_REGS_AX(regs), PT_REGS_BX(regs), show_regs() 27 PT_REGS_CX(regs), PT_REGS_DX(regs)); show_regs() 29 PT_REGS_SI(regs), PT_REGS_DI(regs), PT_REGS_BP(regs)); show_regs() 31 0xffff & PT_REGS_DS(regs), show_regs() 32 0xffff & PT_REGS_ES(regs)); show_regs()
|
H A D | sysrq_64.c | 15 void show_regs(struct pt_regs *regs) show_regs() argument 21 printk(KERN_INFO "RIP: %04lx:[<%016lx>]\n", PT_REGS_CS(regs) & 0xffff, show_regs() 22 PT_REGS_IP(regs)); show_regs() 23 printk(KERN_INFO "RSP: %016lx EFLAGS: %08lx\n", PT_REGS_SP(regs), show_regs() 24 PT_REGS_EFLAGS(regs)); show_regs() 26 PT_REGS_AX(regs), PT_REGS_BX(regs), PT_REGS_CX(regs)); show_regs() 28 PT_REGS_DX(regs), PT_REGS_SI(regs), PT_REGS_DI(regs)); show_regs() 30 PT_REGS_BP(regs), PT_REGS_R8(regs), PT_REGS_R9(regs)); show_regs() 32 PT_REGS_R10(regs), PT_REGS_R11(regs), PT_REGS_R12(regs)); show_regs() 34 PT_REGS_R13(regs), PT_REGS_R14(regs), PT_REGS_R15(regs)); show_regs()
|
H A D | bugs_64.c | 13 void arch_examine_signal(int sig, struct uml_pt_regs *regs) arch_examine_signal() argument
|
/linux-4.1.27/arch/sh/include/asm/ |
H A D | syscall_32.h | 12 struct pt_regs *regs) syscall_get_nr() 14 return (regs->tra >= 0) ? regs->regs[3] : -1L; syscall_get_nr() 18 struct pt_regs *regs) syscall_rollback() 27 struct pt_regs *regs) syscall_get_error() 29 return IS_ERR_VALUE(regs->regs[0]) ? regs->regs[0] : 0; syscall_get_error() 33 struct pt_regs *regs) syscall_get_return_value() 35 return regs->regs[0]; syscall_get_return_value() 39 struct pt_regs *regs, syscall_set_return_value() 43 regs->regs[0] = -error; syscall_set_return_value() 45 regs->regs[0] = val; syscall_set_return_value() 49 struct pt_regs *regs, syscall_get_arguments() 63 case 6: args[5] = regs->regs[1]; syscall_get_arguments() 64 case 5: args[4] = regs->regs[0]; syscall_get_arguments() 65 case 4: args[3] = regs->regs[7]; syscall_get_arguments() 66 case 3: args[2] = regs->regs[6]; syscall_get_arguments() 67 case 2: args[1] = regs->regs[5]; syscall_get_arguments() 68 case 1: args[0] = regs->regs[4]; syscall_get_arguments() 77 struct pt_regs *regs, syscall_set_arguments() 85 case 6: regs->regs[1] = args[5]; syscall_set_arguments() 86 case 5: regs->regs[0] = args[4]; syscall_set_arguments() 87 case 4: regs->regs[7] = args[3]; syscall_set_arguments() 88 case 3: regs->regs[6] = args[2]; syscall_set_arguments() 89 case 2: regs->regs[5] = args[1]; syscall_set_arguments() 90 case 1: regs->regs[4] = args[0]; syscall_set_arguments() 11 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 17 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 26 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 32 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 38 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 48 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 76 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | ptrace_32.h | 8 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 10 return regs->regs[0]; regs_return_value()
|
H A D | ptrace_64.h | 8 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 10 return regs->regs[3]; regs_return_value()
|
H A D | syscall_64.h | 11 struct pt_regs *regs) syscall_get_nr() 13 return (regs->syscall_nr >= 0) ? regs->regs[9] : -1L; syscall_get_nr() 17 struct pt_regs *regs) syscall_rollback() 26 struct pt_regs *regs) syscall_get_error() 28 return IS_ERR_VALUE(regs->regs[9]) ? regs->regs[9] : 0; syscall_get_error() 32 struct pt_regs *regs) syscall_get_return_value() 34 return regs->regs[9]; syscall_get_return_value() 38 struct pt_regs *regs, syscall_set_return_value() 42 regs->regs[9] = -error; syscall_set_return_value() 44 regs->regs[9] = val; syscall_set_return_value() 48 struct pt_regs *regs, syscall_get_arguments() 53 memcpy(args, ®s->regs[2 + i], n * sizeof(args[0])); syscall_get_arguments() 57 struct pt_regs *regs, syscall_set_arguments() 62 memcpy(®s->regs[2 + i], args, n * sizeof(args[0])); syscall_set_arguments() 10 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 16 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 25 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 31 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 37 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 47 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 56 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | elf.h | 102 * This covers all of general/DSP/FPU regs. 137 do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \ 138 _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \ 139 _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \ 140 _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; _r->regs[15]=0; \ 141 _r->regs[16]=0; _r->regs[17]=0; _r->regs[18]=0; _r->regs[19]=0; \ 142 _r->regs[20]=0; _r->regs[21]=0; _r->regs[22]=0; _r->regs[23]=0; \ 143 _r->regs[24]=0; _r->regs[25]=0; _r->regs[26]=0; _r->regs[27]=0; \ 144 _r->regs[28]=0; _r->regs[29]=0; _r->regs[30]=0; _r->regs[31]=0; \ 145 _r->regs[32]=0; _r->regs[33]=0; _r->regs[34]=0; _r->regs[35]=0; \ 146 _r->regs[36]=0; _r->regs[37]=0; _r->regs[38]=0; _r->regs[39]=0; \ 147 _r->regs[40]=0; _r->regs[41]=0; _r->regs[42]=0; _r->regs[43]=0; \ 148 _r->regs[44]=0; _r->regs[45]=0; _r->regs[46]=0; _r->regs[47]=0; \ 149 _r->regs[48]=0; _r->regs[49]=0; _r->regs[50]=0; _r->regs[51]=0; \ 150 _r->regs[52]=0; _r->regs[53]=0; _r->regs[54]=0; _r->regs[55]=0; \ 151 _r->regs[56]=0; _r->regs[57]=0; _r->regs[58]=0; _r->regs[59]=0; \ 152 _r->regs[60]=0; _r->regs[61]=0; _r->regs[62]=0; \ 158 do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \ 159 _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \ 160 _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \ 161 _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \ 167 _r->regs[0] = 0; \ 168 _r->regs[1] = 0; \ 169 _r->regs[2] = 0; \ 170 _r->regs[3] = 0; \ 171 _r->regs[4] = 0; \ 172 _r->regs[5] = 0; \ 173 _r->regs[6] = 0; \ 174 _r->regs[7] = 0; \ 175 _r->regs[8] = _exec_map_addr; \ 176 _r->regs[9] = _interp_map_addr; \ 177 _r->regs[10] = _dynamic_addr; \ 178 _r->regs[11] = 0; \ 179 _r->regs[12] = 0; \ 180 _r->regs[13] = 0; \ 181 _r->regs[14] = 0; \
|
H A D | flat.h | 24 do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \ 25 _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \ 26 _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \ 27 _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \
|
H A D | fpu.h | 9 static inline void release_fpu(struct pt_regs *regs) release_fpu() argument 11 regs->sr |= SR_FD; release_fpu() 14 static inline void grab_fpu(struct pt_regs *regs) grab_fpu() argument 16 regs->sr &= ~SR_FD; grab_fpu() 21 extern void fpu_state_restore(struct pt_regs *regs); 26 #define release_fpu(regs) do { } while (0) 27 #define grab_fpu(regs) do { } while (0) 28 #define fpu_state_restore(regs) do { } while (0) 29 #define __fpu_state_restore(regs) do { } while (0) 42 static inline void __unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) __unlazy_fpu() argument 47 release_fpu(regs); __unlazy_fpu() 52 static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) unlazy_fpu() argument 55 __unlazy_fpu(tsk, regs); unlazy_fpu() 59 static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) clear_fpu() argument 64 release_fpu(regs); clear_fpu()
|
H A D | ptrace.h | 15 #define user_mode(regs) (((regs)->sr & 0x40000000)==0) 16 #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) 18 #define GET_FP(regs) ((regs)->regs[14]) 19 #define GET_USP(regs) ((regs)->regs[15]) 33 {.name = __stringify(r##num), .offset = offsetof(struct pt_regs, regs[num])} 46 * @regs: pt_regs from which register value is gotten. 50 * offset of the register in struct pt_regs address which specified by @regs. 53 static inline unsigned long regs_get_register(struct pt_regs *regs, regs_get_register() argument 58 return *(unsigned long *)((unsigned long)regs + offset); regs_get_register() 63 * @regs: pt_regs which contains kernel stack pointer. 69 static inline int regs_within_kernel_stack(struct pt_regs *regs, regs_within_kernel_stack() argument 73 (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); regs_within_kernel_stack() 78 * @regs: pt_regs which contains kernel stack pointer. 82 * is specified by @regs. If the @n th entry is NOT in the kernel stack, 85 static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, regs_get_kernel_stack_nth() argument 88 unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); regs_get_kernel_stack_nth() 90 if (regs_within_kernel_stack(regs, (unsigned long)addr)) regs_get_kernel_stack_nth() 100 struct perf_sample_data *data, struct pt_regs *regs); 105 static inline unsigned long profile_pc(struct pt_regs *regs) profile_pc() argument 107 unsigned long pc = regs->pc; profile_pc()
|
H A D | syscalls_64.h | 13 asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs); 14 asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
|
H A D | kexec.h | 39 __asm__ __volatile__ ("mov r0, %0" : "=r" (newregs->regs[0])); crash_setup_regs() 40 __asm__ __volatile__ ("mov r1, %0" : "=r" (newregs->regs[1])); crash_setup_regs() 41 __asm__ __volatile__ ("mov r2, %0" : "=r" (newregs->regs[2])); crash_setup_regs() 42 __asm__ __volatile__ ("mov r3, %0" : "=r" (newregs->regs[3])); crash_setup_regs() 43 __asm__ __volatile__ ("mov r4, %0" : "=r" (newregs->regs[4])); crash_setup_regs() 44 __asm__ __volatile__ ("mov r5, %0" : "=r" (newregs->regs[5])); crash_setup_regs() 45 __asm__ __volatile__ ("mov r6, %0" : "=r" (newregs->regs[6])); crash_setup_regs() 46 __asm__ __volatile__ ("mov r7, %0" : "=r" (newregs->regs[7])); crash_setup_regs() 47 __asm__ __volatile__ ("mov r8, %0" : "=r" (newregs->regs[8])); crash_setup_regs() 48 __asm__ __volatile__ ("mov r9, %0" : "=r" (newregs->regs[9])); crash_setup_regs() 49 __asm__ __volatile__ ("mov r10, %0" : "=r" (newregs->regs[10])); crash_setup_regs() 50 __asm__ __volatile__ ("mov r11, %0" : "=r" (newregs->regs[11])); crash_setup_regs() 51 __asm__ __volatile__ ("mov r12, %0" : "=r" (newregs->regs[12])); crash_setup_regs() 52 __asm__ __volatile__ ("mov r13, %0" : "=r" (newregs->regs[13])); crash_setup_regs() 53 __asm__ __volatile__ ("mov r14, %0" : "=r" (newregs->regs[14])); crash_setup_regs() 54 __asm__ __volatile__ ("mov r15, %0" : "=r" (newregs->regs[15])); crash_setup_regs()
|
/linux-4.1.27/arch/hexagon/kernel/ |
H A D | vm_events.c | 28 * @regs: pointer to pt_regs 34 void show_regs(struct pt_regs *regs) show_regs() argument 39 regs->restart_r0, regs->syscall_nr); show_regs() 40 printk(KERN_EMERG "preds: \t\t0x%08lx\n", regs->preds); show_regs() 42 regs->lc0, regs->sa0, regs->m0); show_regs() 44 regs->lc1, regs->sa1, regs->m1); show_regs() 46 regs->gp, regs->ugp, regs->usr); show_regs() 48 regs->cs0, regs->cs1); show_regs() 49 printk(KERN_EMERG "r0: \t0x%08lx %08lx %08lx %08lx\n", regs->r00, show_regs() 50 regs->r01, show_regs() 51 regs->r02, show_regs() 52 regs->r03); show_regs() 53 printk(KERN_EMERG "r4: \t0x%08lx %08lx %08lx %08lx\n", regs->r04, show_regs() 54 regs->r05, show_regs() 55 regs->r06, show_regs() 56 regs->r07); show_regs() 57 printk(KERN_EMERG "r8: \t0x%08lx %08lx %08lx %08lx\n", regs->r08, show_regs() 58 regs->r09, show_regs() 59 regs->r10, show_regs() 60 regs->r11); show_regs() 61 printk(KERN_EMERG "r12: \t0x%08lx %08lx %08lx %08lx\n", regs->r12, show_regs() 62 regs->r13, show_regs() 63 regs->r14, show_regs() 64 regs->r15); show_regs() 65 printk(KERN_EMERG "r16: \t0x%08lx %08lx %08lx %08lx\n", regs->r16, show_regs() 66 regs->r17, show_regs() 67 regs->r18, show_regs() 68 regs->r19); show_regs() 69 printk(KERN_EMERG "r20: \t0x%08lx %08lx %08lx %08lx\n", regs->r20, show_regs() 70 regs->r21, show_regs() 71 regs->r22, show_regs() 72 regs->r23); show_regs() 73 printk(KERN_EMERG "r24: \t0x%08lx %08lx %08lx %08lx\n", regs->r24, show_regs() 74 regs->r25, show_regs() 75 regs->r26, show_regs() 76 regs->r27); show_regs() 77 printk(KERN_EMERG "r28: \t0x%08lx %08lx %08lx %08lx\n", regs->r28, show_regs() 78 regs->r29, show_regs() 79 regs->r30, show_regs() 80 regs->r31); show_regs() 83 pt_elr(regs), pt_cause(regs), user_mode(regs)); show_regs() 85 pt_psp(regs), pt_badva(regs), ints_enabled(regs)); show_regs() 88 void dummy_handler(struct pt_regs *regs) dummy_handler() argument 90 unsigned int elr = pt_elr(regs); dummy_handler() 95 void arch_do_IRQ(struct pt_regs *regs) arch_do_IRQ() argument 97 int irq = pt_cause(regs); arch_do_IRQ() 98 struct pt_regs *old_regs = set_irq_regs(regs); arch_do_IRQ()
|
H A D | signal.c | 39 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, get_sigframe() argument 42 unsigned long sp = sigsp(regs->r29, ksig); get_sigframe() 47 static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext() argument 52 err |= copy_to_user(&sc->sc_regs.r0, ®s->r00, setup_sigcontext() 55 err |= __put_user(regs->sa0, &sc->sc_regs.sa0); setup_sigcontext() 56 err |= __put_user(regs->lc0, &sc->sc_regs.lc0); setup_sigcontext() 57 err |= __put_user(regs->sa1, &sc->sc_regs.sa1); setup_sigcontext() 58 err |= __put_user(regs->lc1, &sc->sc_regs.lc1); setup_sigcontext() 59 err |= __put_user(regs->m0, &sc->sc_regs.m0); setup_sigcontext() 60 err |= __put_user(regs->m1, &sc->sc_regs.m1); setup_sigcontext() 61 err |= __put_user(regs->usr, &sc->sc_regs.usr); setup_sigcontext() 62 err |= __put_user(regs->preds, &sc->sc_regs.p3_0); setup_sigcontext() 63 err |= __put_user(regs->gp, &sc->sc_regs.gp); setup_sigcontext() 64 err |= __put_user(regs->ugp, &sc->sc_regs.ugp); setup_sigcontext() 66 err |= __put_user(regs->cs0, &sc->sc_regs.cs0); setup_sigcontext() 67 err |= __put_user(regs->cs1, &sc->sc_regs.cs1); setup_sigcontext() 69 tmp = pt_elr(regs); err |= __put_user(tmp, &sc->sc_regs.pc); setup_sigcontext() 70 tmp = pt_cause(regs); err |= __put_user(tmp, &sc->sc_regs.cause); setup_sigcontext() 71 tmp = pt_badva(regs); err |= __put_user(tmp, &sc->sc_regs.badva); setup_sigcontext() 76 static int restore_sigcontext(struct pt_regs *regs, restore_sigcontext() argument 82 err |= copy_from_user(®s->r00, &sc->sc_regs.r0, restore_sigcontext() 85 err |= __get_user(regs->sa0, &sc->sc_regs.sa0); restore_sigcontext() 86 err |= __get_user(regs->lc0, &sc->sc_regs.lc0); restore_sigcontext() 87 err |= __get_user(regs->sa1, &sc->sc_regs.sa1); restore_sigcontext() 88 err |= __get_user(regs->lc1, &sc->sc_regs.lc1); restore_sigcontext() 89 err |= __get_user(regs->m0, &sc->sc_regs.m0); restore_sigcontext() 90 err |= __get_user(regs->m1, &sc->sc_regs.m1); restore_sigcontext() 91 err |= __get_user(regs->usr, &sc->sc_regs.usr); restore_sigcontext() 92 err |= __get_user(regs->preds, &sc->sc_regs.p3_0); restore_sigcontext() 93 err |= __get_user(regs->gp, &sc->sc_regs.gp); restore_sigcontext() 94 err |= __get_user(regs->ugp, &sc->sc_regs.ugp); restore_sigcontext() 96 err |= __get_user(regs->cs0, &sc->sc_regs.cs0); restore_sigcontext() 97 err |= __get_user(regs->cs1, &sc->sc_regs.cs1); restore_sigcontext() 99 err |= __get_user(tmp, &sc->sc_regs.pc); pt_set_elr(regs, tmp); restore_sigcontext() 108 struct pt_regs *regs) setup_rt_frame() 114 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); setup_rt_frame() 128 err |= setup_sigcontext(regs, &frame->uc.uc_mcontext); setup_rt_frame() 130 err |= __save_altstack(&frame->uc.uc_stack, user_stack_pointer(regs)); setup_rt_frame() 135 regs->r0100 = ((unsigned long long)((unsigned long)&frame->info) << 32) setup_rt_frame() 137 regs->r02 = (unsigned long) &frame->uc; setup_rt_frame() 138 regs->r31 = (unsigned long) vdso->rt_signal_trampoline; setup_rt_frame() 139 pt_psp(regs) = (unsigned long) frame; setup_rt_frame() 140 pt_set_elr(regs, (unsigned long)ksig->ka.sa.sa_handler); setup_rt_frame() 148 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 158 if (regs->syscall_nr >= 0) { handle_signal() 159 switch (regs->r00) { handle_signal() 162 regs->r00 = -EINTR; handle_signal() 166 regs->r00 = -EINTR; handle_signal() 171 regs->r06 = regs->syscall_nr; handle_signal() 172 pt_set_elr(regs, pt_elr(regs) - 4); handle_signal() 173 regs->r00 = regs->restart_r0; handle_signal() 185 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); handle_signal() 193 void do_signal(struct pt_regs *regs) do_signal() argument 197 if (!user_mode(regs)) do_signal() 201 handle_signal(&ksig, regs); do_signal() 209 if (regs->syscall_nr >= 0) { do_signal() 210 switch (regs->r00) { do_signal() 214 regs->r06 = regs->syscall_nr; do_signal() 217 regs->r06 = __NR_restart_syscall; do_signal() 222 pt_set_elr(regs, pt_elr(regs) - 4); do_signal() 223 regs->r00 = regs->restart_r0; do_signal() 237 struct pt_regs *regs = current_pt_regs(); sys_rt_sigreturn() local 244 frame = (struct rt_sigframe __user *)pt_psp(regs); sys_rt_sigreturn() 252 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) sys_rt_sigreturn() 256 pt_psp(regs) = regs->r29; sys_rt_sigreturn() 258 regs->syscall_nr = -1; sys_rt_sigreturn() 263 return regs->r00; sys_rt_sigreturn() 107 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | traps.c | 157 struct pt_regs *regs = (struct pt_regs *) (((void *)fp) do_show_stack() local 160 if (regs->syscall_nr != -1) { do_show_stack() 162 regs->syscall_nr); do_show_stack() 164 pt_psp(regs), pt_elr(regs)); do_show_stack() 170 ex_name(pt_cause(regs)), pt_cause(regs), do_show_stack() 171 pt_badva(regs)); do_show_stack() 174 newfp = (unsigned long *) regs->r30; do_show_stack() 175 ip = pt_elr(regs); do_show_stack() 198 int die(const char *str, struct pt_regs *regs, long err) die() argument 215 if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) == die() 220 show_regs(regs); die() 221 do_show_stack(current, ®s->r30, pt_elr(regs)); die() 239 int die_if_kernel(char *str, struct pt_regs *regs, long err) die_if_kernel() argument 241 if (!user_mode(regs)) die_if_kernel() 242 return die(str, regs, err); die_if_kernel() 250 static void misaligned_instruction(struct pt_regs *regs) misaligned_instruction() argument 252 die_if_kernel("Misaligned Instruction", regs, 0); misaligned_instruction() 261 static void misaligned_data_load(struct pt_regs *regs) misaligned_data_load() argument 263 die_if_kernel("Misaligned Data Load", regs, 0); misaligned_data_load() 267 static void misaligned_data_store(struct pt_regs *regs) misaligned_data_store() argument 269 die_if_kernel("Misaligned Data Store", regs, 0); misaligned_data_store() 273 static void illegal_instruction(struct pt_regs *regs) illegal_instruction() argument 275 die_if_kernel("Illegal Instruction", regs, 0); illegal_instruction() 283 static void precise_bus_error(struct pt_regs *regs) precise_bus_error() argument 285 die_if_kernel("Precise Bus Error", regs, 0); precise_bus_error() 294 static void cache_error(struct pt_regs *regs) cache_error() argument 296 die("Cache Error", regs, 0); cache_error() 302 void do_genex(struct pt_regs *regs) do_genex() argument 307 switch (pt_cause(regs)) { do_genex() 310 execute_protection_fault(regs); do_genex() 314 read_protection_fault(regs); do_genex() 318 write_protection_fault(regs); do_genex() 321 misaligned_instruction(regs); do_genex() 324 illegal_instruction(regs); do_genex() 327 misaligned_instruction(regs); do_genex() 330 misaligned_data_load(regs); do_genex() 333 misaligned_data_store(regs); do_genex() 337 illegal_instruction(regs); do_genex() 340 precise_bus_error(regs); do_genex() 343 cache_error(regs); do_genex() 347 panic("Unrecognized exception 0x%lx\n", pt_cause(regs)); do_genex() 359 void do_trap0(struct pt_regs *regs) do_trap0() argument 363 switch (pt_cause(regs)) { do_trap0() 369 tracehook_report_syscall_entry(regs))) do_trap0() 385 regs->syscall_nr = regs->r06; do_trap0() 393 regs->restart_r0 = regs->r00; do_trap0() 395 if ((unsigned long) regs->syscall_nr >= __NR_syscalls) { do_trap0() 396 regs->r00 = -1; do_trap0() 399 (sys_call_table[regs->syscall_nr]); do_trap0() 400 regs->r00 = syscall(regs->r00, regs->r01, do_trap0() 401 regs->r02, regs->r03, do_trap0() 402 regs->r04, regs->r05); do_trap0() 407 tracehook_report_syscall_exit(regs, 0); do_trap0() 412 if (user_mode(regs)) { do_trap0() 425 info.si_addr = (void __user *) pt_elr(regs); do_trap0() 429 kgdb_handle_exception(pt_cause(regs), SIGTRAP, do_trap0() 430 TRAP_BRKPT, regs); do_trap0() local 441 void do_machcheck(struct pt_regs *regs) do_machcheck() argument 451 void do_debug_exception(struct pt_regs *regs) do_debug_exception() argument 453 regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK; do_debug_exception() 454 regs->hvmer.vmest |= (TRAP_DEBUG << HVM_VMEST_CAUSE_SFT); do_debug_exception() 455 do_trap0(regs); do_debug_exception()
|
/linux-4.1.27/arch/mips/include/asm/ |
H A D | branch.h | 16 extern int __isa_exception_epc(struct pt_regs *regs); 17 extern int __compute_return_epc(struct pt_regs *regs); 18 extern int __compute_return_epc_for_insn(struct pt_regs *regs, 20 extern int __microMIPS_compute_return_epc(struct pt_regs *regs); 21 extern int __MIPS16e_compute_return_epc(struct pt_regs *regs); 30 extern int __mm_isBranchInstr(struct pt_regs *regs, 33 static inline int mm_isBranchInstr(struct pt_regs *regs, mm_isBranchInstr() argument 39 return __mm_isBranchInstr(regs, dec_insn, contpc); mm_isBranchInstr() 42 static inline int delay_slot(struct pt_regs *regs) delay_slot() argument 44 return regs->cp0_cause & CAUSEF_BD; delay_slot() 47 static inline void clear_delay_slot(struct pt_regs *regs) clear_delay_slot() argument 49 regs->cp0_cause &= ~CAUSEF_BD; clear_delay_slot() 52 static inline void set_delay_slot(struct pt_regs *regs) set_delay_slot() argument 54 regs->cp0_cause |= CAUSEF_BD; set_delay_slot() 57 static inline unsigned long exception_epc(struct pt_regs *regs) exception_epc() argument 59 if (likely(!delay_slot(regs))) exception_epc() 60 return regs->cp0_epc; exception_epc() 62 if (get_isa16_mode(regs->cp0_epc)) exception_epc() 63 return __isa_exception_epc(regs); exception_epc() 65 return regs->cp0_epc + 4; exception_epc() 70 static inline int compute_return_epc(struct pt_regs *regs) compute_return_epc() argument 72 if (get_isa16_mode(regs->cp0_epc)) { compute_return_epc() 74 return __microMIPS_compute_return_epc(regs); compute_return_epc() 76 return __MIPS16e_compute_return_epc(regs); compute_return_epc() 77 return regs->cp0_epc; compute_return_epc() 80 if (!delay_slot(regs)) { compute_return_epc() 81 regs->cp0_epc += 4; compute_return_epc() 85 return __compute_return_epc(regs); compute_return_epc() 88 static inline int MIPS16e_compute_return_epc(struct pt_regs *regs, MIPS16e_compute_return_epc() argument 91 if (likely(!delay_slot(regs))) { MIPS16e_compute_return_epc() 93 regs->cp0_epc += 4; MIPS16e_compute_return_epc() 96 regs->cp0_epc += 2; MIPS16e_compute_return_epc() 100 return __MIPS16e_compute_return_epc(regs); MIPS16e_compute_return_epc()
|
H A D | ptrace.h | 30 unsigned long regs[32]; member in struct:pt_regs 66 #define user_mode(regs) (((regs)->cp0_status & KU_MASK) == KU_USER) 68 static inline int is_syscall_success(struct pt_regs *regs) is_syscall_success() argument 70 return !regs->regs[7]; is_syscall_success() 73 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 75 if (is_syscall_success(regs)) regs_return_value() 76 return regs->regs[2]; regs_return_value() 78 return -regs->regs[2]; regs_return_value() 81 #define instruction_pointer(regs) ((regs)->cp0_epc) 82 #define profile_pc(regs) instruction_pointer(regs) 84 extern asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall); 85 extern asmlinkage void syscall_trace_leave(struct pt_regs *regs); 89 static inline void die_if_kernel(const char *str, struct pt_regs *regs) die_if_kernel() argument 91 if (unlikely(!user_mode(regs))) die_if_kernel() 92 die(str, regs); die_if_kernel() 103 static inline unsigned long user_stack_pointer(struct pt_regs *regs) user_stack_pointer() argument 105 return regs->regs[29]; user_stack_pointer() 108 static inline void user_stack_pointer_set(struct pt_regs *regs, user_stack_pointer_set() argument 111 regs->regs[29] = val; user_stack_pointer_set()
|
H A D | stacktrace.h | 23 static __always_inline void prepare_frametrace(struct pt_regs *regs) prepare_frametrace() argument 27 * Remove any garbage that may be in regs (specially func prepare_frametrace() 30 memset(regs, 0, sizeof(*regs)); prepare_frametrace() 47 : "=m" (regs->cp0_epc), prepare_frametrace() 48 "=m" (regs->regs[29]), "=m" (regs->regs[31]) prepare_frametrace()
|
H A D | syscall.h | 30 struct pt_regs *regs) syscall_get_nr() 36 struct task_struct *task, struct pt_regs *regs, unsigned int n) mips_get_syscall_arg() 38 unsigned long usp __maybe_unused = regs->regs[29]; mips_get_syscall_arg() 42 *arg = regs->regs[4 + n]; mips_get_syscall_arg() 58 *arg = regs->regs[4 + n]; mips_get_syscall_arg() 71 struct pt_regs *regs) syscall_get_return_value() 73 return regs->regs[2]; syscall_get_return_value() 77 struct pt_regs *regs) syscall_rollback() 83 struct pt_regs *regs, syscall_set_return_value() 87 regs->regs[2] = -error; syscall_set_return_value() 88 regs->regs[7] = -1; syscall_set_return_value() 90 regs->regs[2] = val; syscall_set_return_value() 91 regs->regs[7] = 0; syscall_set_return_value() 96 struct pt_regs *regs, syscall_get_arguments() 104 (regs->regs[2] == __NR_syscall)) syscall_get_arguments() 108 ret |= mips_get_syscall_arg(args++, task, regs, i++); syscall_get_arguments() 29 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 35 mips_get_syscall_arg(unsigned long *arg, struct task_struct *task, struct pt_regs *regs, unsigned int n) mips_get_syscall_arg() argument 70 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 76 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 82 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 95 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument
|
/linux-4.1.27/arch/alpha/include/asm/ |
H A D | ptrace.h | 8 #define user_mode(regs) (((regs)->ps & 8) != 0) 9 #define instruction_pointer(regs) ((regs)->pc) 10 #define profile_pc(regs) instruction_pointer(regs) 22 static inline unsigned long regs_return_value(struct pt_regs *regs) regs_return_value() argument 24 return regs->r0; regs_return_value()
|
H A D | a.out-core.h | 43 dump->regs[EF_V0] = pt->r0; aout_dump_thread() 44 dump->regs[EF_T0] = pt->r1; aout_dump_thread() 45 dump->regs[EF_T1] = pt->r2; aout_dump_thread() 46 dump->regs[EF_T2] = pt->r3; aout_dump_thread() 47 dump->regs[EF_T3] = pt->r4; aout_dump_thread() 48 dump->regs[EF_T4] = pt->r5; aout_dump_thread() 49 dump->regs[EF_T5] = pt->r6; aout_dump_thread() 50 dump->regs[EF_T6] = pt->r7; aout_dump_thread() 51 dump->regs[EF_T7] = pt->r8; aout_dump_thread() 52 dump->regs[EF_S0] = sw->r9; aout_dump_thread() 53 dump->regs[EF_S1] = sw->r10; aout_dump_thread() 54 dump->regs[EF_S2] = sw->r11; aout_dump_thread() 55 dump->regs[EF_S3] = sw->r12; aout_dump_thread() 56 dump->regs[EF_S4] = sw->r13; aout_dump_thread() 57 dump->regs[EF_S5] = sw->r14; aout_dump_thread() 58 dump->regs[EF_S6] = sw->r15; aout_dump_thread() 59 dump->regs[EF_A3] = pt->r19; aout_dump_thread() 60 dump->regs[EF_A4] = pt->r20; aout_dump_thread() 61 dump->regs[EF_A5] = pt->r21; aout_dump_thread() 62 dump->regs[EF_T8] = pt->r22; aout_dump_thread() 63 dump->regs[EF_T9] = pt->r23; aout_dump_thread() 64 dump->regs[EF_T10] = pt->r24; aout_dump_thread() 65 dump->regs[EF_T11] = pt->r25; aout_dump_thread() 66 dump->regs[EF_RA] = pt->r26; aout_dump_thread() 67 dump->regs[EF_T12] = pt->r27; aout_dump_thread() 68 dump->regs[EF_AT] = pt->r28; aout_dump_thread() 69 dump->regs[EF_SP] = rdusp(); aout_dump_thread() 70 dump->regs[EF_PS] = pt->ps; aout_dump_thread() 71 dump->regs[EF_PC] = pt->pc; aout_dump_thread() 72 dump->regs[EF_GP] = pt->gp; aout_dump_thread() 73 dump->regs[EF_A0] = pt->r16; aout_dump_thread() 74 dump->regs[EF_A1] = pt->r17; aout_dump_thread() 75 dump->regs[EF_A2] = pt->r18; aout_dump_thread() 76 memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8); aout_dump_thread()
|
/linux-4.1.27/tools/perf/util/ |
H A D | perf_regs.c | 5 int perf_reg_value(u64 *valp, struct regs_dump *regs, int id) perf_reg_value() argument 8 u64 mask = regs->mask; perf_reg_value() 10 if (regs->cache_mask & (1 << id)) perf_reg_value() 21 regs->cache_mask |= (1 << id); perf_reg_value() 22 regs->cache_regs[id] = regs->regs[idx]; perf_reg_value() 25 *valp = regs->cache_regs[id]; perf_reg_value()
|
/linux-4.1.27/arch/parisc/include/asm/ |
H A D | ptrace.h | 16 #define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0) 17 #define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0) 18 #define instruction_pointer(regs) ((regs)->iaoq[0] & ~3) 19 #define user_stack_pointer(regs) ((regs)->gr[30]) 22 static inline unsigned long regs_return_value(struct pt_regs *regs) regs_return_value() argument 24 return regs->gr[20]; regs_return_value()
|
H A D | assembly.h | 180 .macro save_general regs 181 STREG %r1, PT_GR1 (\regs) 182 STREG %r2, PT_GR2 (\regs) 183 STREG %r3, PT_GR3 (\regs) 184 STREG %r4, PT_GR4 (\regs) 185 STREG %r5, PT_GR5 (\regs) 186 STREG %r6, PT_GR6 (\regs) 187 STREG %r7, PT_GR7 (\regs) 188 STREG %r8, PT_GR8 (\regs) 189 STREG %r9, PT_GR9 (\regs) 190 STREG %r10, PT_GR10(\regs) 191 STREG %r11, PT_GR11(\regs) 192 STREG %r12, PT_GR12(\regs) 193 STREG %r13, PT_GR13(\regs) 194 STREG %r14, PT_GR14(\regs) 195 STREG %r15, PT_GR15(\regs) 196 STREG %r16, PT_GR16(\regs) 197 STREG %r17, PT_GR17(\regs) 198 STREG %r18, PT_GR18(\regs) 199 STREG %r19, PT_GR19(\regs) 200 STREG %r20, PT_GR20(\regs) 201 STREG %r21, PT_GR21(\regs) 202 STREG %r22, PT_GR22(\regs) 203 STREG %r23, PT_GR23(\regs) 204 STREG %r24, PT_GR24(\regs) 205 STREG %r25, PT_GR25(\regs) 207 STREG %r27, PT_GR27(\regs) 208 STREG %r28, PT_GR28(\regs) 211 STREG %r31, PT_GR31(\regs) 214 .macro rest_general regs 216 LDREG PT_GR2 (\regs), %r2 217 LDREG PT_GR3 (\regs), %r3 218 LDREG PT_GR4 (\regs), %r4 219 LDREG PT_GR5 (\regs), %r5 220 LDREG PT_GR6 (\regs), %r6 221 LDREG PT_GR7 (\regs), %r7 222 LDREG PT_GR8 (\regs), %r8 223 LDREG PT_GR9 (\regs), %r9 224 LDREG PT_GR10(\regs), %r10 225 LDREG PT_GR11(\regs), %r11 226 LDREG PT_GR12(\regs), %r12 227 LDREG PT_GR13(\regs), %r13 228 LDREG PT_GR14(\regs), %r14 229 LDREG PT_GR15(\regs), %r15 230 LDREG PT_GR16(\regs), %r16 231 LDREG PT_GR17(\regs), %r17 232 LDREG PT_GR18(\regs), %r18 233 LDREG PT_GR19(\regs), %r19 234 LDREG PT_GR20(\regs), %r20 235 LDREG PT_GR21(\regs), %r21 236 LDREG PT_GR22(\regs), %r22 237 LDREG PT_GR23(\regs), %r23 238 LDREG PT_GR24(\regs), %r24 239 LDREG PT_GR25(\regs), %r25 240 LDREG PT_GR26(\regs), %r26 241 LDREG PT_GR27(\regs), %r27 242 LDREG PT_GR28(\regs), %r28 245 LDREG PT_GR31(\regs), %r31 248 .macro save_fp regs 249 fstd,ma %fr0, 8(\regs) 250 fstd,ma %fr1, 8(\regs) 251 fstd,ma %fr2, 8(\regs) 252 fstd,ma %fr3, 8(\regs) 253 fstd,ma %fr4, 8(\regs) 254 fstd,ma %fr5, 8(\regs) 255 fstd,ma %fr6, 8(\regs) 256 fstd,ma %fr7, 8(\regs) 257 fstd,ma %fr8, 8(\regs) 258 fstd,ma %fr9, 8(\regs) 259 fstd,ma %fr10, 8(\regs) 260 fstd,ma %fr11, 8(\regs) 261 fstd,ma %fr12, 8(\regs) 262 fstd,ma %fr13, 8(\regs) 263 fstd,ma %fr14, 8(\regs) 264 fstd,ma %fr15, 8(\regs) 265 fstd,ma %fr16, 8(\regs) 266 fstd,ma %fr17, 8(\regs) 267 fstd,ma %fr18, 8(\regs) 268 fstd,ma %fr19, 8(\regs) 269 fstd,ma %fr20, 8(\regs) 270 fstd,ma %fr21, 8(\regs) 271 fstd,ma %fr22, 8(\regs) 272 fstd,ma %fr23, 8(\regs) 273 fstd,ma %fr24, 8(\regs) 274 fstd,ma %fr25, 8(\regs) 275 fstd,ma %fr26, 8(\regs) 276 fstd,ma %fr27, 8(\regs) 277 fstd,ma %fr28, 8(\regs) 278 fstd,ma %fr29, 8(\regs) 279 fstd,ma %fr30, 8(\regs) 280 fstd %fr31, 0(\regs) 283 .macro rest_fp regs 284 fldd 0(\regs), %fr31 285 fldd,mb -8(\regs), %fr30 286 fldd,mb -8(\regs), %fr29 287 fldd,mb -8(\regs), %fr28 288 fldd,mb -8(\regs), %fr27 289 fldd,mb -8(\regs), %fr26 290 fldd,mb -8(\regs), %fr25 291 fldd,mb -8(\regs), %fr24 292 fldd,mb -8(\regs), %fr23 293 fldd,mb -8(\regs), %fr22 294 fldd,mb -8(\regs), %fr21 295 fldd,mb -8(\regs), %fr20 296 fldd,mb -8(\regs), %fr19 297 fldd,mb -8(\regs), %fr18 298 fldd,mb -8(\regs), %fr17 299 fldd,mb -8(\regs), %fr16 300 fldd,mb -8(\regs), %fr15 301 fldd,mb -8(\regs), %fr14 302 fldd,mb -8(\regs), %fr13 303 fldd,mb -8(\regs), %fr12 304 fldd,mb -8(\regs), %fr11 305 fldd,mb -8(\regs), %fr10 306 fldd,mb -8(\regs), %fr9 307 fldd,mb -8(\regs), %fr8 308 fldd,mb -8(\regs), %fr7 309 fldd,mb -8(\regs), %fr6 310 fldd,mb -8(\regs), %fr5 311 fldd,mb -8(\regs), %fr4 312 fldd,mb -8(\regs), %fr3 313 fldd,mb -8(\regs), %fr2 314 fldd,mb -8(\regs), %fr1 315 fldd,mb -8(\regs), %fr0 432 .macro save_specials regs 434 SAVE_SP (%sr0, PT_SR0 (\regs)) 435 SAVE_SP (%sr1, PT_SR1 (\regs)) 436 SAVE_SP (%sr2, PT_SR2 (\regs)) 437 SAVE_SP (%sr3, PT_SR3 (\regs)) 438 SAVE_SP (%sr4, PT_SR4 (\regs)) 439 SAVE_SP (%sr5, PT_SR5 (\regs)) 440 SAVE_SP (%sr6, PT_SR6 (\regs)) 442 SAVE_CR (%cr17, PT_IASQ0(\regs)) 444 SAVE_CR (%cr17, PT_IASQ1(\regs)) 446 SAVE_CR (%cr18, PT_IAOQ0(\regs)) 448 SAVE_CR (%cr18, PT_IAOQ1(\regs)) 457 STREG %r1, PT_SAR (\regs) 459 SAVE_CR (%cr11, PT_SAR (\regs)) 461 SAVE_CR (%cr19, PT_IIR (\regs)) 468 STREG %r8, PT_PSW(\regs) 471 .macro rest_specials regs 473 REST_SP (%sr0, PT_SR0 (\regs)) 474 REST_SP (%sr1, PT_SR1 (\regs)) 475 REST_SP (%sr2, PT_SR2 (\regs)) 476 REST_SP (%sr3, PT_SR3 (\regs)) 477 REST_SP (%sr4, PT_SR4 (\regs)) 478 REST_SP (%sr5, PT_SR5 (\regs)) 479 REST_SP (%sr6, PT_SR6 (\regs)) 480 REST_SP (%sr7, PT_SR7 (\regs)) 482 REST_CR (%cr17, PT_IASQ0(\regs)) 483 REST_CR (%cr17, PT_IASQ1(\regs)) 485 REST_CR (%cr18, PT_IAOQ0(\regs)) 486 REST_CR (%cr18, PT_IAOQ1(\regs)) 488 REST_CR (%cr11, PT_SAR (\regs)) 490 REST_CR (%cr22, PT_PSW (\regs))
|
H A D | syscall.h | 12 struct pt_regs *regs) syscall_get_nr() 14 return regs->gr[20]; syscall_get_nr() 18 struct pt_regs *regs, unsigned int i, syscall_get_arguments() 25 args[5] = regs->gr[21]; syscall_get_arguments() 27 args[4] = regs->gr[22]; syscall_get_arguments() 29 args[3] = regs->gr[23]; syscall_get_arguments() 31 args[2] = regs->gr[24]; syscall_get_arguments() 33 args[1] = regs->gr[25]; syscall_get_arguments() 35 args[0] = regs->gr[26]; syscall_get_arguments() 11 syscall_get_nr(struct task_struct *tsk, struct pt_regs *regs) syscall_get_nr() argument 17 syscall_get_arguments(struct task_struct *tsk, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument
|
H A D | traps.h | 8 void parisc_terminate(char *msg, struct pt_regs *regs, 12 void do_page_fault(struct pt_regs *regs, unsigned long code,
|
H A D | unaligned.h | 12 void handle_unaligned(struct pt_regs *regs); 13 int check_unaligned(struct pt_regs *regs);
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | a.out-core.h | 23 static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) aout_dump_thread() argument 40 dump->u_ar0 = offsetof(struct user, regs); aout_dump_thread() 41 sw = ((struct switch_stack *)regs) - 1; aout_dump_thread() 42 dump->regs.d1 = regs->d1; aout_dump_thread() 43 dump->regs.d2 = regs->d2; aout_dump_thread() 44 dump->regs.d3 = regs->d3; aout_dump_thread() 45 dump->regs.d4 = regs->d4; aout_dump_thread() 46 dump->regs.d5 = regs->d5; aout_dump_thread() 47 dump->regs.d6 = sw->d6; aout_dump_thread() 48 dump->regs.d7 = sw->d7; aout_dump_thread() 49 dump->regs.a0 = regs->a0; aout_dump_thread() 50 dump->regs.a1 = regs->a1; aout_dump_thread() 51 dump->regs.a2 = regs->a2; aout_dump_thread() 52 dump->regs.a3 = sw->a3; aout_dump_thread() 53 dump->regs.a4 = sw->a4; aout_dump_thread() 54 dump->regs.a5 = sw->a5; aout_dump_thread() 55 dump->regs.a6 = sw->a6; aout_dump_thread() 56 dump->regs.d0 = regs->d0; aout_dump_thread() 57 dump->regs.orig_d0 = regs->orig_d0; aout_dump_thread() 58 dump->regs.stkadj = regs->stkadj; aout_dump_thread() 59 dump->regs.sr = regs->sr; aout_dump_thread() 60 dump->regs.pc = regs->pc; aout_dump_thread() 61 dump->regs.fmtvec = (regs->format << 12) | regs->vector; aout_dump_thread() 63 dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp); aout_dump_thread()
|
H A D | ptrace.h | 13 #define user_mode(regs) (!((regs)->sr & PS_S)) 14 #define instruction_pointer(regs) ((regs)->pc) 15 #define profile_pc(regs) instruction_pointer(regs)
|
/linux-4.1.27/arch/unicore32/include/asm/ |
H A D | ptrace.h | 19 #define user_mode(regs) \ 20 (processor_mode(regs) == USER_MODE) 22 #define processor_mode(regs) \ 23 ((regs)->UCreg_asr & MODE_MASK) 25 #define interrupts_enabled(regs) \ 26 (!((regs)->UCreg_asr & PSR_I_BIT)) 28 #define fast_interrupts_enabled(regs) \ 29 (!((regs)->UCreg_asr & PSR_R_BIT)) 34 static inline int valid_user_regs(struct pt_regs *regs) valid_user_regs() argument 36 unsigned long mode = regs->UCreg_asr & MODE_MASK; valid_user_regs() 41 regs->UCreg_asr &= ~(PSR_R_BIT); valid_user_regs() 43 if ((regs->UCreg_asr & PSR_I_BIT) == 0) { valid_user_regs() 51 regs->UCreg_asr &= PSR_f | USER_MODE; valid_user_regs() 56 #define instruction_pointer(regs) ((regs)->UCreg_pc) 57 #define user_stack_pointer(regs) ((regs)->UCreg_sp) 58 #define profile_pc(regs) instruction_pointer(regs)
|
/linux-4.1.27/arch/score/kernel/ |
H A D | traps.c | 118 void show_regs(struct pt_regs *regs) show_regs() argument 123 regs->regs[0], regs->regs[1], regs->regs[2], regs->regs[3], show_regs() 124 regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); show_regs() 126 regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11], show_regs() 127 regs->regs[12], regs->regs[13], regs->regs[14], regs->regs[15]); show_regs() 129 regs->regs[16], regs->regs[17], regs->regs[18], regs->regs[19], show_regs() 130 regs->regs[20], regs->regs[21], regs->regs[22], regs->regs[23]); show_regs() 132 regs->regs[24], regs->regs[25], regs->regs[26], regs->regs[27], show_regs() 133 regs->regs[28], regs->regs[29], regs->regs[30], regs->regs[31]); show_regs() 135 printk("CEH : %08lx\n", regs->ceh); show_regs() 136 printk("CEL : %08lx\n", regs->cel); show_regs() 139 regs->cp0_ema, regs->cp0_epc, print_tainted(), regs->cp0_psr, show_regs() 140 regs->cp0_ecr, regs->cp0_condition); show_regs() 143 static void show_registers(struct pt_regs *regs) show_registers() argument 145 show_regs(regs); show_registers() 148 show_stack(current_thread_info()->task, (long *) regs->regs[0]); show_registers() 149 show_trace((long *) regs->regs[0]); show_registers() 150 show_code((unsigned int *) regs->cp0_epc); show_registers() 154 void __die(const char *str, struct pt_regs *regs, const char *file, __die() argument 162 show_registers(regs); __die() 166 void __die_if_kernel(const char *str, struct pt_regs *regs, __die_if_kernel() argument 169 if (!user_mode(regs)) __die_if_kernel() 170 __die(str, regs, file, func, line); __die_if_kernel() 173 asmlinkage void do_adelinsn(struct pt_regs *regs) do_adelinsn() argument 176 regs->cp0_ema, regs->cp0_epc); do_adelinsn() 177 die_if_kernel("do_ade execution Exception\n", regs); do_adelinsn() 181 asmlinkage void do_adedata(struct pt_regs *regs) do_adedata() argument 184 fixup = search_exception_tables(regs->cp0_epc); do_adedata() 186 regs->cp0_epc = fixup->fixup; do_adedata() 190 regs->cp0_ema, regs->cp0_epc); do_adedata() 191 die_if_kernel("do_ade execution Exception\n", regs); do_adedata() 195 asmlinkage void do_pel(struct pt_regs *regs) do_pel() argument 197 die_if_kernel("do_pel execution Exception", regs); do_pel() 201 asmlinkage void do_cee(struct pt_regs *regs) do_cee() argument 203 die_if_kernel("do_cee execution Exception", regs); do_cee() 207 asmlinkage void do_cpe(struct pt_regs *regs) do_cpe() argument 209 die_if_kernel("do_cpe execution Exception", regs); do_cpe() 213 asmlinkage void do_be(struct pt_regs *regs) do_be() argument 215 die_if_kernel("do_be execution Exception", regs); do_be() 219 asmlinkage void do_ov(struct pt_regs *regs) do_ov() argument 223 die_if_kernel("do_ov execution Exception", regs); do_ov() 228 info.si_addr = (void *)regs->cp0_epc; do_ov() 232 asmlinkage void do_tr(struct pt_regs *regs) do_tr() argument 234 die_if_kernel("do_tr execution Exception", regs); do_tr() 238 asmlinkage void do_ri(struct pt_regs *regs) do_ri() argument 241 unsigned long epc = regs->cp0_epc; do_ri() 258 die_if_kernel("do_ri execution Exception", regs); do_ri() 263 asmlinkage void do_ccu(struct pt_regs *regs) do_ccu() argument 265 die_if_kernel("do_ccu execution Exception", regs); do_ccu() 269 asmlinkage void do_reserved(struct pt_regs *regs) do_reserved() argument 276 die_if_kernel("do_reserved execution Exception", regs); do_reserved() 277 show_regs(regs); do_reserved() 284 void nmi_exception_handler(struct pt_regs *regs) nmi_exception_handler() argument 286 die_if_kernel("nmi_exception_handler execution Exception", regs); nmi_exception_handler() 287 die("NMI", regs); nmi_exception_handler()
|
H A D | signal.c | 44 static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext() argument 49 reg = regs->cp0_epc; err |= __put_user(reg, &sc->sc_pc); setup_sigcontext() 50 err |= __put_user(regs->cp0_psr, &sc->sc_psr); setup_sigcontext() 51 err |= __put_user(regs->cp0_condition, &sc->sc_condition); setup_sigcontext() 55 reg = regs->regs[i]; \ setup_sigcontext() 70 reg = regs->ceh; err |= __put_user(reg, &sc->sc_mdceh); setup_sigcontext() 71 reg = regs->cel; err |= __put_user(reg, &sc->sc_mdcel); setup_sigcontext() 72 err |= __put_user(regs->cp0_ecr, &sc->sc_ecr); setup_sigcontext() 73 err |= __put_user(regs->cp0_ema, &sc->sc_ema); setup_sigcontext() 78 static int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext() argument 83 err |= __get_user(regs->cp0_epc, &sc->sc_pc); restore_sigcontext() 84 err |= __get_user(regs->cp0_condition, &sc->sc_condition); restore_sigcontext() 87 regs->ceh = (int) reg; restore_sigcontext() 89 regs->cel = (int) reg; restore_sigcontext() 92 regs->cp0_psr = (int) reg; restore_sigcontext() 94 regs->cp0_ecr = (int) reg; restore_sigcontext() 96 regs->cp0_ema = (int) reg; restore_sigcontext() 100 regs->regs[i] = reg; \ restore_sigcontext() 121 struct pt_regs *regs, size_t frame_size) get_sigframe() 126 sp = regs->regs[0]; get_sigframe() 137 score_rt_sigreturn(struct pt_regs *regs) score_rt_sigreturn() argument 146 frame = (struct rt_sigframe __user *) regs->regs[0]; score_rt_sigreturn() 154 sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext); score_rt_sigreturn() 162 regs->is_syscall = 0; score_rt_sigreturn() 168 : : "r" (regs) : "r8"); score_rt_sigreturn() 176 static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs, setup_rt_frame() argument 182 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); setup_rt_frame() 200 err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[0]); setup_rt_frame() 201 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); setup_rt_frame() 207 regs->regs[0] = (unsigned long) frame; setup_rt_frame() 208 regs->regs[3] = (unsigned long) frame->rs_code; setup_rt_frame() 209 regs->regs[4] = ksig->sig; setup_rt_frame() 210 regs->regs[5] = (unsigned long) &frame->rs_info; setup_rt_frame() 211 regs->regs[6] = (unsigned long) &frame->rs_uc; setup_rt_frame() 212 regs->regs[29] = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 213 regs->cp0_epc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 218 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 222 if (regs->is_syscall) { handle_signal() 223 switch (regs->regs[4]) { handle_signal() 226 regs->regs[4] = EINTR; handle_signal() 230 regs->regs[4] = EINTR; handle_signal() 234 regs->regs[4] = regs->orig_r4; handle_signal() 235 regs->regs[7] = regs->orig_r7; handle_signal() 236 regs->cp0_epc -= 8; handle_signal() 239 regs->is_syscall = 0; handle_signal() 245 ret = setup_rt_frame(ksig, regs, sigmask_to_save()); handle_signal() 250 static void do_signal(struct pt_regs *regs) do_signal() argument 259 if (!user_mode(regs)) do_signal() 264 handle_signal(&ksig, regs); do_signal() 268 if (regs->is_syscall) { do_signal() 269 if (regs->regs[4] == ERESTARTNOHAND || do_signal() 270 regs->regs[4] == ERESTARTSYS || do_signal() 271 regs->regs[4] == ERESTARTNOINTR) { do_signal() 272 regs->regs[4] = regs->orig_r4; do_signal() 273 regs->regs[7] = regs->orig_r7; do_signal() 274 regs->cp0_epc -= 8; do_signal() 277 if (regs->regs[4] == ERESTART_RESTARTBLOCK) { do_signal() 278 regs->regs[27] = __NR_restart_syscall; do_signal() 279 regs->regs[4] = regs->orig_r4; do_signal() 280 regs->regs[7] = regs->orig_r7; do_signal() 281 regs->cp0_epc -= 8; do_signal() 284 regs->is_syscall = 0; /* Don't deal with this again. */ do_signal() 298 asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, do_notify_resume() argument 303 do_signal(regs); do_notify_resume() 306 tracehook_notify_resume(regs); do_notify_resume() 120 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) get_sigframe() argument
|
/linux-4.1.27/drivers/video/fbdev/ |
H A D | bt455.h | 26 static inline void bt455_select_reg(struct bt455_regs *regs, int ir) bt455_select_reg() argument 29 regs->addr_cmap = ir & 0x0f; bt455_select_reg() 35 static inline void bt455_read_cmap_entry(struct bt455_regs *regs, int cr, bt455_read_cmap_entry() argument 38 bt455_select_reg(regs, cr); bt455_read_cmap_entry() 40 *red = regs->addr_cmap_data & 0x0f; bt455_read_cmap_entry() 42 *green = regs->addr_cmap_data & 0x0f; bt455_read_cmap_entry() 44 *blue = regs->addr_cmap_data & 0x0f; bt455_read_cmap_entry() 47 static inline void bt455_write_cmap_entry(struct bt455_regs *regs, int cr, bt455_write_cmap_entry() argument 50 bt455_select_reg(regs, cr); bt455_write_cmap_entry() 52 regs->addr_cmap_data = red & 0x0f; bt455_write_cmap_entry() 54 regs->addr_cmap_data = green & 0x0f; bt455_write_cmap_entry() 56 regs->addr_cmap_data = blue & 0x0f; bt455_write_cmap_entry() 59 static inline void bt455_write_ovly_entry(struct bt455_regs *regs, int cr, bt455_write_ovly_entry() argument 62 bt455_select_reg(regs, cr); bt455_write_ovly_entry() 64 regs->addr_ovly = red & 0x0f; bt455_write_ovly_entry() 66 regs->addr_ovly = green & 0x0f; bt455_write_ovly_entry() 68 regs->addr_ovly = blue & 0x0f; bt455_write_ovly_entry() 71 static inline void bt455_set_cursor(struct bt455_regs *regs) bt455_set_cursor() argument 74 regs->addr_ovly = 0x0f; bt455_set_cursor() 76 regs->addr_ovly = 0x0f; bt455_set_cursor() 78 regs->addr_ovly = 0x0f; bt455_set_cursor() 81 static inline void bt455_erase_cursor(struct bt455_regs *regs) bt455_erase_cursor() argument 83 /* bt455_write_cmap_entry(regs, 8, 0x00, 0x00, 0x00); */ bt455_erase_cursor() 84 /* bt455_write_cmap_entry(regs, 9, 0x00, 0x00, 0x00); */ bt455_erase_cursor() 85 bt455_write_ovly_entry(regs, 8, 0x03, 0x03, 0x03); bt455_erase_cursor() 86 bt455_write_ovly_entry(regs, 9, 0x07, 0x07, 0x07); bt455_erase_cursor() 89 regs->addr_ovly = 0x09; bt455_erase_cursor() 91 regs->addr_ovly = 0x09; bt455_erase_cursor() 93 regs->addr_ovly = 0x09; bt455_erase_cursor()
|
H A D | bt431.h | 73 static inline void bt431_select_reg(struct bt431_regs *regs, int ir) bt431_select_reg() argument 79 volatile u16 *lo = &(regs->addr_lo); bt431_select_reg() 80 volatile u16 *hi = &(regs->addr_hi); bt431_select_reg() 89 static inline u8 bt431_read_reg_inc(struct bt431_regs *regs) bt431_read_reg_inc() argument 95 volatile u16 *r = &(regs->addr_reg); bt431_read_reg_inc() 101 static inline void bt431_write_reg_inc(struct bt431_regs *regs, u8 value) bt431_write_reg_inc() argument 107 volatile u16 *r = &(regs->addr_reg); bt431_write_reg_inc() 113 static inline u8 bt431_read_reg(struct bt431_regs *regs, int ir) bt431_read_reg() argument 115 bt431_select_reg(regs, ir); bt431_read_reg() 116 return bt431_read_reg_inc(regs); bt431_read_reg() 119 static inline void bt431_write_reg(struct bt431_regs *regs, int ir, u8 value) bt431_write_reg() argument 121 bt431_select_reg(regs, ir); bt431_write_reg() 122 bt431_write_reg_inc(regs, value); bt431_write_reg() 126 static inline u16 bt431_read_cmap_inc(struct bt431_regs *regs) bt431_read_cmap_inc() argument 132 volatile u16 *r = &(regs->addr_cmap); bt431_read_cmap_inc() 138 static inline void bt431_write_cmap_inc(struct bt431_regs *regs, u16 value) bt431_write_cmap_inc() argument 144 volatile u16 *r = &(regs->addr_cmap); bt431_write_cmap_inc() 150 static inline u16 bt431_read_cmap(struct bt431_regs *regs, int cr) bt431_read_cmap() argument 152 bt431_select_reg(regs, cr); bt431_read_cmap() 153 return bt431_read_cmap_inc(regs); bt431_read_cmap() 156 static inline void bt431_write_cmap(struct bt431_regs *regs, int cr, u16 value) bt431_write_cmap() argument 158 bt431_select_reg(regs, cr); bt431_write_cmap() 159 bt431_write_cmap_inc(regs, value); bt431_write_cmap() 162 static inline void bt431_enable_cursor(struct bt431_regs *regs) bt431_enable_cursor() argument 164 bt431_write_reg(regs, BT431_REG_CMD, bt431_enable_cursor() 169 static inline void bt431_erase_cursor(struct bt431_regs *regs) bt431_erase_cursor() argument 171 bt431_write_reg(regs, BT431_REG_CMD, BT431_CMD_4_1_MUX); bt431_erase_cursor() 174 static inline void bt431_position_cursor(struct bt431_regs *regs, u16 x, u16 y) bt431_position_cursor() argument 192 bt431_select_reg(regs, BT431_REG_CXLO); bt431_position_cursor() 193 bt431_write_reg_inc(regs, x & 0xff); /* BT431_REG_CXLO */ bt431_position_cursor() 194 bt431_write_reg_inc(regs, (x >> 8) & 0x0f); /* BT431_REG_CXHI */ bt431_position_cursor() 195 bt431_write_reg_inc(regs, y & 0xff); /* BT431_REG_CYLO */ bt431_position_cursor() 196 bt431_write_reg_inc(regs, (y >> 8) & 0x0f); /* BT431_REG_CYHI */ bt431_position_cursor() 199 static inline void bt431_set_font(struct bt431_regs *regs, u8 fgc, bt431_set_font() argument 206 bt431_select_reg(regs, BT431_REG_CRAM_BASE); bt431_set_font() 219 bt431_write_cmap_inc(regs, value); bt431_set_font() 223 static inline void bt431_init_cursor(struct bt431_regs *regs) bt431_init_cursor() argument 226 bt431_select_reg(regs, BT431_REG_WXLO); bt431_init_cursor() 227 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WXLO */ bt431_init_cursor() 228 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WXHI */ bt431_init_cursor() 229 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WYLO */ bt431_init_cursor() 230 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WYHI */ bt431_init_cursor() 231 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WWLO */ bt431_init_cursor() 232 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WWHI */ bt431_init_cursor() 233 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WHLO */ bt431_init_cursor() 234 bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WHHI */ bt431_init_cursor()
|
/linux-4.1.27/arch/sparc/include/asm/ |
H A D | perf_event.h | 7 #define perf_arch_fetch_caller_regs(regs, ip) \ 20 (regs)->tstate = (_pstate << 8) | \ 22 (regs)->tpc = (ip); \ 23 (regs)->tnpc = (regs)->tpc + 4; \ 24 (regs)->u_regs[UREG_I6] = _fp; \ 25 (regs)->u_regs[UREG_I7] = _i7; \
|
H A D | ptrace.h | 12 static inline int pt_regs_trap_type(struct pt_regs *regs) pt_regs_trap_type() argument 14 return regs->magic & 0x1ff; pt_regs_trap_type() 17 static inline bool pt_regs_is_syscall(struct pt_regs *regs) pt_regs_is_syscall() argument 19 return (regs->tstate & TSTATE_SYSCALL); pt_regs_is_syscall() 22 static inline bool pt_regs_clear_syscall(struct pt_regs *regs) pt_regs_clear_syscall() argument 24 return (regs->tstate &= ~TSTATE_SYSCALL); pt_regs_clear_syscall() 62 #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) 63 #define instruction_pointer(regs) ((regs)->tpc) 64 #define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) 65 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) is_syscall_success() 66 static inline int is_syscall_success(struct pt_regs *regs) is_syscall_success() argument 68 return !(regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY)); is_syscall_success() 71 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 73 return regs->u_regs[UREG_I0]; regs_return_value() 78 #define profile_pc(regs) instruction_pointer(regs) 86 static inline bool pt_regs_is_syscall(struct pt_regs *regs) pt_regs_is_syscall() argument 88 return (regs->psr & PSR_SYSCALL); pt_regs_is_syscall() 91 static inline bool pt_regs_clear_syscall(struct pt_regs *regs) pt_regs_clear_syscall() argument 93 return (regs->psr &= ~PSR_SYSCALL); pt_regs_clear_syscall() 107 #define user_mode(regs) (!((regs)->psr & PSR_PS)) 108 #define instruction_pointer(regs) ((regs)->pc) 109 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
|
H A D | syscall.h | 19 struct pt_regs *regs) syscall_get_nr() 21 int syscall_p = pt_regs_is_syscall(regs); syscall_get_nr() 23 return (syscall_p ? regs->u_regs[UREG_G1] : -1L); syscall_get_nr() 27 struct pt_regs *regs) syscall_rollback() 39 static inline bool syscall_has_error(struct pt_regs *regs) syscall_has_error() argument 41 return (regs->psr & PSR_C) ? true : false; syscall_has_error() 43 static inline void syscall_set_error(struct pt_regs *regs) syscall_set_error() argument 45 regs->psr |= PSR_C; syscall_set_error() 47 static inline void syscall_clear_error(struct pt_regs *regs) syscall_clear_error() argument 49 regs->psr &= ~PSR_C; syscall_clear_error() 52 static inline bool syscall_has_error(struct pt_regs *regs) syscall_has_error() argument 54 return (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY)) ? true : false; syscall_has_error() 56 static inline void syscall_set_error(struct pt_regs *regs) syscall_set_error() argument 58 regs->tstate |= (TSTATE_XCARRY | TSTATE_ICARRY); syscall_set_error() 60 static inline void syscall_clear_error(struct pt_regs *regs) syscall_clear_error() argument 62 regs->tstate &= ~(TSTATE_XCARRY | TSTATE_ICARRY); syscall_clear_error() 67 struct pt_regs *regs) syscall_get_error() 69 long val = regs->u_regs[UREG_I0]; syscall_get_error() 71 return (syscall_has_error(regs) ? -val : 0); syscall_get_error() 75 struct pt_regs *regs) syscall_get_return_value() 77 long val = regs->u_regs[UREG_I0]; syscall_get_return_value() 83 struct pt_regs *regs, syscall_set_return_value() 87 syscall_set_error(regs); syscall_set_return_value() 88 regs->u_regs[UREG_I0] = -error; syscall_set_return_value() 90 syscall_clear_error(regs); syscall_set_return_value() 91 regs->u_regs[UREG_I0] = val; syscall_set_return_value() 96 struct pt_regs *regs, syscall_get_arguments() 109 unsigned long val = regs->u_regs[UREG_I0 + i + j]; syscall_get_arguments() 119 struct pt_regs *regs, syscall_set_arguments() 126 regs->u_regs[UREG_I0 + i + j] = args[j]; syscall_set_arguments() 18 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 26 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 66 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 74 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 82 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 95 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 118 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/x86/um/asm/ |
H A D | ptrace.h | 10 #define user_mode(r) UPT_IS_USER(&(r)->regs) 12 #define PT_REGS_AX(r) UPT_AX(&(r)->regs) 13 #define PT_REGS_BX(r) UPT_BX(&(r)->regs) 14 #define PT_REGS_CX(r) UPT_CX(&(r)->regs) 15 #define PT_REGS_DX(r) UPT_DX(&(r)->regs) 17 #define PT_REGS_SI(r) UPT_SI(&(r)->regs) 18 #define PT_REGS_DI(r) UPT_DI(&(r)->regs) 19 #define PT_REGS_BP(r) UPT_BP(&(r)->regs) 20 #define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs) 22 #define PT_REGS_CS(r) UPT_CS(&(r)->regs) 23 #define PT_REGS_SS(r) UPT_SS(&(r)->regs) 24 #define PT_REGS_DS(r) UPT_DS(&(r)->regs) 25 #define PT_REGS_ES(r) UPT_ES(&(r)->regs) 32 #define profile_pc(regs) PT_REGS_IP(regs) 37 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 39 return PT_REGS_AX(regs); regs_return_value() 58 #define PT_REGS_R8(r) UPT_R8(&(r)->regs) 59 #define PT_REGS_R9(r) UPT_R9(&(r)->regs) 60 #define PT_REGS_R10(r) UPT_R10(&(r)->regs) 61 #define PT_REGS_R11(r) UPT_R11(&(r)->regs) 62 #define PT_REGS_R12(r) UPT_R12(&(r)->regs) 63 #define PT_REGS_R13(r) UPT_R13(&(r)->regs) 64 #define PT_REGS_R14(r) UPT_R14(&(r)->regs) 65 #define PT_REGS_R15(r) UPT_R15(&(r)->regs) 85 #define user_stack_pointer(regs) PT_REGS_SP(regs)
|
H A D | elf.h | 36 #define ELF_PLAT_INIT(regs, load_addr) do { \ 37 PT_REGS_BX(regs) = 0; \ 38 PT_REGS_CX(regs) = 0; \ 39 PT_REGS_DX(regs) = 0; \ 40 PT_REGS_SI(regs) = 0; \ 41 PT_REGS_DI(regs) = 0; \ 42 PT_REGS_BP(regs) = 0; \ 43 PT_REGS_AX(regs) = 0; \ 48 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ 49 pr_reg[0] = PT_REGS_BX(regs); \ 50 pr_reg[1] = PT_REGS_CX(regs); \ 51 pr_reg[2] = PT_REGS_DX(regs); \ 52 pr_reg[3] = PT_REGS_SI(regs); \ 53 pr_reg[4] = PT_REGS_DI(regs); \ 54 pr_reg[5] = PT_REGS_BP(regs); \ 55 pr_reg[6] = PT_REGS_AX(regs); \ 56 pr_reg[7] = PT_REGS_DS(regs); \ 57 pr_reg[8] = PT_REGS_ES(regs); \ 59 pr_reg[9] = PT_REGS_DS(regs); \ 60 pr_reg[10] = PT_REGS_DS(regs); \ 61 pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \ 62 pr_reg[12] = PT_REGS_IP(regs); \ 63 pr_reg[13] = PT_REGS_CS(regs); \ 64 pr_reg[14] = PT_REGS_EFLAGS(regs); \ 65 pr_reg[15] = PT_REGS_SP(regs); \ 66 pr_reg[16] = PT_REGS_SS(regs); \ 132 #define ELF_PLAT_INIT(regs, load_addr) do { \ 133 PT_REGS_BX(regs) = 0; \ 134 PT_REGS_CX(regs) = 0; \ 135 PT_REGS_DX(regs) = 0; \ 136 PT_REGS_SI(regs) = 0; \ 137 PT_REGS_DI(regs) = 0; \ 138 PT_REGS_BP(regs) = 0; \ 139 PT_REGS_AX(regs) = 0; \ 140 PT_REGS_R8(regs) = 0; \ 141 PT_REGS_R9(regs) = 0; \ 142 PT_REGS_R10(regs) = 0; \ 143 PT_REGS_R11(regs) = 0; \ 144 PT_REGS_R12(regs) = 0; \ 145 PT_REGS_R13(regs) = 0; \ 146 PT_REGS_R14(regs) = 0; \ 147 PT_REGS_R15(regs) = 0; \ 151 (pr_reg)[0] = (_regs)->regs.gp[0]; \ 152 (pr_reg)[1] = (_regs)->regs.gp[1]; \ 153 (pr_reg)[2] = (_regs)->regs.gp[2]; \ 154 (pr_reg)[3] = (_regs)->regs.gp[3]; \ 155 (pr_reg)[4] = (_regs)->regs.gp[4]; \ 156 (pr_reg)[5] = (_regs)->regs.gp[5]; \ 157 (pr_reg)[6] = (_regs)->regs.gp[6]; \ 158 (pr_reg)[7] = (_regs)->regs.gp[7]; \ 159 (pr_reg)[8] = (_regs)->regs.gp[8]; \ 160 (pr_reg)[9] = (_regs)->regs.gp[9]; \ 161 (pr_reg)[10] = (_regs)->regs.gp[10]; \ 162 (pr_reg)[11] = (_regs)->regs.gp[11]; \ 163 (pr_reg)[12] = (_regs)->regs.gp[12]; \ 164 (pr_reg)[13] = (_regs)->regs.gp[13]; \ 165 (pr_reg)[14] = (_regs)->regs.gp[14]; \ 166 (pr_reg)[15] = (_regs)->regs.gp[15]; \ 167 (pr_reg)[16] = (_regs)->regs.gp[16]; \ 168 (pr_reg)[17] = (_regs)->regs.gp[17]; \ 169 (pr_reg)[18] = (_regs)->regs.gp[18]; \ 170 (pr_reg)[19] = (_regs)->regs.gp[19]; \ 171 (pr_reg)[20] = (_regs)->regs.gp[20]; \ 203 #define task_pt_regs(t) (&(t)->thread.regs)
|
/linux-4.1.27/arch/powerpc/platforms/cell/ |
H A D | ras.h | 4 extern void cbe_system_error_exception(struct pt_regs *regs); 5 extern void cbe_maintenance_exception(struct pt_regs *regs); 6 extern void cbe_thermal_exception(struct pt_regs *regs);
|
/linux-4.1.27/drivers/media/platform/s5p-jpeg/ |
H A D | jpeg-hw-exynos3250.h | 18 #include "jpeg-regs.h" 20 void exynos3250_jpeg_reset(void __iomem *regs); 21 void exynos3250_jpeg_poweron(void __iomem *regs); 22 void exynos3250_jpeg_set_dma_num(void __iomem *regs); 24 void exynos3250_jpeg_input_raw_fmt(void __iomem *regs, unsigned int fmt); 25 void exynos3250_jpeg_output_raw_fmt(void __iomem *regs, unsigned int fmt); 26 void exynos3250_jpeg_set_y16(void __iomem *regs, bool y16); 27 void exynos3250_jpeg_proc_mode(void __iomem *regs, unsigned int mode); 28 void exynos3250_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); 29 unsigned int exynos3250_jpeg_get_subsampling_mode(void __iomem *regs); 30 void exynos3250_jpeg_dri(void __iomem *regs, unsigned int dri); 31 void exynos3250_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n); 32 void exynos3250_jpeg_htbl_ac(void __iomem *regs, unsigned int t); 33 void exynos3250_jpeg_htbl_dc(void __iomem *regs, unsigned int t); 34 void exynos3250_jpeg_set_y(void __iomem *regs, unsigned int y); 35 void exynos3250_jpeg_set_x(void __iomem *regs, unsigned int x); 36 void exynos3250_jpeg_interrupts_enable(void __iomem *regs); 37 void exynos3250_jpeg_enc_stream_bound(void __iomem *regs, unsigned int size); 38 void exynos3250_jpeg_outform_raw(void __iomem *regs, unsigned long format); 39 void exynos3250_jpeg_jpgadr(void __iomem *regs, unsigned int addr); 40 void exynos3250_jpeg_imgadr(void __iomem *regs, struct s5p_jpeg_addr *img_addr); 41 void exynos3250_jpeg_stride(void __iomem *regs, unsigned int img_fmt, 43 void exynos3250_jpeg_offset(void __iomem *regs, unsigned int x_offset, 46 void exynos3250_jpeg_start(void __iomem *regs); 47 void exynos3250_jpeg_rstart(void __iomem *regs); 48 unsigned int exynos3250_jpeg_get_int_status(void __iomem *regs); 49 void exynos3250_jpeg_clear_int_status(void __iomem *regs, 51 unsigned int exynos3250_jpeg_operating(void __iomem *regs); 52 unsigned int exynos3250_jpeg_compressed_size(void __iomem *regs); 53 void exynos3250_jpeg_dec_stream_size(void __iomem *regs, unsigned int size); 54 void exynos3250_jpeg_dec_scaling_ratio(void __iomem *regs, unsigned int sratio); 55 void exynos3250_jpeg_set_timer(void __iomem *regs, unsigned int time_value); 56 unsigned int exynos3250_jpeg_get_timer_status(void __iomem *regs); 57 void exynos3250_jpeg_set_timer_status(void __iomem *regs); 58 void exynos3250_jpeg_clear_timer_status(void __iomem *regs);
|
H A D | jpeg-hw-s5p.h | 18 #include "jpeg-regs.h" 29 void s5p_jpeg_reset(void __iomem *regs); 30 void s5p_jpeg_poweron(void __iomem *regs); 31 void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode); 32 void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode); 33 void s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); 34 unsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs); 35 void s5p_jpeg_dri(void __iomem *regs, unsigned int dri); 36 void s5p_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n); 37 void s5p_jpeg_htbl_ac(void __iomem *regs, unsigned int t); 38 void s5p_jpeg_htbl_dc(void __iomem *regs, unsigned int t); 39 void s5p_jpeg_y(void __iomem *regs, unsigned int y); 40 void s5p_jpeg_x(void __iomem *regs, unsigned int x); 41 void s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable); 42 void s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable); 43 void s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl); 44 int s5p_jpeg_timer_stat(void __iomem *regs); 45 void s5p_jpeg_clear_timer_stat(void __iomem *regs); 46 void s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size); 47 int s5p_jpeg_enc_stream_stat(void __iomem *regs); 48 void s5p_jpeg_clear_enc_stream_stat(void __iomem *regs); 49 void s5p_jpeg_outform_raw(void __iomem *regs, unsigned long format); 50 void s5p_jpeg_jpgadr(void __iomem *regs, unsigned long addr); 51 void s5p_jpeg_imgadr(void __iomem *regs, unsigned long addr); 52 void s5p_jpeg_coef(void __iomem *regs, unsigned int i, 54 void s5p_jpeg_start(void __iomem *regs); 55 int s5p_jpeg_result_stat_ok(void __iomem *regs); 56 int s5p_jpeg_stream_stat_ok(void __iomem *regs); 57 void s5p_jpeg_clear_int(void __iomem *regs); 58 unsigned int s5p_jpeg_compressed_size(void __iomem *regs);
|
H A D | jpeg-hw-s5p.c | 17 #include "jpeg-regs.h" 20 void s5p_jpeg_reset(void __iomem *regs) s5p_jpeg_reset() argument 24 writel(1, regs + S5P_JPG_SW_RESET); s5p_jpeg_reset() 25 reg = readl(regs + S5P_JPG_SW_RESET); s5p_jpeg_reset() 29 reg = readl(regs + S5P_JPG_SW_RESET); s5p_jpeg_reset() 33 void s5p_jpeg_poweron(void __iomem *regs) s5p_jpeg_poweron() argument 35 writel(S5P_POWER_ON, regs + S5P_JPGCLKCON); s5p_jpeg_poweron() 38 void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode) s5p_jpeg_input_raw_mode() argument 48 reg = readl(regs + S5P_JPGCMOD); s5p_jpeg_input_raw_mode() 51 writel(reg, regs + S5P_JPGCMOD); s5p_jpeg_input_raw_mode() 54 void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode) s5p_jpeg_proc_mode() argument 63 reg = readl(regs + S5P_JPGMOD); s5p_jpeg_proc_mode() 66 writel(reg, regs + S5P_JPGMOD); s5p_jpeg_proc_mode() 69 void s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode) s5p_jpeg_subsampling_mode() argument 78 reg = readl(regs + S5P_JPGMOD); s5p_jpeg_subsampling_mode() 81 writel(reg, regs + S5P_JPGMOD); s5p_jpeg_subsampling_mode() 84 unsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs) s5p_jpeg_get_subsampling_mode() argument 86 return readl(regs + S5P_JPGMOD) & S5P_SUBSAMPLING_MODE_MASK; s5p_jpeg_get_subsampling_mode() 89 void s5p_jpeg_dri(void __iomem *regs, unsigned int dri) s5p_jpeg_dri() argument 93 reg = readl(regs + S5P_JPGDRI_U); s5p_jpeg_dri() 96 writel(reg, regs + S5P_JPGDRI_U); s5p_jpeg_dri() 98 reg = readl(regs + S5P_JPGDRI_L); s5p_jpeg_dri() 101 writel(reg, regs + S5P_JPGDRI_L); s5p_jpeg_dri() 104 void s5p_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n) s5p_jpeg_qtbl() argument 108 reg = readl(regs + S5P_JPG_QTBL); s5p_jpeg_qtbl() 111 writel(reg, regs + S5P_JPG_QTBL); s5p_jpeg_qtbl() 114 void s5p_jpeg_htbl_ac(void __iomem *regs, unsigned int t) s5p_jpeg_htbl_ac() argument 118 reg = readl(regs + S5P_JPG_HTBL); s5p_jpeg_htbl_ac() 122 writel(reg, regs + S5P_JPG_HTBL); s5p_jpeg_htbl_ac() 125 void s5p_jpeg_htbl_dc(void __iomem *regs, unsigned int t) s5p_jpeg_htbl_dc() argument 129 reg = readl(regs + S5P_JPG_HTBL); s5p_jpeg_htbl_dc() 133 writel(reg, regs + S5P_JPG_HTBL); s5p_jpeg_htbl_dc() 136 void s5p_jpeg_y(void __iomem *regs, unsigned int y) s5p_jpeg_y() argument 140 reg = readl(regs + S5P_JPGY_U); s5p_jpeg_y() 143 writel(reg, regs + S5P_JPGY_U); s5p_jpeg_y() 145 reg = readl(regs + S5P_JPGY_L); s5p_jpeg_y() 148 writel(reg, regs + S5P_JPGY_L); s5p_jpeg_y() 151 void s5p_jpeg_x(void __iomem *regs, unsigned int x) s5p_jpeg_x() argument 155 reg = readl(regs + S5P_JPGX_U); s5p_jpeg_x() 158 writel(reg, regs + S5P_JPGX_U); s5p_jpeg_x() 160 reg = readl(regs + S5P_JPGX_L); s5p_jpeg_x() 163 writel(reg, regs + S5P_JPGX_L); s5p_jpeg_x() 166 void s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable) s5p_jpeg_rst_int_enable() argument 170 reg = readl(regs + S5P_JPGINTSE); s5p_jpeg_rst_int_enable() 174 writel(reg, regs + S5P_JPGINTSE); s5p_jpeg_rst_int_enable() 177 void s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable) s5p_jpeg_data_num_int_enable() argument 181 reg = readl(regs + S5P_JPGINTSE); s5p_jpeg_data_num_int_enable() 185 writel(reg, regs + S5P_JPGINTSE); s5p_jpeg_data_num_int_enable() 188 void s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl) s5p_jpeg_final_mcu_num_int_enable() argument 192 reg = readl(regs + S5P_JPGINTSE); s5p_jpeg_final_mcu_num_int_enable() 196 writel(reg, regs + S5P_JPGINTSE); s5p_jpeg_final_mcu_num_int_enable() 199 int s5p_jpeg_timer_stat(void __iomem *regs) s5p_jpeg_timer_stat() argument 201 return (int)((readl(regs + S5P_JPG_TIMER_ST) & S5P_TIMER_INT_STAT_MASK) s5p_jpeg_timer_stat() 205 void s5p_jpeg_clear_timer_stat(void __iomem *regs) s5p_jpeg_clear_timer_stat() argument 209 reg = readl(regs + S5P_JPG_TIMER_SE); s5p_jpeg_clear_timer_stat() 211 writel(reg, regs + S5P_JPG_TIMER_SE); s5p_jpeg_clear_timer_stat() 214 void s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size) s5p_jpeg_enc_stream_int() argument 218 reg = readl(regs + S5P_JPG_ENC_STREAM_INTSE); s5p_jpeg_enc_stream_int() 222 writel(reg, regs + S5P_JPG_ENC_STREAM_INTSE); s5p_jpeg_enc_stream_int() 225 int s5p_jpeg_enc_stream_stat(void __iomem *regs) s5p_jpeg_enc_stream_stat() argument 227 return (int)(readl(regs + S5P_JPG_ENC_STREAM_INTST) & s5p_jpeg_enc_stream_stat() 231 void s5p_jpeg_clear_enc_stream_stat(void __iomem *regs) s5p_jpeg_clear_enc_stream_stat() argument 235 reg = readl(regs + S5P_JPG_ENC_STREAM_INTSE); s5p_jpeg_clear_enc_stream_stat() 237 writel(reg, regs + S5P_JPG_ENC_STREAM_INTSE); s5p_jpeg_clear_enc_stream_stat() 240 void s5p_jpeg_outform_raw(void __iomem *regs, unsigned long format) s5p_jpeg_outform_raw() argument 249 reg = readl(regs + S5P_JPG_OUTFORM); s5p_jpeg_outform_raw() 252 writel(reg, regs + S5P_JPG_OUTFORM); s5p_jpeg_outform_raw() 255 void s5p_jpeg_jpgadr(void __iomem *regs, unsigned long addr) s5p_jpeg_jpgadr() argument 257 writel(addr, regs + S5P_JPG_JPGADR); s5p_jpeg_jpgadr() 260 void s5p_jpeg_imgadr(void __iomem *regs, unsigned long addr) s5p_jpeg_imgadr() argument 262 writel(addr, regs + S5P_JPG_IMGADR); s5p_jpeg_imgadr() 265 void s5p_jpeg_coef(void __iomem *regs, unsigned int i, s5p_jpeg_coef() argument 270 reg = readl(regs + S5P_JPG_COEF(i)); s5p_jpeg_coef() 273 writel(reg, regs + S5P_JPG_COEF(i)); s5p_jpeg_coef() 276 void s5p_jpeg_start(void __iomem *regs) s5p_jpeg_start() argument 278 writel(1, regs + S5P_JSTART); s5p_jpeg_start() 281 int s5p_jpeg_result_stat_ok(void __iomem *regs) s5p_jpeg_result_stat_ok() argument 283 return (int)((readl(regs + S5P_JPGINTST) & S5P_RESULT_STAT_MASK) s5p_jpeg_result_stat_ok() 287 int s5p_jpeg_stream_stat_ok(void __iomem *regs) s5p_jpeg_stream_stat_ok() argument 289 return !(int)((readl(regs + S5P_JPGINTST) & S5P_STREAM_STAT_MASK) s5p_jpeg_stream_stat_ok() 293 void s5p_jpeg_clear_int(void __iomem *regs) s5p_jpeg_clear_int() argument 295 readl(regs + S5P_JPGINTST); s5p_jpeg_clear_int() 296 writel(S5P_INT_RELEASE, regs + S5P_JPGCOM); s5p_jpeg_clear_int() 297 readl(regs + S5P_JPGOPR); s5p_jpeg_clear_int() 300 unsigned int s5p_jpeg_compressed_size(void __iomem *regs) s5p_jpeg_compressed_size() argument 304 jpeg_size |= (readl(regs + S5P_JPGCNT_U) & 0xff) << 16; s5p_jpeg_compressed_size() 305 jpeg_size |= (readl(regs + S5P_JPGCNT_M) & 0xff) << 8; s5p_jpeg_compressed_size() 306 jpeg_size |= (readl(regs + S5P_JPGCNT_L) & 0xff); s5p_jpeg_compressed_size()
|
H A D | jpeg-hw-exynos3250.c | 18 #include "jpeg-regs.h" 21 void exynos3250_jpeg_reset(void __iomem *regs) exynos3250_jpeg_reset() argument 26 writel(1, regs + EXYNOS3250_SW_RESET); exynos3250_jpeg_reset() 31 reg = readl(regs + EXYNOS3250_SW_RESET); exynos3250_jpeg_reset() 38 writel(1, regs + EXYNOS3250_JPGDRI); exynos3250_jpeg_reset() 41 reg = readl(regs + EXYNOS3250_JPGDRI); exynos3250_jpeg_reset() 44 writel(0, regs + EXYNOS3250_JPGDRI); exynos3250_jpeg_reset() 47 void exynos3250_jpeg_poweron(void __iomem *regs) exynos3250_jpeg_poweron() argument 49 writel(EXYNOS3250_POWER_ON, regs + EXYNOS3250_JPGCLKCON); exynos3250_jpeg_poweron() 52 void exynos3250_jpeg_set_dma_num(void __iomem *regs) exynos3250_jpeg_set_dma_num() argument 60 regs + EXYNOS3250_DMA_ISSUE_NUM); exynos3250_jpeg_set_dma_num() 72 void exynos3250_jpeg_input_raw_fmt(void __iomem *regs, unsigned int fmt) exynos3250_jpeg_input_raw_fmt() argument 76 reg = readl(regs + EXYNOS3250_JPGCMOD) & exynos3250_jpeg_input_raw_fmt() 120 writel(reg, regs + EXYNOS3250_JPGCMOD); exynos3250_jpeg_input_raw_fmt() 123 void exynos3250_jpeg_set_y16(void __iomem *regs, bool y16) exynos3250_jpeg_set_y16() argument 127 reg = readl(regs + EXYNOS3250_JPGCMOD); exynos3250_jpeg_set_y16() 132 writel(reg, regs + EXYNOS3250_JPGCMOD); exynos3250_jpeg_set_y16() 135 void exynos3250_jpeg_proc_mode(void __iomem *regs, unsigned int mode) exynos3250_jpeg_proc_mode() argument 143 reg = readl(regs + EXYNOS3250_JPGMOD); exynos3250_jpeg_proc_mode() 146 writel(reg, regs + EXYNOS3250_JPGMOD); exynos3250_jpeg_proc_mode() 149 void exynos3250_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode) exynos3250_jpeg_subsampling_mode() argument 165 reg = readl(regs + EXYNOS3250_JPGMOD); exynos3250_jpeg_subsampling_mode() 168 writel(reg, regs + EXYNOS3250_JPGMOD); exynos3250_jpeg_subsampling_mode() 171 unsigned int exynos3250_jpeg_get_subsampling_mode(void __iomem *regs) exynos3250_jpeg_get_subsampling_mode() argument 173 return readl(regs + EXYNOS3250_JPGMOD) & exynos3250_jpeg_get_subsampling_mode() 177 void exynos3250_jpeg_dri(void __iomem *regs, unsigned int dri) exynos3250_jpeg_dri() argument 182 writel(reg, regs + EXYNOS3250_JPGDRI); exynos3250_jpeg_dri() 185 void exynos3250_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n) exynos3250_jpeg_qtbl() argument 189 reg = readl(regs + EXYNOS3250_QHTBL); exynos3250_jpeg_qtbl() 193 writel(reg, regs + EXYNOS3250_QHTBL); exynos3250_jpeg_qtbl() 196 void exynos3250_jpeg_htbl_ac(void __iomem *regs, unsigned int t) exynos3250_jpeg_htbl_ac() argument 200 reg = readl(regs + EXYNOS3250_QHTBL); exynos3250_jpeg_htbl_ac() 205 writel(reg, regs + EXYNOS3250_QHTBL); exynos3250_jpeg_htbl_ac() 208 void exynos3250_jpeg_htbl_dc(void __iomem *regs, unsigned int t) exynos3250_jpeg_htbl_dc() argument 212 reg = readl(regs + EXYNOS3250_QHTBL); exynos3250_jpeg_htbl_dc() 217 writel(reg, regs + EXYNOS3250_QHTBL); exynos3250_jpeg_htbl_dc() 220 void exynos3250_jpeg_set_y(void __iomem *regs, unsigned int y) exynos3250_jpeg_set_y() argument 225 writel(reg, regs + EXYNOS3250_JPGY); exynos3250_jpeg_set_y() 228 void exynos3250_jpeg_set_x(void __iomem *regs, unsigned int x) exynos3250_jpeg_set_x() argument 233 writel(reg, regs + EXYNOS3250_JPGX); exynos3250_jpeg_set_x() 237 unsigned int exynos3250_jpeg_get_y(void __iomem *regs) 239 return readl(regs + EXYNOS3250_JPGY); 242 unsigned int exynos3250_jpeg_get_x(void __iomem *regs) 244 return readl(regs + EXYNOS3250_JPGX); 248 void exynos3250_jpeg_interrupts_enable(void __iomem *regs) exynos3250_jpeg_interrupts_enable() argument 252 reg = readl(regs + EXYNOS3250_JPGINTSE); exynos3250_jpeg_interrupts_enable() 260 writel(reg, regs + EXYNOS3250_JPGINTSE); exynos3250_jpeg_interrupts_enable() 263 void exynos3250_jpeg_enc_stream_bound(void __iomem *regs, unsigned int size) exynos3250_jpeg_enc_stream_bound() argument 268 writel(reg, regs + EXYNOS3250_ENC_STREAM_BOUND); exynos3250_jpeg_enc_stream_bound() 271 void exynos3250_jpeg_output_raw_fmt(void __iomem *regs, unsigned int fmt) exynos3250_jpeg_output_raw_fmt() argument 316 writel(reg, regs + EXYNOS3250_OUTFORM); exynos3250_jpeg_output_raw_fmt() 319 void exynos3250_jpeg_jpgadr(void __iomem *regs, unsigned int addr) exynos3250_jpeg_jpgadr() argument 321 writel(addr, regs + EXYNOS3250_JPG_JPGADR); exynos3250_jpeg_jpgadr() 324 void exynos3250_jpeg_imgadr(void __iomem *regs, struct s5p_jpeg_addr *img_addr) exynos3250_jpeg_imgadr() argument 326 writel(img_addr->y, regs + EXYNOS3250_LUMA_BASE); exynos3250_jpeg_imgadr() 327 writel(img_addr->cb, regs + EXYNOS3250_CHROMA_BASE); exynos3250_jpeg_imgadr() 328 writel(img_addr->cr, regs + EXYNOS3250_CHROMA_CR_BASE); exynos3250_jpeg_imgadr() 331 void exynos3250_jpeg_stride(void __iomem *regs, unsigned int img_fmt, exynos3250_jpeg_stride() argument 361 writel(reg_luma, regs + EXYNOS3250_LUMA_STRIDE); exynos3250_jpeg_stride() 362 writel(reg_cb, regs + EXYNOS3250_CHROMA_STRIDE); exynos3250_jpeg_stride() 363 writel(reg_cr, regs + EXYNOS3250_CHROMA_CR_STRIDE); exynos3250_jpeg_stride() 366 void exynos3250_jpeg_offset(void __iomem *regs, unsigned int x_offset, exynos3250_jpeg_offset() argument 376 writel(reg, regs + EXYNOS3250_LUMA_XY_OFFSET); exynos3250_jpeg_offset() 383 writel(reg, regs + EXYNOS3250_CHROMA_XY_OFFSET); exynos3250_jpeg_offset() 390 writel(reg, regs + EXYNOS3250_CHROMA_CR_XY_OFFSET); exynos3250_jpeg_offset() 412 void exynos3250_jpeg_start(void __iomem *regs) exynos3250_jpeg_start() argument 414 writel(1, regs + EXYNOS3250_JSTART); exynos3250_jpeg_start() 417 void exynos3250_jpeg_rstart(void __iomem *regs) exynos3250_jpeg_rstart() argument 419 writel(1, regs + EXYNOS3250_JRSTART); exynos3250_jpeg_rstart() 422 unsigned int exynos3250_jpeg_get_int_status(void __iomem *regs) exynos3250_jpeg_get_int_status() argument 424 return readl(regs + EXYNOS3250_JPGINTST); exynos3250_jpeg_get_int_status() 427 void exynos3250_jpeg_clear_int_status(void __iomem *regs, exynos3250_jpeg_clear_int_status() argument 430 return writel(value, regs + EXYNOS3250_JPGINTST); exynos3250_jpeg_clear_int_status() 433 unsigned int exynos3250_jpeg_operating(void __iomem *regs) exynos3250_jpeg_operating() argument 435 return readl(regs + S5P_JPGOPR) & EXYNOS3250_JPGOPR_MASK; exynos3250_jpeg_operating() 438 unsigned int exynos3250_jpeg_compressed_size(void __iomem *regs) exynos3250_jpeg_compressed_size() argument 440 return readl(regs + EXYNOS3250_JPGCNT) & EXYNOS3250_JPGCNT_MASK; exynos3250_jpeg_compressed_size() 443 void exynos3250_jpeg_dec_stream_size(void __iomem *regs, exynos3250_jpeg_dec_stream_size() argument 447 regs + EXYNOS3250_DEC_STREAM_SIZE); exynos3250_jpeg_dec_stream_size() 450 void exynos3250_jpeg_dec_scaling_ratio(void __iomem *regs, exynos3250_jpeg_dec_scaling_ratio() argument 470 regs + EXYNOS3250_DEC_SCALING_RATIO); exynos3250_jpeg_dec_scaling_ratio() 473 void exynos3250_jpeg_set_timer(void __iomem *regs, unsigned int time_value) exynos3250_jpeg_set_timer() argument 478 regs + EXYNOS3250_TIMER_SE); exynos3250_jpeg_set_timer() 481 unsigned int exynos3250_jpeg_get_timer_status(void __iomem *regs) exynos3250_jpeg_get_timer_status() argument 483 return readl(regs + EXYNOS3250_TIMER_ST); exynos3250_jpeg_get_timer_status() 486 void exynos3250_jpeg_clear_timer_status(void __iomem *regs) exynos3250_jpeg_clear_timer_status() argument 488 writel(EXYNOS3250_TIMER_INT_STAT, regs + EXYNOS3250_TIMER_ST); exynos3250_jpeg_clear_timer_status()
|
/linux-4.1.27/arch/unicore32/kernel/ |
H A D | signal.c | 55 static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) restore_sigframe() argument 64 err |= __get_user(regs->UCreg_00, &sf->uc.uc_mcontext.regs.UCreg_00); restore_sigframe() 65 err |= __get_user(regs->UCreg_01, &sf->uc.uc_mcontext.regs.UCreg_01); restore_sigframe() 66 err |= __get_user(regs->UCreg_02, &sf->uc.uc_mcontext.regs.UCreg_02); restore_sigframe() 67 err |= __get_user(regs->UCreg_03, &sf->uc.uc_mcontext.regs.UCreg_03); restore_sigframe() 68 err |= __get_user(regs->UCreg_04, &sf->uc.uc_mcontext.regs.UCreg_04); restore_sigframe() 69 err |= __get_user(regs->UCreg_05, &sf->uc.uc_mcontext.regs.UCreg_05); restore_sigframe() 70 err |= __get_user(regs->UCreg_06, &sf->uc.uc_mcontext.regs.UCreg_06); restore_sigframe() 71 err |= __get_user(regs->UCreg_07, &sf->uc.uc_mcontext.regs.UCreg_07); restore_sigframe() 72 err |= __get_user(regs->UCreg_08, &sf->uc.uc_mcontext.regs.UCreg_08); restore_sigframe() 73 err |= __get_user(regs->UCreg_09, &sf->uc.uc_mcontext.regs.UCreg_09); restore_sigframe() 74 err |= __get_user(regs->UCreg_10, &sf->uc.uc_mcontext.regs.UCreg_10); restore_sigframe() 75 err |= __get_user(regs->UCreg_11, &sf->uc.uc_mcontext.regs.UCreg_11); restore_sigframe() 76 err |= __get_user(regs->UCreg_12, &sf->uc.uc_mcontext.regs.UCreg_12); restore_sigframe() 77 err |= __get_user(regs->UCreg_13, &sf->uc.uc_mcontext.regs.UCreg_13); restore_sigframe() 78 err |= __get_user(regs->UCreg_14, &sf->uc.uc_mcontext.regs.UCreg_14); restore_sigframe() 79 err |= __get_user(regs->UCreg_15, &sf->uc.uc_mcontext.regs.UCreg_15); restore_sigframe() 80 err |= __get_user(regs->UCreg_16, &sf->uc.uc_mcontext.regs.UCreg_16); restore_sigframe() 81 err |= __get_user(regs->UCreg_17, &sf->uc.uc_mcontext.regs.UCreg_17); restore_sigframe() 82 err |= __get_user(regs->UCreg_18, &sf->uc.uc_mcontext.regs.UCreg_18); restore_sigframe() 83 err |= __get_user(regs->UCreg_19, &sf->uc.uc_mcontext.regs.UCreg_19); restore_sigframe() 84 err |= __get_user(regs->UCreg_20, &sf->uc.uc_mcontext.regs.UCreg_20); restore_sigframe() 85 err |= __get_user(regs->UCreg_21, &sf->uc.uc_mcontext.regs.UCreg_21); restore_sigframe() 86 err |= __get_user(regs->UCreg_22, &sf->uc.uc_mcontext.regs.UCreg_22); restore_sigframe() 87 err |= __get_user(regs->UCreg_23, &sf->uc.uc_mcontext.regs.UCreg_23); restore_sigframe() 88 err |= __get_user(regs->UCreg_24, &sf->uc.uc_mcontext.regs.UCreg_24); restore_sigframe() 89 err |= __get_user(regs->UCreg_25, &sf->uc.uc_mcontext.regs.UCreg_25); restore_sigframe() 90 err |= __get_user(regs->UCreg_26, &sf->uc.uc_mcontext.regs.UCreg_26); restore_sigframe() 91 err |= __get_user(regs->UCreg_fp, &sf->uc.uc_mcontext.regs.UCreg_fp); restore_sigframe() 92 err |= __get_user(regs->UCreg_ip, &sf->uc.uc_mcontext.regs.UCreg_ip); restore_sigframe() 93 err |= __get_user(regs->UCreg_sp, &sf->uc.uc_mcontext.regs.UCreg_sp); restore_sigframe() 94 err |= __get_user(regs->UCreg_lr, &sf->uc.uc_mcontext.regs.UCreg_lr); restore_sigframe() 95 err |= __get_user(regs->UCreg_pc, &sf->uc.uc_mcontext.regs.UCreg_pc); restore_sigframe() 96 err |= __get_user(regs->UCreg_asr, &sf->uc.uc_mcontext.regs.UCreg_asr); restore_sigframe() 98 err |= !valid_user_regs(regs); restore_sigframe() 103 asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs) __sys_rt_sigreturn() argument 115 if (regs->UCreg_sp & 7) __sys_rt_sigreturn() 118 frame = (struct rt_sigframe __user *)regs->UCreg_sp; __sys_rt_sigreturn() 123 if (restore_sigframe(regs, &frame->sig)) __sys_rt_sigreturn() 129 return regs->UCreg_00; __sys_rt_sigreturn() 136 static int setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, setup_sigframe() argument 141 err |= __put_user(regs->UCreg_00, &sf->uc.uc_mcontext.regs.UCreg_00); setup_sigframe() 142 err |= __put_user(regs->UCreg_01, &sf->uc.uc_mcontext.regs.UCreg_01); setup_sigframe() 143 err |= __put_user(regs->UCreg_02, &sf->uc.uc_mcontext.regs.UCreg_02); setup_sigframe() 144 err |= __put_user(regs->UCreg_03, &sf->uc.uc_mcontext.regs.UCreg_03); setup_sigframe() 145 err |= __put_user(regs->UCreg_04, &sf->uc.uc_mcontext.regs.UCreg_04); setup_sigframe() 146 err |= __put_user(regs->UCreg_05, &sf->uc.uc_mcontext.regs.UCreg_05); setup_sigframe() 147 err |= __put_user(regs->UCreg_06, &sf->uc.uc_mcontext.regs.UCreg_06); setup_sigframe() 148 err |= __put_user(regs->UCreg_07, &sf->uc.uc_mcontext.regs.UCreg_07); setup_sigframe() 149 err |= __put_user(regs->UCreg_08, &sf->uc.uc_mcontext.regs.UCreg_08); setup_sigframe() 150 err |= __put_user(regs->UCreg_09, &sf->uc.uc_mcontext.regs.UCreg_09); setup_sigframe() 151 err |= __put_user(regs->UCreg_10, &sf->uc.uc_mcontext.regs.UCreg_10); setup_sigframe() 152 err |= __put_user(regs->UCreg_11, &sf->uc.uc_mcontext.regs.UCreg_11); setup_sigframe() 153 err |= __put_user(regs->UCreg_12, &sf->uc.uc_mcontext.regs.UCreg_12); setup_sigframe() 154 err |= __put_user(regs->UCreg_13, &sf->uc.uc_mcontext.regs.UCreg_13); setup_sigframe() 155 err |= __put_user(regs->UCreg_14, &sf->uc.uc_mcontext.regs.UCreg_14); setup_sigframe() 156 err |= __put_user(regs->UCreg_15, &sf->uc.uc_mcontext.regs.UCreg_15); setup_sigframe() 157 err |= __put_user(regs->UCreg_16, &sf->uc.uc_mcontext.regs.UCreg_16); setup_sigframe() 158 err |= __put_user(regs->UCreg_17, &sf->uc.uc_mcontext.regs.UCreg_17); setup_sigframe() 159 err |= __put_user(regs->UCreg_18, &sf->uc.uc_mcontext.regs.UCreg_18); setup_sigframe() 160 err |= __put_user(regs->UCreg_19, &sf->uc.uc_mcontext.regs.UCreg_19); setup_sigframe() 161 err |= __put_user(regs->UCreg_20, &sf->uc.uc_mcontext.regs.UCreg_20); setup_sigframe() 162 err |= __put_user(regs->UCreg_21, &sf->uc.uc_mcontext.regs.UCreg_21); setup_sigframe() 163 err |= __put_user(regs->UCreg_22, &sf->uc.uc_mcontext.regs.UCreg_22); setup_sigframe() 164 err |= __put_user(regs->UCreg_23, &sf->uc.uc_mcontext.regs.UCreg_23); setup_sigframe() 165 err |= __put_user(regs->UCreg_24, &sf->uc.uc_mcontext.regs.UCreg_24); setup_sigframe() 166 err |= __put_user(regs->UCreg_25, &sf->uc.uc_mcontext.regs.UCreg_25); setup_sigframe() 167 err |= __put_user(regs->UCreg_26, &sf->uc.uc_mcontext.regs.UCreg_26); setup_sigframe() 168 err |= __put_user(regs->UCreg_fp, &sf->uc.uc_mcontext.regs.UCreg_fp); setup_sigframe() 169 err |= __put_user(regs->UCreg_ip, &sf->uc.uc_mcontext.regs.UCreg_ip); setup_sigframe() 170 err |= __put_user(regs->UCreg_sp, &sf->uc.uc_mcontext.regs.UCreg_sp); setup_sigframe() 171 err |= __put_user(regs->UCreg_lr, &sf->uc.uc_mcontext.regs.UCreg_lr); setup_sigframe() 172 err |= __put_user(regs->UCreg_pc, &sf->uc.uc_mcontext.regs.UCreg_pc); setup_sigframe() 173 err |= __put_user(regs->UCreg_asr, &sf->uc.uc_mcontext.regs.UCreg_asr); setup_sigframe() 189 struct pt_regs *regs, int framesize) get_sigframe() 191 unsigned long sp = regs->UCreg_sp; get_sigframe() 214 static int setup_return(struct pt_regs *regs, struct k_sigaction *ka, setup_return() argument 219 unsigned long asr = regs->UCreg_asr & ~PSR_f; setup_return() 232 regs->UCreg_00 = usig; setup_return() 233 regs->UCreg_sp = (unsigned long)frame; setup_return() 234 regs->UCreg_lr = retcode; setup_return() 235 regs->UCreg_pc = handler; setup_return() 236 regs->UCreg_asr = asr; setup_return() 242 struct pt_regs *regs) setup_frame() 244 struct sigframe __user *frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); setup_frame() 255 err |= setup_sigframe(frame, regs, set); setup_frame() 257 err |= setup_return(regs, &ksig->ka, frame->retcode, frame, setup_frame() 264 struct pt_regs *regs) setup_rt_frame() 267 get_sigframe(&ksig->ka, regs, sizeof(*frame)); setup_rt_frame() 277 err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp); setup_rt_frame() 278 err |= setup_sigframe(&frame->sig, regs, set); setup_rt_frame() 280 err |= setup_return(regs, &ksig->ka, frame->sig.retcode, frame, setup_rt_frame() 288 regs->UCreg_01 = (unsigned long)&frame->info; setup_rt_frame() 289 regs->UCreg_02 = (unsigned long)&frame->sig.uc; setup_rt_frame() 295 static inline void setup_syscall_restart(struct pt_regs *regs) setup_syscall_restart() argument 297 regs->UCreg_00 = regs->UCreg_ORIG_00; setup_syscall_restart() 298 regs->UCreg_pc -= 4; setup_syscall_restart() 304 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs, handle_signal() argument 316 switch (regs->UCreg_00) { handle_signal() 319 regs->UCreg_00 = -EINTR; handle_signal() 323 regs->UCreg_00 = -EINTR; handle_signal() 328 setup_syscall_restart(regs); handle_signal() 336 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 338 ret = setup_frame(ksig, oldset, regs); handle_signal() 343 ret |= !valid_user_regs(regs); handle_signal() 357 static void do_signal(struct pt_regs *regs, int syscall) do_signal() argument 367 if (!user_mode(regs)) do_signal() 371 handle_signal(&ksig, regs, syscall); do_signal() 379 if (regs->UCreg_00 == -ERESTART_RESTARTBLOCK) { do_signal() 382 regs->UCreg_sp -= 4; do_signal() 383 usp = (u32 __user *)regs->UCreg_sp; do_signal() 385 if (put_user(regs->UCreg_pc, usp) == 0) { do_signal() 386 regs->UCreg_pc = KERN_RESTART_CODE; do_signal() 388 regs->UCreg_sp += 4; do_signal() 392 if (regs->UCreg_00 == -ERESTARTNOHAND || do_signal() 393 regs->UCreg_00 == -ERESTARTSYS || do_signal() 394 regs->UCreg_00 == -ERESTARTNOINTR) { do_signal() 395 setup_syscall_restart(regs); do_signal() 404 asmlinkage void do_notify_resume(struct pt_regs *regs, do_notify_resume() argument 408 do_signal(regs, syscall); do_notify_resume() 412 tracehook_notify_resume(regs); do_notify_resume() 188 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize) get_sigframe() argument 241 setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_frame() argument 263 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | process.c | 133 void __show_regs(struct pt_regs *regs) __show_regs() argument 139 print_symbol("PC is at %s\n", instruction_pointer(regs)); __show_regs() 140 print_symbol("LR is at %s\n", regs->UCreg_lr); __show_regs() 143 regs->UCreg_pc, regs->UCreg_lr, regs->UCreg_asr, __show_regs() 144 regs->UCreg_sp, regs->UCreg_ip, regs->UCreg_fp); __show_regs() 146 regs->UCreg_26, regs->UCreg_25, __show_regs() 147 regs->UCreg_24); __show_regs() 149 regs->UCreg_23, regs->UCreg_22, __show_regs() 150 regs->UCreg_21, regs->UCreg_20); __show_regs() 152 regs->UCreg_19, regs->UCreg_18, __show_regs() 153 regs->UCreg_17, regs->UCreg_16); __show_regs() 155 regs->UCreg_15, regs->UCreg_14, __show_regs() 156 regs->UCreg_13, regs->UCreg_12); __show_regs() 158 regs->UCreg_11, regs->UCreg_10, __show_regs() 159 regs->UCreg_09, regs->UCreg_08); __show_regs() 161 regs->UCreg_07, regs->UCreg_06, __show_regs() 162 regs->UCreg_05, regs->UCreg_04); __show_regs() 164 regs->UCreg_03, regs->UCreg_02, __show_regs() 165 regs->UCreg_01, regs->UCreg_00); __show_regs() 167 flags = regs->UCreg_asr; __show_regs() 175 buf, interrupts_enabled(regs) ? "n" : "ff", __show_regs() 176 fast_interrupts_enabled(regs) ? "n" : "ff", __show_regs() 177 processor_modes[processor_mode(regs)], __show_regs() 195 void show_regs(struct pt_regs *regs) show_regs() argument 200 __show_regs(regs); show_regs() 269 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fp) dump_fpu() argument
|
/linux-4.1.27/include/asm-generic/ |
H A D | ptrace.h | 16 #define GET_IP(regs) ((regs)->pc) 19 #define SET_IP(regs, val) (GET_IP(regs) = (val)) 22 static inline unsigned long instruction_pointer(struct pt_regs *regs) instruction_pointer() argument 24 return GET_IP(regs); instruction_pointer() 26 static inline void instruction_pointer_set(struct pt_regs *regs, instruction_pointer_set() argument 29 SET_IP(regs, val); instruction_pointer_set() 33 #define profile_pc(regs) instruction_pointer(regs) 38 #define GET_USP(regs) ((regs)->usp) 41 #define SET_USP(regs, val) (GET_USP(regs) = (val)) 44 static inline unsigned long user_stack_pointer(struct pt_regs *regs) user_stack_pointer() argument 46 return GET_USP(regs); user_stack_pointer() 48 static inline void user_stack_pointer_set(struct pt_regs *regs, user_stack_pointer_set() argument 51 SET_USP(regs, val); user_stack_pointer_set() 56 #define GET_FP(regs) ((regs)->fp) 59 #define SET_FP(regs, val) (GET_FP(regs) = (val)) 62 static inline unsigned long frame_pointer(struct pt_regs *regs) frame_pointer() argument 64 return GET_FP(regs); frame_pointer() 66 static inline void frame_pointer_set(struct pt_regs *regs, frame_pointer_set() argument 69 SET_FP(regs, val); frame_pointer_set()
|
/linux-4.1.27/arch/s390/kernel/ |
H A D | entry.h | 21 asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); 22 asmlinkage void do_syscall_trace_exit(struct pt_regs *regs); 26 void do_protection_exception(struct pt_regs *regs); 27 void do_dat_exception(struct pt_regs *regs); 29 void addressing_exception(struct pt_regs *regs); 30 void data_exception(struct pt_regs *regs); 31 void default_trap_handler(struct pt_regs *regs); 32 void divide_exception(struct pt_regs *regs); 33 void execute_exception(struct pt_regs *regs); 34 void hfp_divide_exception(struct pt_regs *regs); 35 void hfp_overflow_exception(struct pt_regs *regs); 36 void hfp_significance_exception(struct pt_regs *regs); 37 void hfp_sqrt_exception(struct pt_regs *regs); 38 void hfp_underflow_exception(struct pt_regs *regs); 39 void illegal_op(struct pt_regs *regs); 40 void operand_exception(struct pt_regs *regs); 41 void overflow_exception(struct pt_regs *regs); 42 void privileged_op(struct pt_regs *regs); 43 void space_switch_exception(struct pt_regs *regs); 44 void special_op_exception(struct pt_regs *regs); 45 void specification_exception(struct pt_regs *regs); 46 void transaction_exception(struct pt_regs *regs); 47 void translation_exception(struct pt_regs *regs); 48 void vector_exception(struct pt_regs *regs); 50 void do_per_trap(struct pt_regs *regs); 51 void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str); 52 void syscall_trace(struct pt_regs *regs, int entryexit); 53 void kernel_stack_overflow(struct pt_regs * regs); 54 void do_signal(struct pt_regs *regs); 56 struct pt_regs *regs); 57 void do_notify_resume(struct pt_regs *regs); 60 void do_IRQ(struct pt_regs *regs, int irq); 63 void die(struct pt_regs *regs, const char *str);
|
H A D | dumpstack.c | 33 struct pt_regs *regs; __show_trace() local 57 if (sp <= low || sp > high - sizeof(*regs)) __show_trace() 59 regs = (struct pt_regs *) sp; __show_trace() 60 addr = regs->psw.addr & PSW_ADDR_INSN; __show_trace() 63 sp = regs->gprs[15]; __show_trace() 119 static void show_last_breaking_event(struct pt_regs *regs) show_last_breaking_event() argument 122 printk(" [<%016lx>] %pSR\n", regs->args[0], (void *)regs->args[0]); show_last_breaking_event() 125 static inline int mask_bits(struct pt_regs *regs, unsigned long bits) mask_bits() argument 127 return (regs->psw.mask & bits) / ((~bits + 1) & bits); mask_bits() 130 void show_registers(struct pt_regs *regs) show_registers() argument 134 mode = user_mode(regs) ? "User" : "Krnl"; show_registers() 135 printk("%s PSW : %p %p", mode, (void *)regs->psw.mask, (void *)regs->psw.addr); show_registers() 136 if (!user_mode(regs)) show_registers() 137 printk(" (%pSR)", (void *)regs->psw.addr); show_registers() 140 "P:%x AS:%x CC:%x PM:%x", mask_bits(regs, PSW_MASK_PER), show_registers() 141 mask_bits(regs, PSW_MASK_DAT), mask_bits(regs, PSW_MASK_IO), show_registers() 142 mask_bits(regs, PSW_MASK_EXT), mask_bits(regs, PSW_MASK_KEY), show_registers() 143 mask_bits(regs, PSW_MASK_MCHECK), mask_bits(regs, PSW_MASK_WAIT), show_registers() 144 mask_bits(regs, PSW_MASK_PSTATE), mask_bits(regs, PSW_MASK_ASC), show_registers() 145 mask_bits(regs, PSW_MASK_CC), mask_bits(regs, PSW_MASK_PM)); show_registers() 146 printk(" EA:%x", mask_bits(regs, PSW_MASK_EA | PSW_MASK_BA)); show_registers() 148 regs->gprs[0], regs->gprs[1], regs->gprs[2], regs->gprs[3]); show_registers() 150 regs->gprs[4], regs->gprs[5], regs->gprs[6], regs->gprs[7]); show_registers() 152 regs->gprs[8], regs->gprs[9], regs->gprs[10], regs->gprs[11]); show_registers() 154 regs->gprs[12], regs->gprs[13], regs->gprs[14], regs->gprs[15]); show_registers() 155 show_code(regs); show_registers() 158 void show_regs(struct pt_regs *regs) show_regs() argument 161 show_registers(regs); show_regs() 163 if (!user_mode(regs)) show_regs() 164 show_trace(NULL, (unsigned long *) regs->gprs[15]); show_regs() 165 show_last_breaking_event(regs); show_regs() 170 void die(struct pt_regs *regs, const char *str) die() argument 180 printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff, die() 181 regs->int_code >> 17, ++die_counter); die() 192 notify_die(DIE_OOPS, str, regs, 0, regs->int_code & 0xffff, SIGSEGV); die() 194 show_regs(regs); die()
|
H A D | signal.c | 137 static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) save_sigregs() argument 143 user_sregs.regs.psw.mask = PSW_USER_BITS | save_sigregs() 144 (regs->psw.mask & (PSW_MASK_USER | PSW_MASK_RI)); save_sigregs() 145 user_sregs.regs.psw.addr = regs->psw.addr; save_sigregs() 146 memcpy(&user_sregs.regs.gprs, ®s->gprs, sizeof(sregs->regs.gprs)); save_sigregs() 147 memcpy(&user_sregs.regs.acrs, current->thread.acrs, save_sigregs() 148 sizeof(user_sregs.regs.acrs)); save_sigregs() 156 static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) restore_sigregs() argument 166 if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW_MASK_RI)) restore_sigregs() 173 /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ restore_sigregs() 174 regs->psw.mask = (regs->psw.mask & ~(PSW_MASK_USER | PSW_MASK_RI)) | restore_sigregs() 175 (user_sregs.regs.psw.mask & (PSW_MASK_USER | PSW_MASK_RI)); restore_sigregs() 177 if ((regs->psw.mask & PSW_MASK_ASC) == PSW_ASC_HOME) restore_sigregs() 178 regs->psw.mask = PSW_ASC_PRIMARY | restore_sigregs() 179 (regs->psw.mask & ~PSW_MASK_ASC); restore_sigregs() 181 if (regs->psw.mask & PSW_MASK_EA) restore_sigregs() 182 regs->psw.mask |= PSW_MASK_BA; restore_sigregs() 183 regs->psw.addr = user_sregs.regs.psw.addr; restore_sigregs() 184 memcpy(®s->gprs, &user_sregs.regs.gprs, sizeof(sregs->regs.gprs)); restore_sigregs() 185 memcpy(¤t->thread.acrs, &user_sregs.regs.acrs, restore_sigregs() 191 clear_pt_regs_flag(regs, PIF_SYSCALL); /* No longer in a system call */ restore_sigregs() 196 static int save_sigregs_ext(struct pt_regs *regs, save_sigregs_ext() argument 216 static int restore_sigregs_ext(struct pt_regs *regs, restore_sigregs_ext() argument 238 struct pt_regs *regs = task_pt_regs(current); SYSCALL_DEFINE0() local 240 (struct sigframe __user *) regs->gprs[15]; SYSCALL_DEFINE0() 246 if (restore_sigregs(regs, &frame->sregs)) SYSCALL_DEFINE0() 248 if (restore_sigregs_ext(regs, &frame->sregs_ext)) SYSCALL_DEFINE0() 251 return regs->gprs[2]; SYSCALL_DEFINE0() 259 struct pt_regs *regs = task_pt_regs(current); SYSCALL_DEFINE0() local 261 (struct rt_sigframe __user *)regs->gprs[15]; SYSCALL_DEFINE0() 269 if (restore_sigregs(regs, &frame->uc.uc_mcontext)) SYSCALL_DEFINE0() 271 if (restore_sigregs_ext(regs, &frame->uc.uc_mcontext_ext)) SYSCALL_DEFINE0() 274 return regs->gprs[2]; SYSCALL_DEFINE0() 284 get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) get_sigframe() argument 289 sp = regs->gprs[15]; get_sigframe() 305 sigset_t *set, struct pt_regs * regs) setup_frame() 321 frame = get_sigframe(ka, regs, frame_size); setup_frame() 326 if (__put_user(regs->gprs[15], (addr_t __user *) frame)) setup_frame() 339 if (save_sigregs(regs, &frame->sregs)) setup_frame() 343 if (__put_user(regs->gprs[2], (int __user *) &frame->signo)) setup_frame() 347 if (save_sigregs_ext(regs, &frame->sregs_ext)) setup_frame() 363 regs->gprs[14] = restorer; setup_frame() 364 regs->gprs[15] = (unsigned long) frame; setup_frame() 366 regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | setup_frame() 368 (regs->psw.mask & ~PSW_MASK_ASC); setup_frame() 369 regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; setup_frame() 371 regs->gprs[2] = sig; setup_frame() 372 regs->gprs[3] = (unsigned long) &frame->sc; setup_frame() 379 regs->gprs[4] = regs->int_code & 127; setup_frame() 380 regs->gprs[5] = regs->int_parm_long; setup_frame() 381 regs->gprs[6] = task_thread_info(current)->last_break; setup_frame() 387 struct pt_regs *regs) setup_rt_frame() 406 frame = get_sigframe(&ksig->ka, regs, frame_size); setup_rt_frame() 411 if (__put_user(regs->gprs[15], (addr_t __user *) frame)) setup_rt_frame() 436 __save_altstack(&frame->uc.uc_stack, regs->gprs[15]) || setup_rt_frame() 437 save_sigregs(regs, &frame->uc.uc_mcontext) || setup_rt_frame() 439 save_sigregs_ext(regs, &frame->uc.uc_mcontext_ext)) setup_rt_frame() 443 regs->gprs[14] = restorer; setup_rt_frame() 444 regs->gprs[15] = (unsigned long) frame; setup_rt_frame() 446 regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | setup_rt_frame() 448 (regs->psw.mask & ~PSW_MASK_ASC); setup_rt_frame() 449 regs->psw.addr = (unsigned long) ksig->ka.sa.sa_handler | PSW_ADDR_AMODE; setup_rt_frame() 451 regs->gprs[2] = ksig->sig; setup_rt_frame() 452 regs->gprs[3] = (unsigned long) &frame->info; setup_rt_frame() 453 regs->gprs[4] = (unsigned long) &frame->uc; setup_rt_frame() 454 regs->gprs[5] = task_thread_info(current)->last_break; setup_rt_frame() 459 struct pt_regs *regs) handle_signal() 465 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 467 ret = setup_frame(ksig->sig, &ksig->ka, oldset, regs); handle_signal() 481 void do_signal(struct pt_regs *regs) do_signal() argument 492 test_pt_regs_flag(regs, PIF_SYSCALL) ? regs->int_code : 0; do_signal() 497 regs->int_code = current_thread_info()->system_call; do_signal() 499 switch (regs->gprs[2]) { do_signal() 502 regs->gprs[2] = -EINTR; do_signal() 506 regs->gprs[2] = -EINTR; do_signal() 511 regs->gprs[2] = regs->orig_gpr2; do_signal() 512 regs->psw.addr = do_signal() 513 __rewind_psw(regs->psw, do_signal() 514 regs->int_code >> 16); do_signal() 519 clear_pt_regs_flag(regs, PIF_SYSCALL); do_signal() 522 handle_signal32(&ksig, oldset, regs); do_signal() 524 handle_signal(&ksig, oldset, regs); do_signal() 529 clear_pt_regs_flag(regs, PIF_SYSCALL); do_signal() 531 regs->int_code = current_thread_info()->system_call; do_signal() 532 switch (regs->gprs[2]) { do_signal() 535 regs->int_code = __NR_restart_syscall; do_signal() 541 regs->gprs[2] = regs->orig_gpr2; do_signal() 542 set_pt_regs_flag(regs, PIF_SYSCALL); do_signal() 544 clear_pt_regs_flag(regs, PIF_PER_TRAP); do_signal() 555 void do_notify_resume(struct pt_regs *regs) do_notify_resume() argument 558 tracehook_notify_resume(regs); do_notify_resume() 304 setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs * regs) setup_frame() argument 386 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument 458 handle_signal(struct ksignal *ksig, sigset_t *oldset, struct pt_regs *regs) handle_signal() argument
|
H A D | uprobes.c | 26 int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) arch_uprobe_pre_xol() argument 28 if (psw_bits(regs->psw).eaba == PSW_AMODE_24BIT) arch_uprobe_pre_xol() 30 if (!is_compat_task() && psw_bits(regs->psw).eaba == PSW_AMODE_31BIT) arch_uprobe_pre_xol() 32 clear_pt_regs_flag(regs, PIF_PER_TRAP); arch_uprobe_pre_xol() 33 auprobe->saved_per = psw_bits(regs->psw).r; arch_uprobe_pre_xol() 34 auprobe->saved_int_code = regs->int_code; arch_uprobe_pre_xol() 35 regs->int_code = UPROBE_TRAP_NR; arch_uprobe_pre_xol() 36 regs->psw.addr = current->utask->xol_vaddr; arch_uprobe_pre_xol() 44 struct pt_regs *regs = task_pt_regs(tsk); arch_uprobe_xol_was_trapped() local 46 if (regs->int_code != UPROBE_TRAP_NR) arch_uprobe_xol_was_trapped() 52 struct pt_regs *regs) check_per_event() 54 if (!(regs->psw.mask & PSW_MASK_PER)) check_per_event() 68 regs->psw.addr >= current->thread.per_user.start && check_per_event() 69 regs->psw.addr <= current->thread.per_user.end) check_per_event() 75 int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) arch_uprobe_post_xol() argument 82 psw_bits(regs->psw).r = auprobe->saved_per; arch_uprobe_post_xol() 83 regs->int_code = auprobe->saved_int_code; arch_uprobe_post_xol() 86 regs->psw.addr += utask->vaddr - utask->xol_vaddr; arch_uprobe_post_xol() 90 regs->gprs[reg] += utask->vaddr - utask->xol_vaddr; arch_uprobe_post_xol() 95 if (regs->psw.addr - utask->xol_vaddr == ilen) arch_uprobe_post_xol() 96 regs->psw.addr = utask->vaddr + ilen; arch_uprobe_post_xol() 99 current->thread.per_user.control, regs)) { arch_uprobe_post_xol() 103 set_pt_regs_flag(regs, PIF_PER_TRAP); arch_uprobe_post_xol() 112 struct pt_regs *regs = args->regs; arch_uprobe_exception_notify() local 114 if (!user_mode(regs)) arch_uprobe_exception_notify() 116 if (regs->int_code & 0x200) /* Trap during transaction */ arch_uprobe_exception_notify() 120 if (uprobe_pre_sstep_notifier(regs)) arch_uprobe_exception_notify() 124 if (uprobe_post_sstep_notifier(regs)) arch_uprobe_exception_notify() 132 void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) arch_uprobe_abort_xol() argument 135 regs->int_code = auprobe->saved_int_code; arch_uprobe_abort_xol() 136 regs->psw.addr = current->utask->vaddr; arch_uprobe_abort_xol() 141 struct pt_regs *regs) arch_uretprobe_hijack_return_addr() 145 orig = regs->gprs[14]; arch_uretprobe_hijack_return_addr() 146 regs->gprs[14] = trampoline; arch_uretprobe_hijack_return_addr() 178 #define emu_store_ril(regs, ptr, input) \ 191 sim_stor_event(regs, \ 197 #define emu_cmp_ril(regs, ptr, cmp) \ 210 psw_bits((regs)->psw).cc = 1; \ 212 psw_bits((regs)->psw).cc = 2; \ 214 psw_bits((regs)->psw).cc = 0; \ 238 static void sim_stor_event(struct pt_regs *regs, void *addr, int len) sim_stor_event() argument 240 if (!(regs->psw.mask & PSW_MASK_PER)) sim_stor_event() 248 current->thread.per_event.address = regs->psw.addr; sim_stor_event() 250 set_pt_regs_flag(regs, PIF_PER_TRAP); sim_stor_event() 257 static void handle_insn_ril(struct arch_uprobe *auprobe, struct pt_regs *regs) handle_insn_ril() argument 266 rx = (union split_register *) ®s->gprs[insn->reg]; handle_insn_ril() 267 uptr = (void *)(regs->psw.addr + (insn->disp * 2)); handle_insn_ril() 305 rc = emu_store_ril(regs, (u16 __user *)uptr, &rx->u16[3]); handle_insn_ril() 308 rc = emu_store_ril(regs, (u64 __user *)uptr, &rx->u64); handle_insn_ril() 311 rc = emu_store_ril(regs, (u32 __user *)uptr, &rx->u32[1]); handle_insn_ril() 322 rc = emu_cmp_ril(regs, (s16 __user *)uptr, &rx->s64); handle_insn_ril() 325 rc = emu_cmp_ril(regs, (s16 __user *)uptr, &rx->s32[1]); handle_insn_ril() 328 rc = emu_cmp_ril(regs, (u16 __user *)uptr, &rx->u64); handle_insn_ril() 331 rc = emu_cmp_ril(regs, (u16 __user *)uptr, &rx->u32[1]); handle_insn_ril() 334 rc = emu_cmp_ril(regs, (s64 __user *)uptr, &rx->s64); handle_insn_ril() 337 rc = emu_cmp_ril(regs, (u64 __user *)uptr, &rx->u64); handle_insn_ril() 340 rc = emu_cmp_ril(regs, (s32 __user *)uptr, &rx->s64); handle_insn_ril() 343 rc = emu_cmp_ril(regs, (s32 __user *)uptr, &rx->s32[1]); handle_insn_ril() 346 rc = emu_cmp_ril(regs, (u32 __user *)uptr, &rx->u64); handle_insn_ril() 349 rc = emu_cmp_ril(regs, (u32 __user *)uptr, &rx->u32[1]); handle_insn_ril() 354 adjust_psw_addr(®s->psw, ilen); handle_insn_ril() 357 regs->int_code = ilen << 16 | 0x0001; handle_insn_ril() 358 do_report_trap(regs, SIGILL, ILL_ILLOPC, NULL); handle_insn_ril() 361 regs->int_code = ilen << 16 | 0x0006; handle_insn_ril() 362 do_report_trap(regs, SIGILL, ILL_ILLOPC , NULL); handle_insn_ril() 365 regs->int_code = ilen << 16 | 0x0005; handle_insn_ril() 366 do_report_trap(regs, SIGSEGV, SEGV_MAPERR, NULL); handle_insn_ril() 371 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) arch_uprobe_skip_sstep() argument 373 if ((psw_bits(regs->psw).eaba == PSW_AMODE_24BIT) || arch_uprobe_skip_sstep() 374 ((psw_bits(regs->psw).eaba == PSW_AMODE_31BIT) && arch_uprobe_skip_sstep() 376 regs->psw.addr = __rewind_psw(regs->psw, UPROBE_SWBP_INSN_SIZE); arch_uprobe_skip_sstep() 377 do_report_trap(regs, SIGILL, ILL_ILLADR, NULL); arch_uprobe_skip_sstep() 381 handle_insn_ril(auprobe, regs); arch_uprobe_skip_sstep() 51 check_per_event(unsigned short cause, unsigned long control, struct pt_regs *regs) check_per_event() argument 140 arch_uretprobe_hijack_return_addr(unsigned long trampoline, struct pt_regs *regs) arch_uretprobe_hijack_return_addr() argument
|
H A D | traps.c | 27 static inline void __user *get_trap_ip(struct pt_regs *regs) get_trap_ip() argument 31 if (regs->int_code & 0x200) get_trap_ip() 34 address = regs->psw.addr; get_trap_ip() 36 ((address - (regs->int_code >> 16)) & PSW_ADDR_INSN); get_trap_ip() 39 static inline void report_user_fault(struct pt_regs *regs, int signr) report_user_fault() argument 48 regs->int_code & 0xffff, regs->int_code >> 17); report_user_fault() 49 print_vma_addr("in ", regs->psw.addr & PSW_ADDR_INSN); report_user_fault() 51 show_regs(regs); report_user_fault() 59 void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str) do_report_trap() argument 63 if (user_mode(regs)) { do_report_trap() 67 info.si_addr = get_trap_ip(regs); do_report_trap() 69 report_user_fault(regs, si_signo); do_report_trap() 72 fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN); do_report_trap() 74 regs->psw.addr = extable_fixup(fixup) | PSW_ADDR_AMODE; do_report_trap() 78 btt = report_bug(regs->psw.addr & PSW_ADDR_INSN, regs); do_report_trap() 81 die(regs, str); do_report_trap() 86 static void do_trap(struct pt_regs *regs, int si_signo, int si_code, char *str) do_trap() argument 88 if (notify_die(DIE_TRAP, str, regs, 0, do_trap() 89 regs->int_code, si_signo) == NOTIFY_STOP) do_trap() 91 do_report_trap(regs, si_signo, si_code, str); do_trap() 95 void do_per_trap(struct pt_regs *regs) do_per_trap() argument 99 if (notify_die(DIE_SSTEP, "sstep", regs, 0, 0, SIGTRAP) == NOTIFY_STOP) do_per_trap() 112 void default_trap_handler(struct pt_regs *regs) default_trap_handler() argument 114 if (user_mode(regs)) { default_trap_handler() 115 report_user_fault(regs, SIGSEGV); default_trap_handler() 118 die(regs, "Unknown program exception"); default_trap_handler() 122 void name(struct pt_regs *regs) \ 124 do_trap(regs, signr, sicode, str); \ 154 static inline void do_fp_trap(struct pt_regs *regs, int fpc) do_fp_trap() argument 171 do_trap(regs, SIGFPE, si_code, "floating point exception"); do_fp_trap() 174 void translation_exception(struct pt_regs *regs) translation_exception() argument 180 void illegal_op(struct pt_regs *regs) illegal_op() argument 188 location = get_trap_ip(regs); illegal_op() 190 if (user_mode(regs)) { illegal_op() 214 if (is_uprobe_insn || !user_mode(regs)) { illegal_op() 215 if (notify_die(DIE_BPT, "bpt", regs, 0, illegal_op() 220 do_trap(regs, signal, ILL_ILLOPC, "illegal operation"); illegal_op() 252 void vector_exception(struct pt_regs *regs) vector_exception() argument 257 do_trap(regs, SIGILL, ILL_ILLOPN, "illegal operation"); vector_exception() 283 do_trap(regs, SIGFPE, si_code, "vector exception"); vector_exception() 293 void data_exception(struct pt_regs *regs) data_exception() argument 298 location = get_trap_ip(regs); data_exception() 306 regs->psw.addr = __rewind_psw(regs->psw, regs->int_code >> 16); data_exception() 307 clear_pt_regs_flag(regs, PIF_PER_TRAP); data_exception() 315 do_fp_trap(regs, current->thread.fp_regs.fpc); data_exception() 317 do_trap(regs, signal, ILL_ILLOPN, "data exception"); data_exception() 320 void space_switch_exception(struct pt_regs *regs) space_switch_exception() argument 323 if (user_mode(regs)) space_switch_exception() 324 regs->psw.mask |= PSW_ASC_HOME; space_switch_exception() 326 do_trap(regs, SIGILL, ILL_PRVOPC, "space switch event"); space_switch_exception() 329 void kernel_stack_overflow(struct pt_regs *regs) kernel_stack_overflow() argument 333 show_regs(regs); kernel_stack_overflow()
|
/linux-4.1.27/arch/score/include/asm/ |
H A D | ptrace.h | 12 #define user_mode(regs) ((regs->cp0_psr & 8) == 8) 14 #define instruction_pointer(regs) ((unsigned long)(regs)->cp0_epc) 15 #define profile_pc(regs) instruction_pointer(regs) 16 #define user_stack_pointer(r) ((unsigned long)(r)->regs[0]) 18 extern void do_syscall_trace(struct pt_regs *regs, int entryexit);
|
H A D | elf.h | 38 /* Score does not have fp regs. */ 78 _r->regs[1] = _r->regs[2] = _r->regs[3] = _r->regs[4] = 0; \ 79 _r->regs[5] = _r->regs[6] = _r->regs[7] = _r->regs[8] = 0; \ 80 _r->regs[9] = _r->regs[10] = _r->regs[11] = _r->regs[12] = 0; \ 81 _r->regs[13] = _r->regs[14] = _r->regs[15] = _r->regs[16] = 0; \ 82 _r->regs[17] = _r->regs[18] = _r->regs[19] = _r->regs[20] = 0; \ 83 _r->regs[21] = _r->regs[22] = _r->regs[23] = _r->regs[24] = 0; \ 84 _r->regs[25] = _r->regs[26] = _r->regs[27] = _r->regs[28] = 0; \ 85 _r->regs[30] = _r->regs[31] = 0; \
|
H A D | bug.h | 12 #define die(msg, regs) \ 13 __die(msg, regs, __FILE__ ":", __func__, __LINE__) 14 #define die_if_kernel(msg, regs) \ 15 __die_if_kernel(msg, regs, __FILE__ ":", __func__, __LINE__)
|
H A D | syscalls.h | 4 asmlinkage long score_rt_sigreturn(struct pt_regs *regs);
|
H A D | irq_regs.h | 8 return current_thread_info()->regs; get_irq_regs()
|
/linux-4.1.27/arch/c6x/include/asm/ |
H A D | syscall.h | 18 struct pt_regs *regs) syscall_get_nr() 20 return regs->b0; syscall_get_nr() 24 struct pt_regs *regs) syscall_rollback() 30 struct pt_regs *regs) syscall_get_error() 32 return IS_ERR_VALUE(regs->a4) ? regs->a4 : 0; syscall_get_error() 36 struct pt_regs *regs) syscall_get_return_value() 38 return regs->a4; syscall_get_return_value() 42 struct pt_regs *regs, syscall_set_return_value() 45 regs->a4 = error ?: val; syscall_set_return_value() 49 struct pt_regs *regs, unsigned int i, syscall_get_arguments() 56 *args++ = regs->a4; syscall_get_arguments() 60 *args++ = regs->b4; syscall_get_arguments() 64 *args++ = regs->a6; syscall_get_arguments() 68 *args++ = regs->b6; syscall_get_arguments() 72 *args++ = regs->a8; syscall_get_arguments() 76 *args++ = regs->b8; syscall_get_arguments() 86 struct pt_regs *regs, syscall_set_arguments() 94 regs->a4 = *args++; syscall_set_arguments() 98 regs->b4 = *args++; syscall_set_arguments() 102 regs->a6 = *args++; syscall_set_arguments() 106 regs->b6 = *args++; syscall_set_arguments() 110 regs->a8 = *args++; syscall_set_arguments() 114 regs->a9 = *args++; syscall_set_arguments() 17 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 23 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 29 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 35 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 41 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 48 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 85 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | ptrace.h | 23 #define user_mode(regs) ((((regs)->tsr) & 0x40) != 0) 25 #define instruction_pointer(regs) ((regs)->pc) 26 #define profile_pc(regs) instruction_pointer(regs) 27 #define user_stack_pointer(regs) ((regs)->sp) 31 extern asmlinkage unsigned long syscall_trace_entry(struct pt_regs *regs); 32 extern asmlinkage void syscall_trace_exit(struct pt_regs *regs);
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/ |
H A D | elf.h | 41 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 42 pr_reg[0] = regs->r0; \ 43 pr_reg[1] = regs->r1; \ 44 pr_reg[2] = regs->r2; \ 45 pr_reg[3] = regs->r3; \ 46 pr_reg[4] = regs->r4; \ 47 pr_reg[5] = regs->r5; \ 48 pr_reg[6] = regs->r6; \ 49 pr_reg[7] = regs->r7; \ 50 pr_reg[8] = regs->r8; \ 51 pr_reg[9] = regs->r9; \ 52 pr_reg[10] = regs->r10; \ 53 pr_reg[11] = regs->r11; \ 54 pr_reg[12] = regs->r12; \ 55 pr_reg[13] = regs->r13; \ 57 pr_reg[15] = regs->acr; /* ACR */ \ 61 pr_reg[19] = regs->srs; /* SRS */ \ 63 pr_reg[21] = regs->exs; /* EXS */ \ 64 pr_reg[22] = regs->eda; /* EDA */ \ 65 pr_reg[23] = regs->mof; /* MOF */ \ 68 pr_reg[26] = regs->erp; /* ERP */ \ 69 pr_reg[27] = regs->srp; /* SRP */ \ 71 pr_reg[29] = regs->ccs; /* CCS */ \ 73 pr_reg[31] = regs->spc; /* SPC */ \
|
/linux-4.1.27/arch/nios2/include/asm/ |
H A D | syscall.h | 23 static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 25 return regs->r2; syscall_get_nr() 29 struct pt_regs *regs) syscall_rollback() 31 regs->r2 = regs->orig_r2; syscall_rollback() 32 regs->r7 = regs->orig_r7; syscall_rollback() 36 struct pt_regs *regs) syscall_get_error() 38 return regs->r7 ? regs->r2 : 0; syscall_get_error() 42 struct pt_regs *regs) syscall_get_return_value() 44 return regs->r2; syscall_get_return_value() 48 struct pt_regs *regs, int error, long val) syscall_set_return_value() 52 regs->r2 = -error; syscall_set_return_value() 53 regs->r7 = 1; syscall_set_return_value() 55 regs->r2 = val; syscall_set_return_value() 56 regs->r7 = 0; syscall_set_return_value() 61 struct pt_regs *regs, unsigned int i, unsigned int n, syscall_get_arguments() 70 *args++ = regs->r4; syscall_get_arguments() 74 *args++ = regs->r5; syscall_get_arguments() 78 *args++ = regs->r6; syscall_get_arguments() 82 *args++ = regs->r7; syscall_get_arguments() 86 *args++ = regs->r8; syscall_get_arguments() 90 *args++ = regs->r9; syscall_get_arguments() 100 struct pt_regs *regs, unsigned int i, unsigned int n, syscall_set_arguments() 109 regs->r4 = *args++; syscall_set_arguments() 113 regs->r5 = *args++; syscall_set_arguments() 117 regs->r6 = *args++; syscall_set_arguments() 121 regs->r7 = *args++; syscall_set_arguments() 125 regs->r8 = *args++; syscall_set_arguments() 129 regs->r9 = *args++; syscall_set_arguments() 28 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 35 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 41 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 47 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 60 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 99 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | elf.h | 41 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is 48 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 51 pr_reg[0] = regs->r8; \ 52 pr_reg[1] = regs->r9; \ 53 pr_reg[2] = regs->r10; \ 54 pr_reg[3] = regs->r11; \ 55 pr_reg[4] = regs->r12; \ 56 pr_reg[5] = regs->r13; \ 57 pr_reg[6] = regs->r14; \ 58 pr_reg[7] = regs->r15; \ 59 pr_reg[8] = regs->r1; \ 60 pr_reg[9] = regs->r2; \ 61 pr_reg[10] = regs->r3; \ 62 pr_reg[11] = regs->r4; \ 63 pr_reg[12] = regs->r5; \ 64 pr_reg[13] = regs->r6; \ 65 pr_reg[14] = regs->r7; \ 66 pr_reg[15] = regs->orig_r2; \ 67 pr_reg[16] = regs->ra; \ 68 pr_reg[17] = regs->fp; \ 69 pr_reg[18] = regs->sp; \ 70 pr_reg[19] = regs->gp; \ 71 pr_reg[20] = regs->estatus; \ 72 pr_reg[21] = regs->ea; \ 73 pr_reg[22] = regs->orig_r7; \ 75 struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
|
/linux-4.1.27/arch/blackfin/kernel/ |
H A D | kgdb.c | 14 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) pt_regs_to_gdb_regs() argument 16 gdb_regs[BFIN_R0] = regs->r0; pt_regs_to_gdb_regs() 17 gdb_regs[BFIN_R1] = regs->r1; pt_regs_to_gdb_regs() 18 gdb_regs[BFIN_R2] = regs->r2; pt_regs_to_gdb_regs() 19 gdb_regs[BFIN_R3] = regs->r3; pt_regs_to_gdb_regs() 20 gdb_regs[BFIN_R4] = regs->r4; pt_regs_to_gdb_regs() 21 gdb_regs[BFIN_R5] = regs->r5; pt_regs_to_gdb_regs() 22 gdb_regs[BFIN_R6] = regs->r6; pt_regs_to_gdb_regs() 23 gdb_regs[BFIN_R7] = regs->r7; pt_regs_to_gdb_regs() 24 gdb_regs[BFIN_P0] = regs->p0; pt_regs_to_gdb_regs() 25 gdb_regs[BFIN_P1] = regs->p1; pt_regs_to_gdb_regs() 26 gdb_regs[BFIN_P2] = regs->p2; pt_regs_to_gdb_regs() 27 gdb_regs[BFIN_P3] = regs->p3; pt_regs_to_gdb_regs() 28 gdb_regs[BFIN_P4] = regs->p4; pt_regs_to_gdb_regs() 29 gdb_regs[BFIN_P5] = regs->p5; pt_regs_to_gdb_regs() 30 gdb_regs[BFIN_SP] = regs->reserved; pt_regs_to_gdb_regs() 31 gdb_regs[BFIN_FP] = regs->fp; pt_regs_to_gdb_regs() 32 gdb_regs[BFIN_I0] = regs->i0; pt_regs_to_gdb_regs() 33 gdb_regs[BFIN_I1] = regs->i1; pt_regs_to_gdb_regs() 34 gdb_regs[BFIN_I2] = regs->i2; pt_regs_to_gdb_regs() 35 gdb_regs[BFIN_I3] = regs->i3; pt_regs_to_gdb_regs() 36 gdb_regs[BFIN_M0] = regs->m0; pt_regs_to_gdb_regs() 37 gdb_regs[BFIN_M1] = regs->m1; pt_regs_to_gdb_regs() 38 gdb_regs[BFIN_M2] = regs->m2; pt_regs_to_gdb_regs() 39 gdb_regs[BFIN_M3] = regs->m3; pt_regs_to_gdb_regs() 40 gdb_regs[BFIN_B0] = regs->b0; pt_regs_to_gdb_regs() 41 gdb_regs[BFIN_B1] = regs->b1; pt_regs_to_gdb_regs() 42 gdb_regs[BFIN_B2] = regs->b2; pt_regs_to_gdb_regs() 43 gdb_regs[BFIN_B3] = regs->b3; pt_regs_to_gdb_regs() 44 gdb_regs[BFIN_L0] = regs->l0; pt_regs_to_gdb_regs() 45 gdb_regs[BFIN_L1] = regs->l1; pt_regs_to_gdb_regs() 46 gdb_regs[BFIN_L2] = regs->l2; pt_regs_to_gdb_regs() 47 gdb_regs[BFIN_L3] = regs->l3; pt_regs_to_gdb_regs() 48 gdb_regs[BFIN_A0_DOT_X] = regs->a0x; pt_regs_to_gdb_regs() 49 gdb_regs[BFIN_A0_DOT_W] = regs->a0w; pt_regs_to_gdb_regs() 50 gdb_regs[BFIN_A1_DOT_X] = regs->a1x; pt_regs_to_gdb_regs() 51 gdb_regs[BFIN_A1_DOT_W] = regs->a1w; pt_regs_to_gdb_regs() 52 gdb_regs[BFIN_ASTAT] = regs->astat; pt_regs_to_gdb_regs() 53 gdb_regs[BFIN_RETS] = regs->rets; pt_regs_to_gdb_regs() 54 gdb_regs[BFIN_LC0] = regs->lc0; pt_regs_to_gdb_regs() 55 gdb_regs[BFIN_LT0] = regs->lt0; pt_regs_to_gdb_regs() 56 gdb_regs[BFIN_LB0] = regs->lb0; pt_regs_to_gdb_regs() 57 gdb_regs[BFIN_LC1] = regs->lc1; pt_regs_to_gdb_regs() 58 gdb_regs[BFIN_LT1] = regs->lt1; pt_regs_to_gdb_regs() 59 gdb_regs[BFIN_LB1] = regs->lb1; pt_regs_to_gdb_regs() 62 gdb_regs[BFIN_USP] = regs->usp; pt_regs_to_gdb_regs() 63 gdb_regs[BFIN_SEQSTAT] = regs->seqstat; pt_regs_to_gdb_regs() 64 gdb_regs[BFIN_SYSCFG] = regs->syscfg; pt_regs_to_gdb_regs() 65 gdb_regs[BFIN_RETI] = regs->pc; pt_regs_to_gdb_regs() 66 gdb_regs[BFIN_RETX] = regs->retx; pt_regs_to_gdb_regs() 67 gdb_regs[BFIN_RETN] = regs->retn; pt_regs_to_gdb_regs() 68 gdb_regs[BFIN_RETE] = regs->rete; pt_regs_to_gdb_regs() 69 gdb_regs[BFIN_PC] = regs->pc; pt_regs_to_gdb_regs() 70 gdb_regs[BFIN_CC] = (regs->astat >> 5) & 1; pt_regs_to_gdb_regs() 74 gdb_regs[BFIN_IPEND] = regs->ipend; pt_regs_to_gdb_regs() 91 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs_to_pt_regs() argument 93 regs->r0 = gdb_regs[BFIN_R0]; gdb_regs_to_pt_regs() 94 regs->r1 = gdb_regs[BFIN_R1]; gdb_regs_to_pt_regs() 95 regs->r2 = gdb_regs[BFIN_R2]; gdb_regs_to_pt_regs() 96 regs->r3 = gdb_regs[BFIN_R3]; gdb_regs_to_pt_regs() 97 regs->r4 = gdb_regs[BFIN_R4]; gdb_regs_to_pt_regs() 98 regs->r5 = gdb_regs[BFIN_R5]; gdb_regs_to_pt_regs() 99 regs->r6 = gdb_regs[BFIN_R6]; gdb_regs_to_pt_regs() 100 regs->r7 = gdb_regs[BFIN_R7]; gdb_regs_to_pt_regs() 101 regs->p0 = gdb_regs[BFIN_P0]; gdb_regs_to_pt_regs() 102 regs->p1 = gdb_regs[BFIN_P1]; gdb_regs_to_pt_regs() 103 regs->p2 = gdb_regs[BFIN_P2]; gdb_regs_to_pt_regs() 104 regs->p3 = gdb_regs[BFIN_P3]; gdb_regs_to_pt_regs() 105 regs->p4 = gdb_regs[BFIN_P4]; gdb_regs_to_pt_regs() 106 regs->p5 = gdb_regs[BFIN_P5]; gdb_regs_to_pt_regs() 107 regs->fp = gdb_regs[BFIN_FP]; gdb_regs_to_pt_regs() 108 regs->i0 = gdb_regs[BFIN_I0]; gdb_regs_to_pt_regs() 109 regs->i1 = gdb_regs[BFIN_I1]; gdb_regs_to_pt_regs() 110 regs->i2 = gdb_regs[BFIN_I2]; gdb_regs_to_pt_regs() 111 regs->i3 = gdb_regs[BFIN_I3]; gdb_regs_to_pt_regs() 112 regs->m0 = gdb_regs[BFIN_M0]; gdb_regs_to_pt_regs() 113 regs->m1 = gdb_regs[BFIN_M1]; gdb_regs_to_pt_regs() 114 regs->m2 = gdb_regs[BFIN_M2]; gdb_regs_to_pt_regs() 115 regs->m3 = gdb_regs[BFIN_M3]; gdb_regs_to_pt_regs() 116 regs->b0 = gdb_regs[BFIN_B0]; gdb_regs_to_pt_regs() 117 regs->b1 = gdb_regs[BFIN_B1]; gdb_regs_to_pt_regs() 118 regs->b2 = gdb_regs[BFIN_B2]; gdb_regs_to_pt_regs() 119 regs->b3 = gdb_regs[BFIN_B3]; gdb_regs_to_pt_regs() 120 regs->l0 = gdb_regs[BFIN_L0]; gdb_regs_to_pt_regs() 121 regs->l1 = gdb_regs[BFIN_L1]; gdb_regs_to_pt_regs() 122 regs->l2 = gdb_regs[BFIN_L2]; gdb_regs_to_pt_regs() 123 regs->l3 = gdb_regs[BFIN_L3]; gdb_regs_to_pt_regs() 124 regs->a0x = gdb_regs[BFIN_A0_DOT_X]; gdb_regs_to_pt_regs() 125 regs->a0w = gdb_regs[BFIN_A0_DOT_W]; gdb_regs_to_pt_regs() 126 regs->a1x = gdb_regs[BFIN_A1_DOT_X]; gdb_regs_to_pt_regs() 127 regs->a1w = gdb_regs[BFIN_A1_DOT_W]; gdb_regs_to_pt_regs() 128 regs->rets = gdb_regs[BFIN_RETS]; gdb_regs_to_pt_regs() 129 regs->lc0 = gdb_regs[BFIN_LC0]; gdb_regs_to_pt_regs() 130 regs->lt0 = gdb_regs[BFIN_LT0]; gdb_regs_to_pt_regs() 131 regs->lb0 = gdb_regs[BFIN_LB0]; gdb_regs_to_pt_regs() 132 regs->lc1 = gdb_regs[BFIN_LC1]; gdb_regs_to_pt_regs() 133 regs->lt1 = gdb_regs[BFIN_LT1]; gdb_regs_to_pt_regs() 134 regs->lb1 = gdb_regs[BFIN_LB1]; gdb_regs_to_pt_regs() 135 regs->usp = gdb_regs[BFIN_USP]; gdb_regs_to_pt_regs() 136 regs->syscfg = gdb_regs[BFIN_SYSCFG]; gdb_regs_to_pt_regs() 137 regs->retx = gdb_regs[BFIN_RETX]; gdb_regs_to_pt_regs() 138 regs->retn = gdb_regs[BFIN_RETN]; gdb_regs_to_pt_regs() 139 regs->rete = gdb_regs[BFIN_RETE]; gdb_regs_to_pt_regs() 140 regs->pc = gdb_regs[BFIN_PC]; gdb_regs_to_pt_regs() 143 regs->astat = gdb_regs[BFIN_ASTAT]; gdb_regs_to_pt_regs() 144 regs->seqstat = gdb_regs[BFIN_SEQSTAT]; gdb_regs_to_pt_regs() 145 regs->ipend = gdb_regs[BFIN_IPEND]; gdb_regs_to_pt_regs() 324 static void bfin_disable_hw_debug(struct pt_regs *regs) bfin_disable_hw_debug() argument 361 struct pt_regs *regs) kgdb_arch_handle_exception() 381 regs->retx = addr; kgdb_arch_handle_exception() 383 newPC = regs->retx; kgdb_arch_handle_exception() 386 regs->syscfg &= 0xfffffffe; kgdb_arch_handle_exception() 390 regs->syscfg |= 0x1; kgdb_arch_handle_exception() 391 kgdb_single_step = regs->ipend; kgdb_arch_handle_exception() 455 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) kgdb_arch_set_pc() argument 457 regs->retx = ip; kgdb_arch_set_pc() 358 kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *regs) kgdb_arch_handle_exception() argument
|
/linux-4.1.27/arch/arm64/include/asm/ |
H A D | ptrace.h | 81 #define compat_usr(x) regs[(x)] 82 #define compat_fp regs[11] 83 #define compat_sp regs[13] 84 #define compat_lr regs[14] 85 #define compat_sp_hyp regs[15] 86 #define compat_lr_irq regs[16] 87 #define compat_sp_irq regs[17] 88 #define compat_lr_svc regs[18] 89 #define compat_sp_svc regs[19] 90 #define compat_lr_abt regs[20] 91 #define compat_sp_abt regs[21] 92 #define compat_lr_und regs[22] 93 #define compat_sp_und regs[23] 94 #define compat_r8_fiq regs[24] 95 #define compat_r9_fiq regs[25] 96 #define compat_r10_fiq regs[26] 97 #define compat_r11_fiq regs[27] 98 #define compat_r12_fiq regs[28] 99 #define compat_sp_fiq regs[29] 100 #define compat_lr_fiq regs[30] 111 u64 regs[31]; member in struct:pt_regs::__anon312::__anon313 124 #define compat_thumb_mode(regs) \ 125 (((regs)->pstate & COMPAT_PSR_T_BIT)) 127 #define compat_thumb_mode(regs) (0) 130 #define user_mode(regs) \ 131 (((regs)->pstate & PSR_MODE_MASK) == PSR_MODE_EL0t) 133 #define compat_user_mode(regs) \ 134 (((regs)->pstate & (PSR_MODE32_BIT | PSR_MODE_MASK)) == \ 137 #define processor_mode(regs) \ 138 ((regs)->pstate & PSR_MODE_MASK) 140 #define interrupts_enabled(regs) \ 141 (!((regs)->pstate & PSR_I_BIT)) 143 #define fast_interrupts_enabled(regs) \ 144 (!((regs)->pstate & PSR_F_BIT)) 146 #define user_stack_pointer(regs) \ 147 (!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp) 149 static inline unsigned long regs_return_value(struct pt_regs *regs) regs_return_value() argument 151 return regs->regs[0]; regs_return_value() 158 static inline int valid_user_regs(struct user_pt_regs *regs) valid_user_regs() argument 160 if (user_mode(regs) && (regs->pstate & PSR_I_BIT) == 0) { valid_user_regs() 161 regs->pstate &= ~(PSR_F_BIT | PSR_A_BIT); valid_user_regs() 164 if (!(regs->pstate & PSR_MODE32_BIT)) valid_user_regs() 165 regs->pstate &= ~COMPAT_PSR_T_BIT; valid_user_regs() 173 regs->pstate &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | \ valid_user_regs() 176 if (!(regs->pstate & PSR_MODE32_BIT)) { valid_user_regs() 177 regs->pstate &= ~COMPAT_PSR_T_BIT; valid_user_regs() 178 regs->pstate |= PSR_MODE_EL0t; valid_user_regs() 184 #define instruction_pointer(regs) ((unsigned long)(regs)->pc) 187 extern unsigned long profile_pc(struct pt_regs *regs); 189 #define profile_pc(regs) instruction_pointer(regs)
|
H A D | syscall.h | 26 struct pt_regs *regs) syscall_get_nr() 28 return regs->syscallno; syscall_get_nr() 32 struct pt_regs *regs) syscall_rollback() 34 regs->regs[0] = regs->orig_x0; syscall_rollback() 39 struct pt_regs *regs) syscall_get_error() 41 unsigned long error = regs->regs[0]; syscall_get_error() 46 struct pt_regs *regs) syscall_get_return_value() 48 return regs->regs[0]; syscall_get_return_value() 52 struct pt_regs *regs, syscall_set_return_value() 55 regs->regs[0] = (long) error ? error : val; syscall_set_return_value() 61 struct pt_regs *regs, syscall_get_arguments() 77 args[0] = regs->orig_x0; syscall_get_arguments() 83 memcpy(args, ®s->regs[i], n * sizeof(args[0])); syscall_get_arguments() 87 struct pt_regs *regs, syscall_set_arguments() 101 regs->orig_x0 = args[0]; syscall_set_arguments() 107 memcpy(®s->regs[i], args, n * sizeof(args[0])); syscall_set_arguments() 25 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 31 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 38 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 45 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 51 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 60 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 86 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/powerpc/lib/ |
H A D | sstep.c | 63 static int __kprobes branch_taken(unsigned int instr, struct pt_regs *regs) branch_taken() argument 70 --regs->ctr; branch_taken() 71 if (((bo >> 1) & 1) ^ (regs->ctr == 0)) branch_taken() 77 if (((regs->ccr >> (31 - bi)) & 1) != ((bo >> 3) & 1)) branch_taken() 84 static long __kprobes address_ok(struct pt_regs *regs, unsigned long ea, int nb) address_ok() argument 86 if (!user_mode(regs)) address_ok() 94 static unsigned long __kprobes dform_ea(unsigned int instr, struct pt_regs *regs) dform_ea() argument 102 ea += regs->gpr[ra]; dform_ea() 104 return truncate_if_32bit(regs->msr, ea); dform_ea() 111 static unsigned long __kprobes dsform_ea(unsigned int instr, struct pt_regs *regs) dsform_ea() argument 119 ea += regs->gpr[ra]; dsform_ea() 121 return truncate_if_32bit(regs->msr, ea); dsform_ea() 129 struct pt_regs *regs) xform_ea() 136 ea = regs->gpr[rb]; xform_ea() 138 ea += regs->gpr[ra]; xform_ea() 140 return truncate_if_32bit(regs->msr, ea); xform_ea() 200 int nb, struct pt_regs *regs) read_mem_unaligned() 251 struct pt_regs *regs) read_mem() 253 if (!address_ok(regs, ea, nb)) read_mem() 257 return read_mem_unaligned(dest, ea, nb, regs); read_mem() 285 int nb, struct pt_regs *regs) write_mem_unaligned() 328 struct pt_regs *regs) write_mem() 330 if (!address_ok(regs, ea, nb)) write_mem() 334 return write_mem_unaligned(val, ea, nb, regs); write_mem() 344 struct pt_regs *regs) do_fp_load() 363 if (!address_ok(regs, ea, nb)) do_fp_load() 369 err = read_mem_unaligned(&data.ul[0], ea, nb, regs); do_fp_load() 374 err = read_mem_unaligned(&data.ul[0], ea, 4, regs); do_fp_load() 376 err = read_mem_unaligned(&data.ul[1], ea + 4, 4, regs); do_fp_load() 385 struct pt_regs *regs) do_fp_store() 404 if (!address_ok(regs, ea, nb)) do_fp_store() 415 err = write_mem_unaligned(data.ul[0], ea, nb, regs); do_fp_store() 421 err = write_mem_unaligned(data.ul[0], ea, 4, regs); do_fp_store() 423 err = write_mem_unaligned(data.ul[1], ea + 4, 4, regs); do_fp_store() 432 unsigned long ea, struct pt_regs *regs) do_vec_load() 434 if (!address_ok(regs, ea & ~0xfUL, 16)) do_vec_load() 440 unsigned long ea, struct pt_regs *regs) do_vec_store() 442 if (!address_ok(regs, ea & ~0xfUL, 16)) do_vec_store() 450 unsigned long ea, struct pt_regs *regs) do_vsx_load() 455 if (!address_ok(regs, ea, 16)) do_vsx_load() 459 err = read_mem_unaligned(&val[0], ea, 8, regs); do_vsx_load() 461 err = read_mem_unaligned(&val[1], ea + 8, 8, regs); do_vsx_load() 468 unsigned long ea, struct pt_regs *regs) do_vsx_store() 473 if (!address_ok(regs, ea, 16)) do_vsx_store() 480 err = write_mem_unaligned(val[0], ea, 8, regs); do_vsx_store() 482 err = write_mem_unaligned(val[1], ea + 8, 8, regs); do_vsx_store() 533 static void __kprobes set_cr0(struct pt_regs *regs, int rd) set_cr0() argument 535 long val = regs->gpr[rd]; set_cr0() 537 regs->ccr = (regs->ccr & 0x0fffffff) | ((regs->xer >> 3) & 0x10000000); set_cr0() 539 if (!(regs->msr & MSR_64BIT)) set_cr0() 543 regs->ccr |= 0x80000000; set_cr0() 545 regs->ccr |= 0x40000000; set_cr0() 547 regs->ccr |= 0x20000000; set_cr0() 550 static void __kprobes add_with_carry(struct pt_regs *regs, int rd, add_with_carry() argument 558 regs->gpr[rd] = val; add_with_carry() 560 if (!(regs->msr & MSR_64BIT)) { add_with_carry() 566 regs->xer |= XER_CA; add_with_carry() 568 regs->xer &= ~XER_CA; add_with_carry() 571 static void __kprobes do_cmp_signed(struct pt_regs *regs, long v1, long v2, do_cmp_signed() argument 576 crval = (regs->xer >> 31) & 1; /* get SO bit */ do_cmp_signed() 584 regs->ccr = (regs->ccr & ~(0xf << shift)) | (crval << shift); do_cmp_signed() 587 static void __kprobes do_cmp_unsigned(struct pt_regs *regs, unsigned long v1, do_cmp_unsigned() argument 592 crval = (regs->xer >> 31) & 1; /* get SO bit */ do_cmp_unsigned() 600 regs->ccr = (regs->ccr & ~(0xf << shift)) | (crval << shift); do_cmp_unsigned() 637 * modifying *regs (i.e. integer arithmetic and logical instructions, 642 int __kprobes analyse_instr(struct instruction_op *op, struct pt_regs *regs, analyse_instr() argument 659 imm += regs->nip; analyse_instr() 660 regs->nip += 4; analyse_instr() 661 regs->nip = truncate_if_32bit(regs->msr, regs->nip); analyse_instr() 663 regs->link = regs->nip; analyse_instr() 664 if (branch_taken(instr, regs)) analyse_instr() 665 regs->nip = truncate_if_32bit(regs->msr, imm); analyse_instr() 681 imm += regs->nip; analyse_instr() 683 regs->link = truncate_if_32bit(regs->msr, regs->nip + 4); analyse_instr() 684 imm = truncate_if_32bit(regs->msr, imm); analyse_instr() 685 regs->nip = imm; analyse_instr() 692 val = (regs->ccr >> ra) & 0xf; analyse_instr() 693 regs->ccr = (regs->ccr & ~(0xfUL << rd)) | (val << rd); analyse_instr() 699 imm = (instr & 0x400)? regs->ctr: regs->link; analyse_instr() 700 regs->nip = truncate_if_32bit(regs->msr, regs->nip + 4); analyse_instr() 701 imm = truncate_if_32bit(regs->msr, imm); analyse_instr() 703 regs->link = regs->nip; analyse_instr() 704 if (branch_taken(instr, regs)) analyse_instr() 705 regs->nip = imm; analyse_instr() 709 if (regs->msr & MSR_PR) analyse_instr() 730 ra = (regs->ccr >> (31 - ra)) & 1; analyse_instr() 731 rb = (regs->ccr >> (31 - rb)) & 1; analyse_instr() 733 regs->ccr = (regs->ccr & ~(1UL << (31 - rd))) | analyse_instr() 763 /* Following cases refer to regs->gpr[], so we need all regs */ analyse_instr() 764 if (!FULL_REGS(regs)) analyse_instr() 774 if (rd & trap_compare(regs->gpr[ra], (short) instr)) analyse_instr() 779 if (rd & trap_compare((int)regs->gpr[ra], (short) instr)) analyse_instr() 784 regs->gpr[rd] = regs->gpr[ra] * (short) instr; analyse_instr() 789 add_with_carry(regs, rd, ~regs->gpr[ra], imm, 1); analyse_instr() 794 val = regs->gpr[ra]; analyse_instr() 799 do_cmp_unsigned(regs, val, imm, rd >> 2); analyse_instr() 804 val = regs->gpr[ra]; analyse_instr() 809 do_cmp_signed(regs, val, imm, rd >> 2); analyse_instr() 814 add_with_carry(regs, rd, regs->gpr[ra], imm, 0); analyse_instr() 819 add_with_carry(regs, rd, regs->gpr[ra], imm, 0); analyse_instr() 820 set_cr0(regs, rd); analyse_instr() 826 imm += regs->gpr[ra]; analyse_instr() 827 regs->gpr[rd] = imm; analyse_instr() 833 imm += regs->gpr[ra]; analyse_instr() 834 regs->gpr[rd] = imm; analyse_instr() 840 val = DATA32(regs->gpr[rd]); analyse_instr() 842 regs->gpr[ra] = (regs->gpr[ra] & ~imm) | (ROTATE(val, rb) & imm); analyse_instr() 848 val = DATA32(regs->gpr[rd]); analyse_instr() 849 regs->gpr[ra] = ROTATE(val, rb) & MASK32(mb, me); analyse_instr() 855 rb = regs->gpr[rb] & 0x1f; analyse_instr() 856 val = DATA32(regs->gpr[rd]); analyse_instr() 857 regs->gpr[ra] = ROTATE(val, rb) & MASK32(mb, me); analyse_instr() 862 regs->gpr[ra] = regs->gpr[rd] | imm; analyse_instr() 867 regs->gpr[ra] = regs->gpr[rd] | (imm << 16); analyse_instr() 872 regs->gpr[ra] = regs->gpr[rd] ^ imm; analyse_instr() 877 regs->gpr[ra] = regs->gpr[rd] ^ (imm << 16); analyse_instr() 882 regs->gpr[ra] = regs->gpr[rd] & imm; analyse_instr() 883 set_cr0(regs, ra); analyse_instr() 888 regs->gpr[ra] = regs->gpr[rd] & (imm << 16); analyse_instr() 889 set_cr0(regs, ra); analyse_instr() 895 val = regs->gpr[rd]; analyse_instr() 901 regs->gpr[ra] = val & MASK64_L(mb); analyse_instr() 904 regs->gpr[ra] = val & MASK64_R(mb); analyse_instr() 907 regs->gpr[ra] = val & MASK64(mb, 63 - sh); analyse_instr() 911 regs->gpr[ra] = (regs->gpr[ra] & ~imm) | analyse_instr() 916 sh = regs->gpr[rb] & 0x3f; analyse_instr() 920 regs->gpr[ra] = val & MASK64_L(mb); analyse_instr() 923 regs->gpr[ra] = val & MASK64_R(mb); analyse_instr() 933 (rd & trap_compare((int)regs->gpr[ra], analyse_instr() 934 (int)regs->gpr[rb]))) analyse_instr() 939 if (rd & trap_compare(regs->gpr[ra], regs->gpr[rb])) analyse_instr() 944 if (regs->msr & MSR_PR) analyse_instr() 950 if (regs->msr & MSR_PR) analyse_instr() 958 if (regs->msr & MSR_PR) analyse_instr() 970 regs->gpr[rd] = regs->ccr; analyse_instr() 971 regs->gpr[rd] &= 0xffffffffUL; analyse_instr() 976 val = regs->gpr[rd]; analyse_instr() 979 regs->ccr = (regs->ccr & ~imm) | analyse_instr() 989 regs->gpr[rd] = regs->xer; analyse_instr() 990 regs->gpr[rd] &= 0xffffffffUL; analyse_instr() 993 regs->gpr[rd] = regs->link; analyse_instr() 996 regs->gpr[rd] = regs->ctr; analyse_instr() 1010 regs->xer = (regs->gpr[rd] & 0xffffffffUL); analyse_instr() 1013 regs->link = regs->gpr[rd]; analyse_instr() 1016 regs->ctr = regs->gpr[rd]; analyse_instr() 1020 op->val = regs->gpr[rd]; analyse_instr() 1030 val = regs->gpr[ra]; analyse_instr() 1031 val2 = regs->gpr[rb]; analyse_instr() 1039 do_cmp_signed(regs, val, val2, rd >> 2); analyse_instr() 1043 val = regs->gpr[ra]; analyse_instr() 1044 val2 = regs->gpr[rb]; analyse_instr() 1052 do_cmp_unsigned(regs, val, val2, rd >> 2); analyse_instr() 1059 add_with_carry(regs, rd, ~regs->gpr[ra], analyse_instr() 1060 regs->gpr[rb], 1); analyse_instr() 1064 asm("mulhdu %0,%1,%2" : "=r" (regs->gpr[rd]) : analyse_instr() 1065 "r" (regs->gpr[ra]), "r" (regs->gpr[rb])); analyse_instr() 1069 add_with_carry(regs, rd, regs->gpr[ra], analyse_instr() 1070 regs->gpr[rb], 0); analyse_instr() 1074 asm("mulhwu %0,%1,%2" : "=r" (regs->gpr[rd]) : analyse_instr() 1075 "r" (regs->gpr[ra]), "r" (regs->gpr[rb])); analyse_instr() 1079 regs->gpr[rd] = regs->gpr[rb] - regs->gpr[ra]; analyse_instr() 1083 asm("mulhd %0,%1,%2" : "=r" (regs->gpr[rd]) : analyse_instr() 1084 "r" (regs->gpr[ra]), "r" (regs->gpr[rb])); analyse_instr() 1088 asm("mulhw %0,%1,%2" : "=r" (regs->gpr[rd]) : analyse_instr() 1089 "r" (regs->gpr[ra]), "r" (regs->gpr[rb])); analyse_instr() 1093 regs->gpr[rd] = -regs->gpr[ra]; analyse_instr() 1097 add_with_carry(regs, rd, ~regs->gpr[ra], regs->gpr[rb], analyse_instr() 1098 regs->xer & XER_CA); analyse_instr() 1102 add_with_carry(regs, rd, regs->gpr[ra], regs->gpr[rb], analyse_instr() 1103 regs->xer & XER_CA); analyse_instr() 1107 add_with_carry(regs, rd, ~regs->gpr[ra], 0L, analyse_instr() 1108 regs->xer & XER_CA); analyse_instr() 1112 add_with_carry(regs, rd, regs->gpr[ra], 0L, analyse_instr() 1113 regs->xer & XER_CA); analyse_instr() 1117 add_with_carry(regs, rd, ~regs->gpr[ra], -1L, analyse_instr() 1118 regs->xer & XER_CA); analyse_instr() 1122 regs->gpr[rd] = regs->gpr[ra] * regs->gpr[rb]; analyse_instr() 1126 add_with_carry(regs, rd, regs->gpr[ra], -1L, analyse_instr() 1127 regs->xer & XER_CA); analyse_instr() 1131 regs->gpr[rd] = (unsigned int) regs->gpr[ra] * analyse_instr() 1132 (unsigned int) regs->gpr[rb]; analyse_instr() 1136 regs->gpr[rd] = regs->gpr[ra] + regs->gpr[rb]; analyse_instr() 1140 regs->gpr[rd] = regs->gpr[ra] / regs->gpr[rb]; analyse_instr() 1144 regs->gpr[rd] = (unsigned int) regs->gpr[ra] / analyse_instr() 1145 (unsigned int) regs->gpr[rb]; analyse_instr() 1149 regs->gpr[rd] = (long int) regs->gpr[ra] / analyse_instr() 1150 (long int) regs->gpr[rb]; analyse_instr() 1154 regs->gpr[rd] = (int) regs->gpr[ra] / analyse_instr() 1155 (int) regs->gpr[rb]; analyse_instr() 1163 asm("cntlzw %0,%1" : "=r" (regs->gpr[ra]) : analyse_instr() 1164 "r" (regs->gpr[rd])); analyse_instr() 1168 asm("cntlzd %0,%1" : "=r" (regs->gpr[ra]) : analyse_instr() 1169 "r" (regs->gpr[rd])); analyse_instr() 1173 regs->gpr[ra] = regs->gpr[rd] & regs->gpr[rb]; analyse_instr() 1177 regs->gpr[ra] = regs->gpr[rd] & ~regs->gpr[rb]; analyse_instr() 1181 regs->gpr[ra] = ~(regs->gpr[rd] | regs->gpr[rb]); analyse_instr() 1185 regs->gpr[ra] = ~(regs->gpr[rd] ^ regs->gpr[rb]); analyse_instr() 1189 regs->gpr[ra] = regs->gpr[rd] ^ regs->gpr[rb]; analyse_instr() 1193 regs->gpr[ra] = regs->gpr[rd] | ~regs->gpr[rb]; analyse_instr() 1197 regs->gpr[ra] = regs->gpr[rd] | regs->gpr[rb]; analyse_instr() 1201 regs->gpr[ra] = ~(regs->gpr[rd] & regs->gpr[rb]); analyse_instr() 1205 regs->gpr[ra] = (signed short) regs->gpr[rd]; analyse_instr() 1209 regs->gpr[ra] = (signed char) regs->gpr[rd]; analyse_instr() 1213 regs->gpr[ra] = (signed int) regs->gpr[rd]; analyse_instr() 1221 sh = regs->gpr[rb] & 0x3f; analyse_instr() 1223 regs->gpr[ra] = (regs->gpr[rd] << sh) & 0xffffffffUL; analyse_instr() 1225 regs->gpr[ra] = 0; analyse_instr() 1229 sh = regs->gpr[rb] & 0x3f; analyse_instr() 1231 regs->gpr[ra] = (regs->gpr[rd] & 0xffffffffUL) >> sh; analyse_instr() 1233 regs->gpr[ra] = 0; analyse_instr() 1237 sh = regs->gpr[rb] & 0x3f; analyse_instr() 1238 ival = (signed int) regs->gpr[rd]; analyse_instr() 1239 regs->gpr[ra] = ival >> (sh < 32 ? sh : 31); analyse_instr() 1241 regs->xer |= XER_CA; analyse_instr() 1243 regs->xer &= ~XER_CA; analyse_instr() 1248 ival = (signed int) regs->gpr[rd]; analyse_instr() 1249 regs->gpr[ra] = ival >> sh; analyse_instr() 1251 regs->xer |= XER_CA; analyse_instr() 1253 regs->xer &= ~XER_CA; analyse_instr() 1258 sh = regs->gpr[rb] & 0x7f; analyse_instr() 1260 regs->gpr[ra] = regs->gpr[rd] << sh; analyse_instr() 1262 regs->gpr[ra] = 0; analyse_instr() 1266 sh = regs->gpr[rb] & 0x7f; analyse_instr() 1268 regs->gpr[ra] = regs->gpr[rd] >> sh; analyse_instr() 1270 regs->gpr[ra] = 0; analyse_instr() 1274 sh = regs->gpr[rb] & 0x7f; analyse_instr() 1275 ival = (signed long int) regs->gpr[rd]; analyse_instr() 1276 regs->gpr[ra] = ival >> (sh < 64 ? sh : 63); analyse_instr() 1278 regs->xer |= XER_CA; analyse_instr() 1280 regs->xer &= ~XER_CA; analyse_instr() 1286 ival = (signed long int) regs->gpr[rd]; analyse_instr() 1287 regs->gpr[ra] = ival >> sh; analyse_instr() 1289 regs->xer |= XER_CA; analyse_instr() 1291 regs->xer &= ~XER_CA; analyse_instr() 1300 op->ea = xform_ea(instr, regs); analyse_instr() 1305 op->ea = xform_ea(instr, regs); analyse_instr() 1310 op->ea = xform_ea(instr, regs); analyse_instr() 1316 op->ea = xform_ea(instr, regs); analyse_instr() 1322 op->ea = xform_ea(instr, regs); analyse_instr() 1334 op->val = regs->gpr[rd]; analyse_instr() 1340 op->ea = xform_ea(instr, regs); analyse_instr() 1378 if (!(regs->msr & MSR_VEC)) analyse_instr() 1385 if (!(regs->msr & MSR_VEC)) analyse_instr() 1437 op->type = MKOP(LOAD_MULTI, 0, regs->xer & 0x7f); analyse_instr() 1450 op->ea = truncate_if_32bit(regs->msr, analyse_instr() 1451 regs->gpr[ra]); analyse_instr() 1457 if (!(regs->msr & MSR_FP)) analyse_instr() 1464 if (!(regs->msr & MSR_FP)) analyse_instr() 1471 if (!(regs->msr & MSR_FP)) analyse_instr() 1478 if (!(regs->msr & MSR_FP)) analyse_instr() 1487 op->val = byterev_8(regs->gpr[rd]); analyse_instr() 1492 op->type = MKOP(STORE_MULTI, 0, regs->xer & 0x7f); analyse_instr() 1497 op->val = byterev_4(regs->gpr[rd]); analyse_instr() 1506 op->ea = truncate_if_32bit(regs->msr, analyse_instr() 1507 regs->gpr[ra]); analyse_instr() 1516 op->val = byterev_2(regs->gpr[rd]); analyse_instr() 1522 if (!(regs->msr & MSR_VSX)) analyse_instr() 1530 if (!(regs->msr & MSR_VSX)) analyse_instr() 1543 op->ea = dform_ea(instr, regs); analyse_instr() 1549 op->ea = dform_ea(instr, regs); analyse_instr() 1555 op->ea = dform_ea(instr, regs); analyse_instr() 1561 op->ea = dform_ea(instr, regs); analyse_instr() 1567 op->ea = dform_ea(instr, regs); analyse_instr() 1573 op->ea = dform_ea(instr, regs); analyse_instr() 1579 op->ea = dform_ea(instr, regs); analyse_instr() 1586 op->ea = dform_ea(instr, regs); analyse_instr() 1591 op->ea = dform_ea(instr, regs); analyse_instr() 1597 if (!(regs->msr & MSR_FP)) analyse_instr() 1600 op->ea = dform_ea(instr, regs); analyse_instr() 1605 if (!(regs->msr & MSR_FP)) analyse_instr() 1608 op->ea = dform_ea(instr, regs); analyse_instr() 1613 if (!(regs->msr & MSR_FP)) analyse_instr() 1616 op->ea = dform_ea(instr, regs); analyse_instr() 1621 if (!(regs->msr & MSR_FP)) analyse_instr() 1624 op->ea = dform_ea(instr, regs); analyse_instr() 1630 op->ea = dsform_ea(instr, regs); analyse_instr() 1645 op->ea = dsform_ea(instr, regs); analyse_instr() 1662 set_cr0(regs, ra); analyse_instr() 1667 set_cr0(regs, rd); analyse_instr() 1670 regs->nip = truncate_if_32bit(regs->msr, regs->nip + 4); analyse_instr() 1711 static __kprobes int handle_stack_update(unsigned long ea, struct pt_regs *regs) handle_stack_update() argument 1767 int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) emulate_step() argument 1775 r = analyse_instr(&op, regs, instr); emulate_step() 1783 if (!address_ok(regs, op.ea, 8)) emulate_step() 1809 if (regs->msr & MSR_LE) emulate_step() 1814 if (!address_ok(regs, op.ea, size)) emulate_step() 1828 regs->gpr[op.reg] = val; emulate_step() 1832 if (regs->msr & MSR_LE) emulate_step() 1837 if (!address_ok(regs, op.ea, size)) emulate_step() 1851 regs->ccr = (regs->ccr & 0x0fffffff) | emulate_step() 1853 ((regs->xer >> 3) & 0x10000000); emulate_step() 1857 if (regs->msr & MSR_LE) emulate_step() 1859 err = read_mem(®s->gpr[op.reg], op.ea, size, regs); emulate_step() 1862 do_signext(®s->gpr[op.reg], size); emulate_step() 1864 do_byterev(®s->gpr[op.reg], size); emulate_step() 1870 if (regs->msr & MSR_LE) emulate_step() 1873 err = do_fp_load(op.reg, do_lfs, op.ea, size, regs); emulate_step() 1875 err = do_fp_load(op.reg, do_lfd, op.ea, size, regs); emulate_step() 1880 if (regs->msr & MSR_LE) emulate_step() 1882 err = do_vec_load(op.reg, do_lvx, op.ea & ~0xfUL, regs); emulate_step() 1887 if (regs->msr & MSR_LE) emulate_step() 1889 err = do_vsx_load(op.reg, do_lxvd2x, op.ea, regs); emulate_step() 1893 if (regs->msr & MSR_LE) emulate_step() 1900 err = read_mem(®s->gpr[rd], op.ea, nb, regs); emulate_step() 1904 regs->gpr[rd] <<= 32 - 8 * nb; emulate_step() 1911 if (regs->msr & MSR_LE) emulate_step() 1915 !(regs->msr & MSR_PR) && emulate_step() 1916 op.ea >= regs->gpr[1] - STACK_INT_FRAME_SIZE) { emulate_step() 1917 err = handle_stack_update(op.ea, regs); emulate_step() 1920 err = write_mem(op.val, op.ea, size, regs); emulate_step() 1925 if (regs->msr & MSR_LE) emulate_step() 1928 err = do_fp_store(op.reg, do_stfs, op.ea, size, regs); emulate_step() 1930 err = do_fp_store(op.reg, do_stfd, op.ea, size, regs); emulate_step() 1935 if (regs->msr & MSR_LE) emulate_step() 1937 err = do_vec_store(op.reg, do_stvx, op.ea & ~0xfUL, regs); emulate_step() 1942 if (regs->msr & MSR_LE) emulate_step() 1944 err = do_vsx_store(op.reg, do_stxvd2x, op.ea, regs); emulate_step() 1948 if (regs->msr & MSR_LE) emulate_step() 1952 val = regs->gpr[rd]; emulate_step() 1958 err = write_mem(val, op.ea, nb, regs); emulate_step() 1967 regs->gpr[op.reg] = regs->msr & MSR_MASK; emulate_step() 1971 val = regs->gpr[op.reg]; emulate_step() 1976 regs->msr = (regs->msr & ~op.val) | (val & op.val); emulate_step() 1986 if (regs->gpr[0] == 0x1ebe && emulate_step() 1988 regs->msr ^= MSR_LE; emulate_step() 1991 regs->gpr[9] = regs->gpr[13]; emulate_step() 1992 regs->gpr[10] = MSR_KERNEL; emulate_step() 1993 regs->gpr[11] = regs->nip + 4; emulate_step() 1994 regs->gpr[12] = regs->msr & MSR_MASK; emulate_step() 1995 regs->gpr[13] = (unsigned long) get_paca(); emulate_step() 1996 regs->nip = (unsigned long) &system_call_common; emulate_step() 1997 regs->msr = MSR_KERNEL; emulate_step() 2010 regs->gpr[op.update_reg] = op.ea; emulate_step() 2013 regs->nip = truncate_if_32bit(regs->msr, regs->nip + 4); emulate_step() 128 xform_ea(unsigned int instr, struct pt_regs *regs) xform_ea() argument 199 read_mem_unaligned(unsigned long *dest, unsigned long ea, int nb, struct pt_regs *regs) read_mem_unaligned() argument 250 read_mem(unsigned long *dest, unsigned long ea, int nb, struct pt_regs *regs) read_mem() argument 284 write_mem_unaligned(unsigned long val, unsigned long ea, int nb, struct pt_regs *regs) write_mem_unaligned() argument 327 write_mem(unsigned long val, unsigned long ea, int nb, struct pt_regs *regs) write_mem() argument 342 do_fp_load(int rn, int (*func)(int, unsigned long), unsigned long ea, int nb, struct pt_regs *regs) do_fp_load() argument 383 do_fp_store(int rn, int (*func)(int, unsigned long), unsigned long ea, int nb, struct pt_regs *regs) do_fp_store() argument 431 do_vec_load(int rn, int (*func)(int, unsigned long), unsigned long ea, struct pt_regs *regs) do_vec_load() argument 439 do_vec_store(int rn, int (*func)(int, unsigned long), unsigned long ea, struct pt_regs *regs) do_vec_store() argument 449 do_vsx_load(int rn, int (*func)(int, unsigned long), unsigned long ea, struct pt_regs *regs) do_vsx_load() argument 467 do_vsx_store(int rn, int (*func)(int, unsigned long), unsigned long ea, struct pt_regs *regs) do_vsx_store() argument
|
/linux-4.1.27/arch/nios2/kernel/ |
H A D | signal.c | 37 static inline int rt_restore_ucontext(struct pt_regs *regs, rt_restore_ucontext() argument 52 err |= __get_user(regs->r1, &gregs[0]); rt_restore_ucontext() 53 err |= __get_user(regs->r2, &gregs[1]); rt_restore_ucontext() 54 err |= __get_user(regs->r3, &gregs[2]); rt_restore_ucontext() 55 err |= __get_user(regs->r4, &gregs[3]); rt_restore_ucontext() 56 err |= __get_user(regs->r5, &gregs[4]); rt_restore_ucontext() 57 err |= __get_user(regs->r6, &gregs[5]); rt_restore_ucontext() 58 err |= __get_user(regs->r7, &gregs[6]); rt_restore_ucontext() 59 err |= __get_user(regs->r8, &gregs[7]); rt_restore_ucontext() 60 err |= __get_user(regs->r9, &gregs[8]); rt_restore_ucontext() 61 err |= __get_user(regs->r10, &gregs[9]); rt_restore_ucontext() 62 err |= __get_user(regs->r11, &gregs[10]); rt_restore_ucontext() 63 err |= __get_user(regs->r12, &gregs[11]); rt_restore_ucontext() 64 err |= __get_user(regs->r13, &gregs[12]); rt_restore_ucontext() 65 err |= __get_user(regs->r14, &gregs[13]); rt_restore_ucontext() 66 err |= __get_user(regs->r15, &gregs[14]); rt_restore_ucontext() 83 err |= __get_user(regs->ea, &gregs[27]); rt_restore_ucontext() 85 err |= __get_user(regs->ra, &gregs[23]); rt_restore_ucontext() 86 err |= __get_user(regs->sp, &gregs[28]); rt_restore_ucontext() 88 regs->orig_r2 = -1; /* disable syscall checks */ rt_restore_ucontext() 94 *pr2 = regs->r2; rt_restore_ucontext() 103 struct pt_regs *regs = (struct pt_regs *)(sw + 1); do_rt_sigreturn() local 105 struct rt_sigframe *frame = (struct rt_sigframe *) regs->sp; do_rt_sigreturn() 117 if (rt_restore_ucontext(regs, sw, &frame->uc, &rval)) do_rt_sigreturn() 127 static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs) rt_setup_ucontext() argument 129 struct switch_stack *sw = (struct switch_stack *)regs - 1; rt_setup_ucontext() 134 err |= __put_user(regs->r1, &gregs[0]); rt_setup_ucontext() 135 err |= __put_user(regs->r2, &gregs[1]); rt_setup_ucontext() 136 err |= __put_user(regs->r3, &gregs[2]); rt_setup_ucontext() 137 err |= __put_user(regs->r4, &gregs[3]); rt_setup_ucontext() 138 err |= __put_user(regs->r5, &gregs[4]); rt_setup_ucontext() 139 err |= __put_user(regs->r6, &gregs[5]); rt_setup_ucontext() 140 err |= __put_user(regs->r7, &gregs[6]); rt_setup_ucontext() 141 err |= __put_user(regs->r8, &gregs[7]); rt_setup_ucontext() 142 err |= __put_user(regs->r9, &gregs[8]); rt_setup_ucontext() 143 err |= __put_user(regs->r10, &gregs[9]); rt_setup_ucontext() 144 err |= __put_user(regs->r11, &gregs[10]); rt_setup_ucontext() 145 err |= __put_user(regs->r12, &gregs[11]); rt_setup_ucontext() 146 err |= __put_user(regs->r13, &gregs[12]); rt_setup_ucontext() 147 err |= __put_user(regs->r14, &gregs[13]); rt_setup_ucontext() 148 err |= __put_user(regs->r15, &gregs[14]); rt_setup_ucontext() 157 err |= __put_user(regs->ra, &gregs[23]); rt_setup_ucontext() 160 err |= __put_user(regs->ea, &gregs[27]); rt_setup_ucontext() 161 err |= __put_user(regs->sp, &gregs[28]); rt_setup_ucontext() 165 static inline void *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, get_sigframe() argument 171 usp = regs->sp; get_sigframe() 181 struct pt_regs *regs) setup_rt_frame() 186 frame = get_sigframe(ksig, regs, sizeof(*frame)); setup_rt_frame() 194 err |= __save_altstack(&frame->uc.uc_stack, regs->sp); setup_rt_frame() 195 err |= rt_setup_ucontext(&frame->uc, regs); setup_rt_frame() 203 regs->ra = (unsigned long) (0x1044); setup_rt_frame() 206 regs->sp = (unsigned long) frame; setup_rt_frame() 207 regs->r4 = (unsigned long) ksig->sig; setup_rt_frame() 208 regs->r5 = (unsigned long) &frame->info; setup_rt_frame() 209 regs->r6 = (unsigned long) &frame->uc; setup_rt_frame() 210 regs->ea = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 221 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 227 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 232 static int do_signal(struct pt_regs *regs) do_signal() argument 238 current->thread.kregs = regs; do_signal() 243 if (regs->orig_r2 >= 0) { do_signal() 244 continue_addr = regs->ea; do_signal() 246 retval = regs->r2; do_signal() 259 regs->r2 = regs->orig_r2; do_signal() 260 regs->r7 = regs->orig_r7; do_signal() 261 regs->ea = restart_addr; do_signal() 268 if (unlikely(restart && regs->ea == restart_addr)) { do_signal() 273 regs->r2 = EINTR; do_signal() 274 regs->r7 = 1; do_signal() 275 regs->ea = continue_addr; do_signal() 278 handle_signal(&ksig, regs); do_signal() 285 if (unlikely(restart) && regs->ea == restart_addr) { do_signal() 286 regs->ea = continue_addr; do_signal() 287 regs->r2 = __NR_restart_syscall; do_signal() 298 asmlinkage int do_notify_resume(struct pt_regs *regs) do_notify_resume() argument 305 if (!user_mode(regs)) do_notify_resume() 309 int restart = do_signal(regs); do_notify_resume() 320 tracehook_notify_resume(regs); do_notify_resume() 180 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
/linux-4.1.27/arch/m32r/kernel/ |
H A D | align.c | 10 static int get_reg(struct pt_regs *regs, int nr) get_reg() argument 15 val = *(unsigned long *)(®s->r0 + nr); get_reg() 17 val = *(unsigned long *)(®s->r4 + (nr - 4)); get_reg() 19 val = *(unsigned long *)(®s->r7 + (nr - 7)); get_reg() 21 val = *(unsigned long *)(®s->fp + (nr - 13)); get_reg() 26 static void set_reg(struct pt_regs *regs, int nr, int val) set_reg() argument 29 *(unsigned long *)(®s->r0 + nr) = val; set_reg() 31 *(unsigned long *)(®s->r4 + (nr - 4)) = val; set_reg() 33 *(unsigned long *)(®s->r7 + (nr - 7)) = val; set_reg() 35 *(unsigned long *)(®s->fp + (nr - 13)) = val; set_reg() 81 static int emu_addi(unsigned short insn, struct pt_regs *regs) emu_addi() argument 87 val = get_reg(regs, dest); emu_addi() 89 set_reg(regs, dest, val); emu_addi() 94 static int emu_ldi(unsigned short insn, struct pt_regs *regs) emu_ldi() argument 98 set_reg(regs, REG1(insn), (int)imm); emu_ldi() 103 static int emu_add(unsigned short insn, struct pt_regs *regs) emu_add() argument 109 val = get_reg(regs, dest); emu_add() 110 val += get_reg(regs, src); emu_add() 111 set_reg(regs, dest, val); emu_add() 116 static int emu_addx(unsigned short insn, struct pt_regs *regs) emu_addx() argument 121 val = regs->psw & PSW_BC ? 1 : 0; emu_addx() 122 tmp = get_reg(regs, dest); emu_addx() 124 val += (unsigned int)get_reg(regs, REG2(insn)); emu_addx() 125 set_reg(regs, dest, val); emu_addx() 129 regs->psw |= PSW_BC; emu_addx() 131 regs->psw &= ~(PSW_BC); emu_addx() 136 static int emu_and(unsigned short insn, struct pt_regs *regs) emu_and() argument 141 val = get_reg(regs, dest); emu_and() 142 val &= get_reg(regs, REG2(insn)); emu_and() 143 set_reg(regs, dest, val); emu_and() 148 static int emu_cmp(unsigned short insn, struct pt_regs *regs) emu_cmp() argument 150 if (get_reg(regs, REG1(insn)) < get_reg(regs, REG2(insn))) emu_cmp() 151 regs->psw |= PSW_BC; emu_cmp() 153 regs->psw &= ~(PSW_BC); emu_cmp() 158 static int emu_cmpeq(unsigned short insn, struct pt_regs *regs) emu_cmpeq() argument 160 if (get_reg(regs, REG1(insn)) == get_reg(regs, REG2(insn))) emu_cmpeq() 161 regs->psw |= PSW_BC; emu_cmpeq() 163 regs->psw &= ~(PSW_BC); emu_cmpeq() 168 static int emu_cmpu(unsigned short insn, struct pt_regs *regs) emu_cmpu() argument 170 if ((unsigned int)get_reg(regs, REG1(insn)) emu_cmpu() 171 < (unsigned int)get_reg(regs, REG2(insn))) emu_cmpu() 172 regs->psw |= PSW_BC; emu_cmpu() 174 regs->psw &= ~(PSW_BC); emu_cmpu() 179 static int emu_cmpz(unsigned short insn, struct pt_regs *regs) emu_cmpz() argument 181 if (!get_reg(regs, REG2(insn))) emu_cmpz() 182 regs->psw |= PSW_BC; emu_cmpz() 184 regs->psw &= ~(PSW_BC); emu_cmpz() 189 static int emu_mv(unsigned short insn, struct pt_regs *regs) emu_mv() argument 193 val = get_reg(regs, REG2(insn)); emu_mv() 194 set_reg(regs, REG1(insn), val); emu_mv() 199 static int emu_neg(unsigned short insn, struct pt_regs *regs) emu_neg() argument 203 val = get_reg(regs, REG2(insn)); emu_neg() 204 set_reg(regs, REG1(insn), 0 - val); emu_neg() 209 static int emu_not(unsigned short insn, struct pt_regs *regs) emu_not() argument 213 val = get_reg(regs, REG2(insn)); emu_not() 214 set_reg(regs, REG1(insn), ~val); emu_not() 219 static int emu_or(unsigned short insn, struct pt_regs *regs) emu_or() argument 224 val = get_reg(regs, dest); emu_or() 225 val |= get_reg(regs, REG2(insn)); emu_or() 226 set_reg(regs, dest, val); emu_or() 231 static int emu_sub(unsigned short insn, struct pt_regs *regs) emu_sub() argument 236 val = get_reg(regs, dest); emu_sub() 237 val -= get_reg(regs, REG2(insn)); emu_sub() 238 set_reg(regs, dest, val); emu_sub() 243 static int emu_subx(unsigned short insn, struct pt_regs *regs) emu_subx() argument 248 val = tmp = get_reg(regs, dest); emu_subx() 249 val -= (unsigned int)get_reg(regs, REG2(insn)); emu_subx() 250 val -= regs->psw & PSW_BC ? 1 : 0; emu_subx() 251 set_reg(regs, dest, val); emu_subx() 255 regs->psw |= PSW_BC; emu_subx() 257 regs->psw &= ~(PSW_BC); emu_subx() 262 static int emu_xor(unsigned short insn, struct pt_regs *regs) emu_xor() argument 267 val = (unsigned int)get_reg(regs, dest); emu_xor() 268 val ^= (unsigned int)get_reg(regs, REG2(insn)); emu_xor() 269 set_reg(regs, dest, val); emu_xor() 274 static int emu_mul(unsigned short insn, struct pt_regs *regs) emu_mul() argument 279 reg1 = get_reg(regs, dest); emu_mul() 280 reg2 = get_reg(regs, REG2(insn)); emu_mul() 287 set_reg(regs, dest, reg1); emu_mul() 292 static int emu_mullo_a0(unsigned short insn, struct pt_regs *regs) emu_mullo_a0() argument 296 reg1 = get_reg(regs, REG1(insn)); emu_mullo_a0() 297 reg2 = get_reg(regs, REG2(insn)); emu_mullo_a0() 306 regs->acc0h = reg1; emu_mullo_a0() 307 regs->acc0l = reg2; emu_mullo_a0() 312 static int emu_mullo_a1(unsigned short insn, struct pt_regs *regs) emu_mullo_a1() argument 316 reg1 = get_reg(regs, REG1(insn)); emu_mullo_a1() 317 reg2 = get_reg(regs, REG2(insn)); emu_mullo_a1() 326 regs->acc1h = reg1; emu_mullo_a1() 327 regs->acc1l = reg2; emu_mullo_a1() 332 static int emu_mvfacmi_a0(unsigned short insn, struct pt_regs *regs) emu_mvfacmi_a0() argument 336 val = (regs->acc0h << 16) | (regs->acc0l >> 16); emu_mvfacmi_a0() 337 set_reg(regs, REG1(insn), (int)val); emu_mvfacmi_a0() 342 static int emu_mvfacmi_a1(unsigned short insn, struct pt_regs *regs) emu_mvfacmi_a1() argument 346 val = (regs->acc1h << 16) | (regs->acc1l >> 16); emu_mvfacmi_a1() 347 set_reg(regs, REG1(insn), (int)val); emu_mvfacmi_a1() 352 static int emu_m32r2(unsigned short insn, struct pt_regs *regs) emu_m32r2() argument 361 res = emu_addi(insn, regs); emu_m32r2() 364 res = emu_ldi(insn, regs); emu_m32r2() 375 res = emu_add(insn, regs); emu_m32r2() 378 res = emu_addx(insn, regs); emu_m32r2() 381 res = emu_and(insn, regs); emu_m32r2() 384 res = emu_cmp(insn, regs); emu_m32r2() 387 res = emu_cmpeq(insn, regs); emu_m32r2() 390 res = emu_cmpu(insn, regs); emu_m32r2() 393 res = emu_cmpz(insn, regs); emu_m32r2() 396 res = emu_mv(insn, regs); emu_m32r2() 399 res = emu_neg(insn, regs); emu_m32r2() 402 res = emu_not(insn, regs); emu_m32r2() 405 res = emu_or(insn, regs); emu_m32r2() 408 res = emu_sub(insn, regs); emu_m32r2() 411 res = emu_subx(insn, regs); emu_m32r2() 414 res = emu_xor(insn, regs); emu_m32r2() 417 res = emu_mul(insn, regs); emu_m32r2() 420 res = emu_mullo_a0(insn, regs); emu_m32r2() 423 res = emu_mullo_a1(insn, regs); emu_m32r2() 434 res = emu_mvfacmi_a0(insn, regs); emu_m32r2() 437 res = emu_mvfacmi_a1(insn, regs); emu_m32r2() 459 static int insn_check(unsigned long insn, struct pt_regs *regs, insn_check() argument 471 regs->bpc += 4; insn_check() 475 if (!(regs->bpc & 0x2) && insn & 0x8000) { insn_check() 476 res = emu_m32r2((unsigned short)insn, regs); insn_check() 477 regs->bpc += 4; insn_check() 480 regs->bpc += 2; insn_check() 486 static int emu_ld(unsigned long insn32, struct pt_regs *regs) emu_ld() argument 495 ucp = (unsigned char *)get_reg(regs, src); emu_ld() 497 if (insn_check(insn32, regs, &ucp)) emu_ld() 511 set_reg(regs, REG1(insn16), val); emu_ld() 515 set_reg(regs, src, (unsigned long)(ucp + 4)); emu_ld() 520 static int emu_st(unsigned long insn32, struct pt_regs *regs) emu_st() argument 530 ucp = (unsigned char *)get_reg(regs, src2); emu_st() 532 if (insn_check(insn32, regs, &ucp)) emu_st() 536 val = get_reg(regs, REG1(insn16)); emu_st() 547 set_reg(regs, src2, (unsigned long)ucp); emu_st() 556 set_reg(regs, src2, (unsigned long)ucp); emu_st() 562 int handle_unaligned_access(unsigned long insn32, struct pt_regs *regs) handle_unaligned_access() argument 574 if ((insn16 & 0x8000) && (regs->bpc & 3)) handle_unaligned_access() 578 res = emu_ld(insn32, regs); handle_unaligned_access() 580 res = emu_st(insn32, regs); handle_unaligned_access()
|
H A D | signal.c | 45 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, restore_sigcontext() argument 53 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) restore_sigcontext() 82 regs->syscall_nr = -1; /* disable syscall checks */ restore_sigcontext() 91 unsigned long r5, unsigned long r6, struct pt_regs *regs) sys_rt_sigreturn() 93 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->spu; sys_rt_sigreturn() 104 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &result)) sys_rt_sigreturn() 122 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, setup_sigcontext() argument 127 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x) setup_sigcontext() 171 struct pt_regs *regs) setup_rt_frame() 177 frame = get_sigframe(ksig, regs->spu, sizeof(*frame)); setup_rt_frame() 195 err |= __save_altstack(&frame->uc.uc_stack, regs->spu); setup_rt_frame() 196 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); setup_rt_frame() 202 regs->lr = (unsigned long)ksig->ka.sa.sa_restorer; setup_rt_frame() 205 regs->spu = (unsigned long)frame; setup_rt_frame() 206 regs->r0 = sig; /* Arg for signal handler */ setup_rt_frame() 207 regs->r1 = (unsigned long)&frame->info; setup_rt_frame() 208 regs->r2 = (unsigned long)&frame->uc; setup_rt_frame() 209 regs->bpc = (unsigned long)ksig->ka.sa.sa_handler; setup_rt_frame() 213 current->comm, current->pid, frame, regs->pc); setup_rt_frame() 219 static int prev_insn(struct pt_regs *regs) prev_insn() argument 222 if (get_user(inst, (u16 __user *)(regs->bpc - 2))) prev_insn() 225 regs->bpc -= 2; prev_insn() 227 regs->bpc -= 4; prev_insn() 228 regs->syscall_nr = -1; prev_insn() 237 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 242 if (regs->syscall_nr >= 0) { handle_signal() 244 switch (regs->r0) { handle_signal() 247 regs->r0 = -EINTR; handle_signal() 252 regs->r0 = -EINTR; handle_signal() 257 regs->r0 = regs->orig_r0; handle_signal() 258 if (prev_insn(regs) < 0) handle_signal() 264 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); handle_signal() 274 static void do_signal(struct pt_regs *regs) do_signal() argument 284 if (!user_mode(regs)) do_signal() 295 handle_signal(&ksig, regs); do_signal() 301 if (regs->syscall_nr >= 0) { do_signal() 303 if (regs->r0 == -ERESTARTNOHAND || do_signal() 304 regs->r0 == -ERESTARTSYS || do_signal() 305 regs->r0 == -ERESTARTNOINTR) { do_signal() 306 regs->r0 = regs->orig_r0; do_signal() 307 prev_insn(regs); do_signal() 308 } else if (regs->r0 == -ERESTART_RESTARTBLOCK){ do_signal() 309 regs->r0 = regs->orig_r0; do_signal() 310 regs->r7 = __NR_restart_syscall; do_signal() 311 prev_insn(regs); do_signal() 321 void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags) do_notify_resume() argument 329 do_signal(regs); do_notify_resume() 333 tracehook_notify_resume(regs); do_notify_resume() 89 sys_rt_sigreturn(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs *regs) sys_rt_sigreturn() argument 170 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | process.c | 73 void show_regs(struct pt_regs * regs) show_regs() argument 79 regs->bpc, regs->psw, regs->lr, regs->fp); show_regs() 81 regs->bbpc, regs->bbpsw, regs->spu, regs->spi); show_regs() 83 regs->r0, regs->r1, regs->r2, regs->r3); show_regs() 85 regs->r4, regs->r5, regs->r6, regs->r7); show_regs() 87 regs->r8, regs->r9, regs->r10, regs->r11); show_regs() 89 regs->r12); show_regs() 93 regs->acc0h, regs->acc0l); show_regs() 95 regs->acc1h, regs->acc1l); show_regs() 98 regs->acc0h, regs->acc0l); show_regs() 126 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) dump_fpu() argument
|
/linux-4.1.27/arch/openrisc/kernel/ |
H A D | traps.c | 108 void show_registers(struct pt_regs *regs) show_registers() argument 114 esp = (unsigned long)(®s->sp); show_registers() 115 if (user_mode(regs)) show_registers() 120 smp_processor_id(), regs->pc, regs->sr, regs->sp); show_registers() 122 0L, regs->gpr[1], regs->gpr[2], regs->gpr[3]); show_registers() 124 regs->gpr[4], regs->gpr[5], regs->gpr[6], regs->gpr[7]); show_registers() 126 regs->gpr[8], regs->gpr[9], regs->gpr[10], regs->gpr[11]); show_registers() 128 regs->gpr[12], regs->gpr[13], regs->gpr[14], regs->gpr[15]); show_registers() 130 regs->gpr[16], regs->gpr[17], regs->gpr[18], regs->gpr[19]); show_registers() 132 regs->gpr[20], regs->gpr[21], regs->gpr[22], regs->gpr[23]); show_registers() 134 regs->gpr[24], regs->gpr[25], regs->gpr[26], regs->gpr[27]); show_registers() 136 regs->gpr[28], regs->gpr[29], regs->gpr[30], regs->gpr[31]); show_registers() 138 regs->gpr[11], regs->orig_gpr11); show_registers() 152 if (regs->pc < PAGE_OFFSET) show_registers() 157 if (__get_user(c, &((unsigned char *)regs->pc)[i])) { show_registers() 172 void nommu_dump_state(struct pt_regs *regs, nommu_dump_state() argument 176 unsigned long addr, stack = regs->sp; nommu_dump_state() 182 0, regs->pc, regs->sr, regs->sp); nommu_dump_state() 184 0L, regs->gpr[1], regs->gpr[2], regs->gpr[3]); nommu_dump_state() 186 regs->gpr[4], regs->gpr[5], regs->gpr[6], regs->gpr[7]); nommu_dump_state() 188 regs->gpr[8], regs->gpr[9], regs->gpr[10], regs->gpr[11]); nommu_dump_state() 190 regs->gpr[12], regs->gpr[13], regs->gpr[14], regs->gpr[15]); nommu_dump_state() 192 regs->gpr[16], regs->gpr[17], regs->gpr[18], regs->gpr[19]); nommu_dump_state() 194 regs->gpr[20], regs->gpr[21], regs->gpr[22], regs->gpr[23]); nommu_dump_state() 196 regs->gpr[24], regs->gpr[25], regs->gpr[26], regs->gpr[27]); nommu_dump_state() 198 regs->gpr[28], regs->gpr[29], regs->gpr[30], regs->gpr[31]); nommu_dump_state() 200 regs->gpr[11], regs->orig_gpr11); nommu_dump_state() 238 c = ((unsigned char *)(__pa(regs->pc)))[i]; nommu_dump_state() 249 void die(const char *str, struct pt_regs *regs, long err) die() argument 254 show_registers(regs); die() 268 void die_if_kernel(const char *str, struct pt_regs *regs, long err) die_if_kernel() argument 270 if (user_mode(regs)) die_if_kernel() 273 die(str, regs, err); die_if_kernel() 276 void unhandled_exception(struct pt_regs *regs, int ea, int vector) unhandled_exception() argument 280 die("Oops", regs, 9); unhandled_exception() 288 asmlinkage void do_trap(struct pt_regs *regs, unsigned long address) do_trap() argument 297 regs->pc += 4; do_trap() 300 asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address) do_unaligned_access() argument 304 if (user_mode(regs)) { do_unaligned_access() 313 show_registers(regs); do_unaligned_access() 314 die("Die:", regs, address); do_unaligned_access() 319 asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address) do_bus_fault() argument 323 if (user_mode(regs)) { do_bus_fault() 332 show_registers(regs); do_bus_fault() 333 die("Die:", regs, address); do_bus_fault() 337 asmlinkage void do_illegal_instruction(struct pt_regs *regs, do_illegal_instruction() argument 342 if (user_mode(regs)) { do_illegal_instruction() 352 show_registers(regs); do_illegal_instruction() 353 die("Die:", regs, address); do_illegal_instruction()
|
H A D | signal.c | 43 static int restore_sigcontext(struct pt_regs *regs, restore_sigcontext() argument 52 * Restore the regs from &sc->regs. restore_sigcontext() 56 err |= __copy_from_user(regs, sc->regs.gpr, 32 * sizeof(unsigned long)); restore_sigcontext() 57 err |= __copy_from_user(®s->pc, &sc->regs.pc, sizeof(unsigned long)); restore_sigcontext() 58 err |= __copy_from_user(®s->sr, &sc->regs.sr, sizeof(unsigned long)); restore_sigcontext() 61 regs->sr &= ~SPR_SR_SM; restore_sigcontext() 63 regs->orig_gpr11 = -1; /* Avoid syscall restart checks */ restore_sigcontext() 65 /* TODO: the other ports use regs->orig_XX to disable syscall checks restore_sigcontext() 73 asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs) _sys_rt_sigreturn() argument 75 struct rt_sigframe *frame = (struct rt_sigframe __user *)regs->sp; _sys_rt_sigreturn() 93 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) _sys_rt_sigreturn() 99 return regs->gpr[11]; _sys_rt_sigreturn() 110 static int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext() argument 114 /* copy the regs */ setup_sigcontext() 118 err |= __copy_to_user(sc->regs.gpr, regs, 32 * sizeof(unsigned long)); setup_sigcontext() 119 err |= __copy_to_user(&sc->regs.pc, ®s->pc, sizeof(unsigned long)); setup_sigcontext() 120 err |= __copy_to_user(&sc->regs.sr, ®s->sr, sizeof(unsigned long)); setup_sigcontext() 136 struct pt_regs *regs, size_t frame_size) get_sigframe() 138 unsigned long sp = regs->sp; get_sigframe() 156 struct pt_regs *regs) setup_rt_frame() 162 frame = get_sigframe(ksig, regs, sizeof(*frame)); setup_rt_frame() 174 err |= __save_altstack(&frame->uc.uc_stack, regs->sp); setup_rt_frame() 175 err |= setup_sigcontext(regs, &frame->uc.uc_mcontext); setup_rt_frame() 197 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; /* what we enter NOW */ setup_rt_frame() 198 regs->gpr[9] = (unsigned long)return_ip; /* what we enter LATER */ setup_rt_frame() 199 regs->gpr[3] = (unsigned long)ksig->sig; /* arg 1: signo */ setup_rt_frame() 200 regs->gpr[4] = (unsigned long)&frame->info; /* arg 2: (siginfo_t*) */ setup_rt_frame() 201 regs->gpr[5] = (unsigned long)&frame->uc; /* arg 3: ucontext */ setup_rt_frame() 204 regs->sp = (unsigned long)frame; setup_rt_frame() 210 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 214 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); handle_signal() 224 * Also note that the regs structure given here as an argument, is the latest 227 * we can use user_mode(regs) to see if we came directly from kernel or user 231 int do_signal(struct pt_regs *regs, int syscall) do_signal() argument 240 continue_addr = regs->pc; do_signal() 242 retval = regs->gpr[11]; do_signal() 256 regs->gpr[11] = regs->orig_gpr11; do_signal() 257 regs->pc = restart_addr; do_signal() 269 if (unlikely(restart) && regs->pc == restart_addr) { do_signal() 275 regs->gpr[11] = -EINTR; do_signal() 276 regs->pc = continue_addr; do_signal() 279 handle_signal(&ksig, regs); do_signal() 287 if (unlikely(restart) && regs->pc == restart_addr) { do_signal() 288 regs->pc = continue_addr; do_signal() 297 do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) do_work_pending() argument 303 if (unlikely(!user_mode(regs))) do_work_pending() 307 int restart = do_signal(regs, syscall); do_work_pending() 319 tracehook_notify_resume(regs); do_work_pending() 135 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size) get_sigframe() argument 155 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
/linux-4.1.27/arch/mn10300/include/asm/ |
H A D | syscall.h | 22 static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 24 return regs->orig_d0; syscall_get_nr() 28 struct pt_regs *regs) syscall_rollback() 30 regs->d0 = regs->orig_d0; syscall_rollback() 34 struct pt_regs *regs) syscall_get_error() 36 unsigned long error = regs->d0; syscall_get_error() 41 struct pt_regs *regs) syscall_get_return_value() 43 return regs->d0; syscall_get_return_value() 47 struct pt_regs *regs, syscall_set_return_value() 50 regs->d0 = (long) error ?: val; syscall_set_return_value() 54 struct pt_regs *regs, syscall_get_arguments() 61 *args++ = regs->a0; syscall_get_arguments() 64 *args++ = regs->d1; syscall_get_arguments() 67 *args++ = regs->a3; syscall_get_arguments() 70 *args++ = regs->a2; syscall_get_arguments() 73 *args++ = regs->d3; syscall_get_arguments() 76 *args++ = regs->d2; syscall_get_arguments() 86 struct pt_regs *regs, syscall_set_arguments() 93 regs->a0 = *args++; syscall_set_arguments() 96 regs->d1 = *args++; syscall_set_arguments() 99 regs->a3 = *args++; syscall_set_arguments() 102 regs->a2 = *args++; syscall_set_arguments() 105 regs->d3 = *args++; syscall_set_arguments() 108 regs->d2 = *args++; syscall_set_arguments() 27 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 33 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 40 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 46 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 53 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 85 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | ptrace.h | 17 #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) 18 #define instruction_pointer(regs) ((regs)->pc) 19 #define user_stack_pointer(regs) ((regs)->sp) 24 #define profile_pc(regs) ((regs)->pc)
|
H A D | elf.h | 97 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is 101 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 103 pr_reg[0] = regs->a3; \ 104 pr_reg[1] = regs->a2; \ 105 pr_reg[2] = regs->d3; \ 106 pr_reg[3] = regs->d2; \ 107 pr_reg[4] = regs->mcvf; \ 108 pr_reg[5] = regs->mcrl; \ 109 pr_reg[6] = regs->mcrh; \ 110 pr_reg[7] = regs->mdrq; \ 111 pr_reg[8] = regs->e1; \ 112 pr_reg[9] = regs->e0; \ 113 pr_reg[10] = regs->e7; \ 114 pr_reg[11] = regs->e6; \ 115 pr_reg[12] = regs->e5; \ 116 pr_reg[13] = regs->e4; \ 117 pr_reg[14] = regs->e3; \ 118 pr_reg[15] = regs->e2; \ 119 pr_reg[16] = regs->sp; \ 120 pr_reg[17] = regs->lar; \ 121 pr_reg[18] = regs->lir; \ 122 pr_reg[19] = regs->mdr; \ 123 pr_reg[20] = regs->a1; \ 124 pr_reg[21] = regs->a0; \ 125 pr_reg[22] = regs->d1; \ 126 pr_reg[23] = regs->d0; \ 127 pr_reg[24] = regs->orig_d0; \ 128 pr_reg[25] = regs->epsw; \ 129 pr_reg[26] = regs->pc; \
|
/linux-4.1.27/arch/ia64/include/asm/ |
H A D | syscall.h | 21 struct pt_regs *regs) syscall_get_nr() 23 if ((long)regs->cr_ifs < 0) /* Not a syscall */ syscall_get_nr() 26 return regs->r15; syscall_get_nr() 30 struct pt_regs *regs) syscall_rollback() 36 struct pt_regs *regs) syscall_get_error() 38 return regs->r10 == -1 ? regs->r8:0; syscall_get_error() 42 struct pt_regs *regs) syscall_get_return_value() 44 return regs->r8; syscall_get_return_value() 48 struct pt_regs *regs, syscall_set_return_value() 53 regs->r8 = -error; syscall_set_return_value() 54 regs->r10 = -1; syscall_set_return_value() 56 regs->r8 = val; syscall_set_return_value() 57 regs->r10 = 0; syscall_set_return_value() 62 struct pt_regs *regs, unsigned int i, unsigned int n, 65 struct pt_regs *regs, syscall_get_arguments() 71 ia64_syscall_get_set_arguments(task, regs, i, n, args, 0); syscall_get_arguments() 75 struct pt_regs *regs, syscall_set_arguments() 81 ia64_syscall_get_set_arguments(task, regs, i, n, args, 1); syscall_set_arguments() 20 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 29 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 35 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 41 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 47 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 64 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 74 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/sh/mm/ |
H A D | extable_32.c | 10 int fixup_exception(struct pt_regs *regs) fixup_exception() argument 14 fixup = search_exception_tables(regs->pc); fixup_exception() 16 regs->pc = fixup->fixup; fixup_exception()
|
/linux-4.1.27/arch/metag/mm/ |
H A D | extable.c | 5 int fixup_exception(struct pt_regs *regs) fixup_exception() argument 8 unsigned long pc = instruction_pointer(regs); fixup_exception() 12 regs->ctx.CurrPC = fixup->fixup; fixup_exception()
|
/linux-4.1.27/arch/arm64/mm/ |
H A D | extable.c | 8 int fixup_exception(struct pt_regs *regs) fixup_exception() argument 12 fixup = search_exception_tables(instruction_pointer(regs)); fixup_exception() 14 regs->pc = fixup->fixup; fixup_exception()
|
/linux-4.1.27/arch/m32r/mm/ |
H A D | extable.c | 8 int fixup_exception(struct pt_regs *regs) fixup_exception() argument 12 fixup = search_exception_tables(regs->bpc); fixup_exception() 14 regs->bpc = fixup->fixup; fixup_exception()
|
/linux-4.1.27/arch/mips/kernel/ |
H A D | mips-r2-to-r6-emul.c | 73 * @regs: Process register set 76 static inline int mipsr6_emul(struct pt_regs *regs, u32 ir) mipsr6_emul() argument 81 regs->regs[MIPSInst_RT(ir)] = mipsr6_emul() 82 (s32)regs->regs[MIPSInst_RS(ir)] + mipsr6_emul() 90 regs->regs[MIPSInst_RT(ir)] = mipsr6_emul() 91 (s64)regs->regs[MIPSInst_RS(ir)] + mipsr6_emul() 104 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 105 regs->regs[MIPSInst_RS(ir)] | mipsr6_emul() 106 regs->regs[MIPSInst_RT(ir)]; mipsr6_emul() 113 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 114 (s32)(((u32)regs->regs[MIPSInst_RT(ir)]) << mipsr6_emul() 122 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 123 (s32)(((u32)regs->regs[MIPSInst_RT(ir)]) >> mipsr6_emul() 131 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 132 (s32)((u32)regs->regs[MIPSInst_RS(ir)] + mipsr6_emul() 133 (u32)regs->regs[MIPSInst_RT(ir)]); mipsr6_emul() 140 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 141 (s32)((u32)regs->regs[MIPSInst_RS(ir)] - mipsr6_emul() 142 (u32)regs->regs[MIPSInst_RT(ir)]); mipsr6_emul() 149 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 150 (s64)(((u64)regs->regs[MIPSInst_RT(ir)]) << mipsr6_emul() 158 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 159 (s64)(((u64)regs->regs[MIPSInst_RT(ir)]) >> mipsr6_emul() 167 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 168 (u64)regs->regs[MIPSInst_RS(ir)] + mipsr6_emul() 169 (u64)regs->regs[MIPSInst_RT(ir)]; mipsr6_emul() 176 regs->regs[MIPSInst_RD(ir)] = mipsr6_emul() 177 (s64)((u64)regs->regs[MIPSInst_RS(ir)] - mipsr6_emul() 178 (u64)regs->regs[MIPSInst_RT(ir)]); mipsr6_emul() 192 * @regs: Process register set 197 static int movf_func(struct pt_regs *regs, u32 ir) movf_func() argument 206 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; movf_func() 215 * @regs: Process register set 220 static int movt_func(struct pt_regs *regs, u32 ir) movt_func() argument 229 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; movt_func() 245 static int jr_func(struct pt_regs *regs, u32 ir) jr_func() argument 251 if (delay_slot(regs)) jr_func() 255 nepc = regs->cp0_epc; jr_func() 257 regs->cp0_epc -= 4; jr_func() 258 epc = regs->cp0_epc; jr_func() 259 err = __compute_return_epc(regs); jr_func() 266 cepc = regs->cp0_epc; jr_func() 282 err = mipsr6_emul(regs, nir); jr_func() 284 regs->cp0_epc = nepc; jr_func() 285 err = mips_dsemul(regs, nir, cepc); jr_func() 297 * @regs: Process register set 302 static int movz_func(struct pt_regs *regs, u32 ir) movz_func() argument 304 if (((regs->regs[MIPSInst_RT(ir)]) == 0) && MIPSInst_RD(ir)) movz_func() 305 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; movz_func() 313 * @regs: Process register set 318 static int movn_func(struct pt_regs *regs, u32 ir) movn_func() argument 320 if (((regs->regs[MIPSInst_RT(ir)]) != 0) && MIPSInst_RD(ir)) movn_func() 321 regs->regs[MIPSInst_RD(ir)] = regs->regs[MIPSInst_RS(ir)]; movn_func() 329 * @regs: Process register set 334 static int mfhi_func(struct pt_regs *regs, u32 ir) mfhi_func() argument 337 regs->regs[MIPSInst_RD(ir)] = regs->hi; mfhi_func() 346 * @regs: Process register set 351 static int mthi_func(struct pt_regs *regs, u32 ir) mthi_func() argument 353 regs->hi = regs->regs[MIPSInst_RS(ir)]; mthi_func() 362 * @regs: Process register set 367 static int mflo_func(struct pt_regs *regs, u32 ir) mflo_func() argument 370 regs->regs[MIPSInst_RD(ir)] = regs->lo; mflo_func() 379 * @regs: Process register set 384 static int mtlo_func(struct pt_regs *regs, u32 ir) mtlo_func() argument 386 regs->lo = regs->regs[MIPSInst_RS(ir)]; mtlo_func() 395 * @regs: Process register set 400 static int mult_func(struct pt_regs *regs, u32 ir) mult_func() argument 405 rt = regs->regs[MIPSInst_RT(ir)]; mult_func() 406 rs = regs->regs[MIPSInst_RS(ir)]; mult_func() 410 regs->lo = (s64)rs; mult_func() 413 regs->hi = res; mult_func() 422 * @regs: Process register set 427 static int multu_func(struct pt_regs *regs, u32 ir) multu_func() argument 432 rt = regs->regs[MIPSInst_RT(ir)]; multu_func() 433 rs = regs->regs[MIPSInst_RS(ir)]; multu_func() 436 regs->lo = (s64)rt; multu_func() 437 regs->hi = (s64)(res >> 32); multu_func() 446 * @regs: Process register set 451 static int div_func(struct pt_regs *regs, u32 ir) div_func() argument 455 rt = regs->regs[MIPSInst_RT(ir)]; div_func() 456 rs = regs->regs[MIPSInst_RS(ir)]; div_func() 458 regs->lo = (s64)(rs / rt); div_func() 459 regs->hi = (s64)(rs % rt); div_func() 468 * @regs: Process register set 473 static int divu_func(struct pt_regs *regs, u32 ir) divu_func() argument 477 rt = regs->regs[MIPSInst_RT(ir)]; divu_func() 478 rs = regs->regs[MIPSInst_RS(ir)]; divu_func() 480 regs->lo = (s64)(rs / rt); divu_func() 481 regs->hi = (s64)(rs % rt); divu_func() 490 * @regs: Process register set 495 static int dmult_func(struct pt_regs *regs, u32 ir) dmult_func() argument 503 rt = regs->regs[MIPSInst_RT(ir)]; dmult_func() 504 rs = regs->regs[MIPSInst_RS(ir)]; dmult_func() 507 regs->lo = res; dmult_func() 513 regs->hi = res; dmult_func() 522 * @regs: Process register set 527 static int dmultu_func(struct pt_regs *regs, u32 ir) dmultu_func() argument 535 rt = regs->regs[MIPSInst_RT(ir)]; dmultu_func() 536 rs = regs->regs[MIPSInst_RS(ir)]; dmultu_func() 539 regs->lo = res; dmultu_func() 545 regs->hi = res; dmultu_func() 554 * @regs: Process register set 559 static int ddiv_func(struct pt_regs *regs, u32 ir) ddiv_func() argument 566 rt = regs->regs[MIPSInst_RT(ir)]; ddiv_func() 567 rs = regs->regs[MIPSInst_RS(ir)]; ddiv_func() 569 regs->lo = rs / rt; ddiv_func() 570 regs->hi = rs % rt; ddiv_func() 579 * @regs: Process register set 584 static int ddivu_func(struct pt_regs *regs, u32 ir) ddivu_func() argument 591 rt = regs->regs[MIPSInst_RT(ir)]; ddivu_func() 592 rs = regs->regs[MIPSInst_RS(ir)]; ddivu_func() 594 regs->lo = rs / rt; ddivu_func() 595 regs->hi = rs % rt; ddivu_func() 626 * @regs: Process register set 631 static int madd_func(struct pt_regs *regs, u32 ir) madd_func() argument 636 rt = regs->regs[MIPSInst_RT(ir)]; madd_func() 637 rs = regs->regs[MIPSInst_RS(ir)]; madd_func() 639 rt = regs->hi; madd_func() 640 rs = regs->lo; madd_func() 644 regs->lo = (s64)rt; madd_func() 646 regs->hi = (s64)rs; madd_func() 655 * @regs: Process register set 660 static int maddu_func(struct pt_regs *regs, u32 ir) maddu_func() argument 665 rt = regs->regs[MIPSInst_RT(ir)]; maddu_func() 666 rs = regs->regs[MIPSInst_RS(ir)]; maddu_func() 668 rt = regs->hi; maddu_func() 669 rs = regs->lo; maddu_func() 673 regs->lo = (s64)rt; maddu_func() 675 regs->hi = (s64)rs; maddu_func() 684 * @regs: Process register set 689 static int msub_func(struct pt_regs *regs, u32 ir) msub_func() argument 694 rt = regs->regs[MIPSInst_RT(ir)]; msub_func() 695 rs = regs->regs[MIPSInst_RS(ir)]; msub_func() 697 rt = regs->hi; msub_func() 698 rs = regs->lo; msub_func() 702 regs->lo = (s64)rt; msub_func() 704 regs->hi = (s64)rs; msub_func() 713 * @regs: Process register set 718 static int msubu_func(struct pt_regs *regs, u32 ir) msubu_func() argument 723 rt = regs->regs[MIPSInst_RT(ir)]; msubu_func() 724 rs = regs->regs[MIPSInst_RS(ir)]; msubu_func() 726 rt = regs->hi; msubu_func() 727 rs = regs->lo; msubu_func() 731 regs->lo = (s64)rt; msubu_func() 733 regs->hi = (s64)rs; msubu_func() 742 * @regs: Process register set 747 static int mul_func(struct pt_regs *regs, u32 ir) mul_func() argument 754 rt = regs->regs[MIPSInst_RT(ir)]; mul_func() 755 rs = regs->regs[MIPSInst_RS(ir)]; mul_func() 759 regs->regs[MIPSInst_RD(ir)] = (s64)rs; mul_func() 768 * @regs: Process register set 773 static int clz_func(struct pt_regs *regs, u32 ir) clz_func() argument 781 rs = regs->regs[MIPSInst_RS(ir)]; clz_func() 783 regs->regs[MIPSInst_RD(ir)] = res; clz_func() 792 * @regs: Process register set 798 static int clo_func(struct pt_regs *regs, u32 ir) clo_func() argument 806 rs = regs->regs[MIPSInst_RS(ir)]; clo_func() 808 regs->regs[MIPSInst_RD(ir)] = res; clo_func() 817 * @regs: Process register set 822 static int dclz_func(struct pt_regs *regs, u32 ir) dclz_func() argument 833 rs = regs->regs[MIPSInst_RS(ir)]; dclz_func() 835 regs->regs[MIPSInst_RD(ir)] = res; dclz_func() 844 * @regs: Process register set 849 static int dclo_func(struct pt_regs *regs, u32 ir) dclo_func() argument 860 rs = regs->regs[MIPSInst_RS(ir)]; dclo_func() 862 regs->regs[MIPSInst_RD(ir)] = res; dclo_func() 883 static inline int mipsr2_find_op_func(struct pt_regs *regs, u32 inst, mipsr2_find_op_func() argument 891 err = (p->func)(regs, inst); mipsr2_find_op_func() 900 * @regs: Process register set 904 int mipsr2_decoder(struct pt_regs *regs, u32 inst, unsigned long *fcr31) mipsr2_decoder() argument 915 r31 = regs->regs[31]; mipsr2_decoder() 916 epc = regs->cp0_epc; mipsr2_decoder() 917 err = compute_return_epc(regs); mipsr2_decoder() 927 err = mipsr2_find_op_func(regs, inst, spec_op_table); mipsr2_decoder() 930 regs->cp0_cause |= CAUSEF_BD; mipsr2_decoder() 935 err = mipsr2_find_op_func(regs, inst, spec2_op_table); mipsr2_decoder() 942 if ((long)regs->regs[rs] >= MIPSInst_SIMM(inst)) mipsr2_decoder() 943 do_trap_or_bp(regs, 0, "TGEI"); mipsr2_decoder() 949 if (regs->regs[rs] >= MIPSInst_UIMM(inst)) mipsr2_decoder() 950 do_trap_or_bp(regs, 0, "TGEIU"); mipsr2_decoder() 956 if ((long)regs->regs[rs] < MIPSInst_SIMM(inst)) mipsr2_decoder() 957 do_trap_or_bp(regs, 0, "TLTI"); mipsr2_decoder() 963 if (regs->regs[rs] < MIPSInst_UIMM(inst)) mipsr2_decoder() 964 do_trap_or_bp(regs, 0, "TLTIU"); mipsr2_decoder() 970 if (regs->regs[rs] == MIPSInst_SIMM(inst)) mipsr2_decoder() 971 do_trap_or_bp(regs, 0, "TEQI"); mipsr2_decoder() 977 if (regs->regs[rs] != MIPSInst_SIMM(inst)) mipsr2_decoder() 978 do_trap_or_bp(regs, 0, "TNEI"); mipsr2_decoder() 987 if (delay_slot(regs)) { mipsr2_decoder() 991 regs->regs[31] = r31; mipsr2_decoder() 992 regs->cp0_epc = epc; mipsr2_decoder() 993 err = __compute_return_epc(regs); mipsr2_decoder() 998 cpc = regs->cp0_epc; mipsr2_decoder() 1029 regs->cp0_cause |= CAUSEF_BD; mipsr2_decoder() 1033 err = mipsr6_emul(regs, nir); mipsr2_decoder() 1035 err = mips_dsemul(regs, nir, cpc); mipsr2_decoder() 1044 if (delay_slot(regs)) { mipsr2_decoder() 1048 regs->regs[31] = r31; mipsr2_decoder() 1049 regs->cp0_epc = epc; mipsr2_decoder() 1050 err = __compute_return_epc(regs); mipsr2_decoder() 1053 cpc = regs->cp0_epc; mipsr2_decoder() 1078 regs->cp0_cause |= CAUSEF_BD; mipsr2_decoder() 1082 err = mipsr6_emul(regs, nir); mipsr2_decoder() 1084 err = mips_dsemul(regs, nir, cpc); mipsr2_decoder() 1092 regs->regs[31] = r31; mipsr2_decoder() 1093 regs->cp0_epc = epc; mipsr2_decoder() 1103 if (delay_slot(regs)) { mipsr2_decoder() 1107 regs->regs[31] = r31; mipsr2_decoder() 1108 regs->cp0_epc = epc; mipsr2_decoder() 1109 err = __compute_return_epc(regs); mipsr2_decoder() 1114 cpc = regs->cp0_epc; mipsr2_decoder() 1145 regs->cp0_cause |= CAUSEF_BD; mipsr2_decoder() 1149 err = mipsr6_emul(regs, nir); mipsr2_decoder() 1151 err = mips_dsemul(regs, nir, cpc); mipsr2_decoder() 1163 regs->regs[31] = r31; mipsr2_decoder() 1164 regs->cp0_epc = epc; mipsr2_decoder() 1171 err = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 0, mipsr2_decoder() 1199 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1200 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1265 regs->regs[MIPSInst_RT(inst)] = rt; mipsr2_decoder() 1272 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1273 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1339 regs->regs[MIPSInst_RT(inst)] = rt; mipsr2_decoder() 1346 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1347 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1416 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1417 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1491 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1492 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1599 regs->regs[MIPSInst_RT(inst)] = rt; mipsr2_decoder() 1610 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1611 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1718 regs->regs[MIPSInst_RT(inst)] = rt; mipsr2_decoder() 1729 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1730 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1847 rt = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 1848 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 1960 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 2010 regs->regs[MIPSInst_RT(inst)] = res; mipsr2_decoder() 2016 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 2048 res = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 2067 regs->regs[MIPSInst_RT(inst)] = res; mipsr2_decoder() 2079 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 2128 regs->regs[MIPSInst_RT(inst)] = res; mipsr2_decoder() 2140 vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst); mipsr2_decoder() 2172 res = regs->regs[MIPSInst_RT(inst)]; mipsr2_decoder() 2191 regs->regs[MIPSInst_RT(inst)] = res; mipsr2_decoder() 2208 regs->cp0_cause &= ~CAUSEF_BD; mipsr2_decoder() 2209 err = get_user(inst, (u32 __user *)regs->cp0_epc); mipsr2_decoder() 2218 regs->regs[31] = r31; mipsr2_decoder() 2219 regs->cp0_epc = epc; mipsr2_decoder()
|
H A D | branch.c | 27 int __isa_exception_epc(struct pt_regs *regs) __isa_exception_epc() argument 30 long epc = regs->cp0_epc; __isa_exception_epc() 57 int __mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, __mm_isBranchInstr() argument 79 regs->regs[insn.mm_i_format.rt] = __mm_isBranchInstr() 80 regs->cp0_epc + __mm_isBranchInstr() 83 *contpc = regs->regs[insn.mm_i_format.rs]; __mm_isBranchInstr() 92 regs->regs[31] = regs->cp0_epc + __mm_isBranchInstr() 97 if ((long)regs->regs[insn.mm_i_format.rs] < 0) __mm_isBranchInstr() 98 *contpc = regs->cp0_epc + __mm_isBranchInstr() 102 *contpc = regs->cp0_epc + __mm_isBranchInstr() 108 regs->regs[31] = regs->cp0_epc + __mm_isBranchInstr() 113 if ((long)regs->regs[insn.mm_i_format.rs] >= 0) __mm_isBranchInstr() 114 *contpc = regs->cp0_epc + __mm_isBranchInstr() 118 *contpc = regs->cp0_epc + __mm_isBranchInstr() 123 if ((long)regs->regs[insn.mm_i_format.rs] <= 0) __mm_isBranchInstr() 124 *contpc = regs->cp0_epc + __mm_isBranchInstr() 128 *contpc = regs->cp0_epc + __mm_isBranchInstr() 133 if ((long)regs->regs[insn.mm_i_format.rs] <= 0) __mm_isBranchInstr() 134 *contpc = regs->cp0_epc + __mm_isBranchInstr() 138 *contpc = regs->cp0_epc + __mm_isBranchInstr() 162 *contpc = regs->cp0_epc + __mm_isBranchInstr() 166 *contpc = regs->cp0_epc + __mm_isBranchInstr() 175 regs->regs[31] = regs->cp0_epc + __mm_isBranchInstr() 179 *contpc = regs->regs[insn.mm_i_format.rs]; __mm_isBranchInstr() 184 if ((long)regs->regs[reg16to32map[insn.mm_b1_format.rs]] == 0) __mm_isBranchInstr() 185 *contpc = regs->cp0_epc + __mm_isBranchInstr() 189 *contpc = regs->cp0_epc + __mm_isBranchInstr() 193 if ((long)regs->regs[reg16to32map[insn.mm_b1_format.rs]] != 0) __mm_isBranchInstr() 194 *contpc = regs->cp0_epc + __mm_isBranchInstr() 198 *contpc = regs->cp0_epc + __mm_isBranchInstr() 202 *contpc = regs->cp0_epc + dec_insn.pc_inc + __mm_isBranchInstr() 206 if (regs->regs[insn.mm_i_format.rs] == __mm_isBranchInstr() 207 regs->regs[insn.mm_i_format.rt]) __mm_isBranchInstr() 208 *contpc = regs->cp0_epc + __mm_isBranchInstr() 212 *contpc = regs->cp0_epc + __mm_isBranchInstr() 217 if (regs->regs[insn.mm_i_format.rs] != __mm_isBranchInstr() 218 regs->regs[insn.mm_i_format.rt]) __mm_isBranchInstr() 219 *contpc = regs->cp0_epc + __mm_isBranchInstr() 223 *contpc = regs->cp0_epc + __mm_isBranchInstr() 227 regs->regs[31] = regs->cp0_epc + __mm_isBranchInstr() 229 *contpc = regs->cp0_epc + dec_insn.pc_inc; __mm_isBranchInstr() 236 regs->regs[31] = regs->cp0_epc + __mm_isBranchInstr() 240 *contpc = regs->cp0_epc + dec_insn.pc_inc; __mm_isBranchInstr() 256 int __microMIPS_compute_return_epc(struct pt_regs *regs) __microMIPS_compute_return_epc() argument 267 pc16 = (unsigned short __user *)msk_isa16_mode(regs->cp0_epc); __microMIPS_compute_return_epc() 270 contpc = regs->cp0_epc + 2; __microMIPS_compute_return_epc() 277 contpc = regs->cp0_epc + 4; __microMIPS_compute_return_epc() 297 mm_isBranchInstr(regs, mminsn, &contpc); __microMIPS_compute_return_epc() 299 regs->cp0_epc = contpc; __microMIPS_compute_return_epc() 314 int __MIPS16e_compute_return_epc(struct pt_regs *regs) __MIPS16e_compute_return_epc() argument 322 epc = regs->cp0_epc; __MIPS16e_compute_return_epc() 333 regs->cp0_epc += 4; __MIPS16e_compute_return_epc() 346 regs->regs[31] = epc + 6; __MIPS16e_compute_return_epc() 361 regs->cp0_epc = epc; __MIPS16e_compute_return_epc() 371 regs->cp0_epc = regs->regs[31]; __MIPS16e_compute_return_epc() 373 regs->cp0_epc = __MIPS16e_compute_return_epc() 374 regs->regs[reg16to32[inst.rr.rx]]; __MIPS16e_compute_return_epc() 378 regs->regs[31] = epc + 2; __MIPS16e_compute_return_epc() 380 regs->regs[31] = epc + 4; __MIPS16e_compute_return_epc() 391 regs->cp0_epc += 2; __MIPS16e_compute_return_epc() 400 * @regs: Pointer to pt_regs 416 int __compute_return_epc_for_insn(struct pt_regs *regs, __compute_return_epc_for_insn() argument 420 long epc = regs->cp0_epc; __compute_return_epc_for_insn() 430 regs->regs[insn.r_format.rd] = epc + 8; __compute_return_epc_for_insn() 435 regs->cp0_epc = regs->regs[insn.r_format.rs]; __compute_return_epc_for_insn() 451 if ((long)regs->regs[insn.i_format.rs] < 0) { __compute_return_epc_for_insn() 457 regs->cp0_epc = epc; __compute_return_epc_for_insn() 464 if ((long)regs->regs[insn.i_format.rs] >= 0) { __compute_return_epc_for_insn() 470 regs->cp0_epc = epc; __compute_return_epc_for_insn() 480 regs->regs[31] = epc + 8; __compute_return_epc_for_insn() 493 regs->cp0_epc += 4 + __compute_return_epc_for_insn() 498 if ((long)regs->regs[insn.i_format.rs] < 0) { __compute_return_epc_for_insn() 504 regs->cp0_epc = epc; __compute_return_epc_for_insn() 514 regs->regs[31] = epc + 8; __compute_return_epc_for_insn() 527 regs->cp0_epc += 4 + __compute_return_epc_for_insn() 532 if ((long)regs->regs[insn.i_format.rs] >= 0) { __compute_return_epc_for_insn() 538 regs->cp0_epc = epc; __compute_return_epc_for_insn() 551 regs->cp0_epc = epc; __compute_return_epc_for_insn() 560 regs->regs[31] = regs->cp0_epc + 8; __compute_return_epc_for_insn() 566 regs->cp0_epc = epc; __compute_return_epc_for_insn() 568 set_isa16_mode(regs->cp0_epc); __compute_return_epc_for_insn() 578 if (regs->regs[insn.i_format.rs] == __compute_return_epc_for_insn() 579 regs->regs[insn.i_format.rt]) { __compute_return_epc_for_insn() 585 regs->cp0_epc = epc; __compute_return_epc_for_insn() 592 if (regs->regs[insn.i_format.rs] != __compute_return_epc_for_insn() 593 regs->regs[insn.i_format.rt]) { __compute_return_epc_for_insn() 599 regs->cp0_epc = epc; __compute_return_epc_for_insn() 623 regs->regs[31] = epc + 4; __compute_return_epc_for_insn() 624 regs->cp0_epc += 8; __compute_return_epc_for_insn() 628 if ((long)regs->regs[insn.i_format.rs] <= 0) { __compute_return_epc_for_insn() 634 regs->cp0_epc = epc; __compute_return_epc_for_insn() 658 regs->regs[31] = epc + 4; __compute_return_epc_for_insn() 659 regs->cp0_epc += 8; __compute_return_epc_for_insn() 664 if ((long)regs->regs[insn.i_format.rs] > 0) { __compute_return_epc_for_insn() 670 regs->cp0_epc = epc; __compute_return_epc_for_insn() 712 regs->cp0_epc = epc; __compute_return_epc_for_insn() 737 regs->cp0_epc = epc; __compute_return_epc_for_insn() 749 regs->cp0_epc = epc; __compute_return_epc_for_insn() 756 if ((regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) __compute_return_epc_for_insn() 761 regs->cp0_epc = epc; __compute_return_epc_for_insn() 764 if ((regs->regs[insn.i_format.rs] & __compute_return_epc_for_insn() 769 regs->cp0_epc = epc; __compute_return_epc_for_insn() 772 if (regs->regs[insn.i_format.rs] & (1ull<<insn.i_format.rt)) __compute_return_epc_for_insn() 776 regs->cp0_epc = epc; __compute_return_epc_for_insn() 779 if (regs->regs[insn.i_format.rs] & __compute_return_epc_for_insn() 784 regs->cp0_epc = epc; __compute_return_epc_for_insn() 793 regs->cp0_epc += 8; __compute_return_epc_for_insn() 801 regs->regs[31] = epc + 4; __compute_return_epc_for_insn() 803 regs->cp0_epc = epc; __compute_return_epc_for_insn() 811 regs->cp0_epc += 8; __compute_return_epc_for_insn() 820 regs->regs[31] = epc + 4; __compute_return_epc_for_insn() 821 regs->cp0_epc += 8; __compute_return_epc_for_insn() 836 regs->regs[31] = epc + 4; __compute_return_epc_for_insn() 837 regs->cp0_epc += 8; __compute_return_epc_for_insn() 855 int __compute_return_epc(struct pt_regs *regs) __compute_return_epc() argument 861 epc = regs->cp0_epc; __compute_return_epc() 874 return __compute_return_epc_for_insn(regs, insn); __compute_return_epc()
|
H A D | signal.c | 167 int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) setup_sigcontext() argument 173 err |= __put_user(regs->cp0_epc, &sc->sc_pc); setup_sigcontext() 177 err |= __put_user(regs->regs[i], &sc->sc_regs[i]); setup_sigcontext() 180 err |= __put_user(regs->acx, &sc->sc_acx); setup_sigcontext() 182 err |= __put_user(regs->hi, &sc->sc_mdhi); setup_sigcontext() 183 err |= __put_user(regs->lo, &sc->sc_mdlo); setup_sigcontext() 238 int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext() argument 248 err |= __get_user(regs->cp0_epc, &sc->sc_pc); restore_sigcontext() 251 err |= __get_user(regs->acx, &sc->sc_acx); restore_sigcontext() 253 err |= __get_user(regs->hi, &sc->sc_mdhi); restore_sigcontext() 254 err |= __get_user(regs->lo, &sc->sc_mdlo); restore_sigcontext() 266 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); restore_sigcontext() 283 void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, get_sigframe() argument 289 sp = regs->regs[29]; get_sigframe() 356 asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs) sys_sigreturn() argument 362 frame = (struct sigframe __user *) regs.regs[29]; sys_sigreturn() 370 sig = restore_sigcontext(®s, &frame->sf_sc); sys_sigreturn() 383 :"r" (®s)); sys_sigreturn() 391 asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs) sys_rt_sigreturn() argument 397 frame = (struct rt_sigframe __user *) regs.regs[29]; sys_rt_sigreturn() 405 sig = restore_sigcontext(®s, &frame->rs_uc.uc_mcontext); sys_rt_sigreturn() 421 :"r" (®s)); sys_rt_sigreturn() 430 struct pt_regs *regs, sigset_t *set) setup_frame() 435 frame = get_sigframe(ksig, regs, sizeof(*frame)); setup_frame() 439 err |= setup_sigcontext(regs, &frame->sf_sc); setup_frame() 454 regs->regs[ 4] = ksig->sig; setup_frame() 455 regs->regs[ 5] = 0; setup_frame() 456 regs->regs[ 6] = (unsigned long) &frame->sf_sc; setup_frame() 457 regs->regs[29] = (unsigned long) frame; setup_frame() 458 regs->regs[31] = (unsigned long) sig_return; setup_frame() 459 regs->cp0_epc = regs->regs[25] = (unsigned long) ksig->ka.sa.sa_handler; setup_frame() 463 frame, regs->cp0_epc, regs->regs[31]); setup_frame() 469 struct pt_regs *regs, sigset_t *set) setup_rt_frame() 474 frame = get_sigframe(ksig, regs, sizeof(*frame)); setup_rt_frame() 484 err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]); setup_rt_frame() 485 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); setup_rt_frame() 501 regs->regs[ 4] = ksig->sig; setup_rt_frame() 502 regs->regs[ 5] = (unsigned long) &frame->rs_info; setup_rt_frame() 503 regs->regs[ 6] = (unsigned long) &frame->rs_uc; setup_rt_frame() 504 regs->regs[29] = (unsigned long) frame; setup_rt_frame() 505 regs->regs[31] = (unsigned long) sig_return; setup_rt_frame() 506 regs->cp0_epc = regs->regs[25] = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 510 frame, regs->cp0_epc, regs->regs[31]); setup_rt_frame() 526 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 541 if (regs->regs[0]) { handle_signal() 542 switch(regs->regs[2]) { handle_signal() 545 regs->regs[2] = EINTR; handle_signal() 549 regs->regs[2] = EINTR; handle_signal() 554 regs->regs[7] = regs->regs[26]; handle_signal() 555 regs->regs[2] = regs->regs[0]; handle_signal() 556 regs->cp0_epc -= 4; handle_signal() 559 regs->regs[0] = 0; /* Don't deal with this again. */ handle_signal() 564 ksig, regs, oldset); handle_signal() 567 regs, oldset); handle_signal() 572 static void do_signal(struct pt_regs *regs) do_signal() argument 578 handle_signal(&ksig, regs); do_signal() 582 if (regs->regs[0]) { do_signal() 583 switch (regs->regs[2]) { do_signal() 587 regs->regs[2] = regs->regs[0]; do_signal() 588 regs->regs[7] = regs->regs[26]; do_signal() 589 regs->cp0_epc -= 4; do_signal() 593 regs->regs[2] = current->thread.abi->restart; do_signal() 594 regs->regs[7] = regs->regs[26]; do_signal() 595 regs->cp0_epc -= 4; do_signal() 598 regs->regs[0] = 0; /* Don't deal with this again. */ do_signal() 612 asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused, do_notify_resume() argument 621 do_signal(regs); do_notify_resume() 625 tracehook_notify_resume(regs); do_notify_resume() 429 setup_frame(void *sig_return, struct ksignal *ksig, struct pt_regs *regs, sigset_t *set) setup_frame() argument 468 setup_rt_frame(void *sig_return, struct ksignal *ksig, struct pt_regs *regs, sigset_t *set) setup_rt_frame() argument
|
H A D | stacktrace.c | 34 struct task_struct *tsk, struct pt_regs *regs) save_context_stack() 36 unsigned long sp = regs->regs[29]; save_context_stack() 38 unsigned long ra = regs->regs[31]; save_context_stack() 39 unsigned long pc = regs->cp0_epc; save_context_stack() 75 struct pt_regs *regs = &dummyregs; save_stack_trace_tsk() local 80 regs->regs[29] = tsk->thread.reg29; save_stack_trace_tsk() 81 regs->regs[31] = 0; save_stack_trace_tsk() 82 regs->cp0_epc = tsk->thread.reg31; save_stack_trace_tsk() 84 prepare_frametrace(regs); save_stack_trace_tsk() 85 save_context_stack(trace, tsk, regs); save_stack_trace_tsk() 33 save_context_stack(struct stack_trace *trace, struct task_struct *tsk, struct pt_regs *regs) save_context_stack() argument
|
H A D | kgdb.c | 56 { "zero", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[0]) }, 57 { "at", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[1]) }, 58 { "v0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[2]) }, 59 { "v1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[3]) }, 60 { "a0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[4]) }, 61 { "a1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[5]) }, 62 { "a2", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[6]) }, 63 { "a3", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[7]) }, 64 { "t0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[8]) }, 65 { "t1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[9]) }, 66 { "t2", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[10]) }, 67 { "t3", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[11]) }, 68 { "t4", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[12]) }, 69 { "t5", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[13]) }, 70 { "t6", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[14]) }, 71 { "t7", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[15]) }, 72 { "s0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[16]) }, 73 { "s1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[17]) }, 74 { "s2", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[18]) }, 75 { "s3", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[19]) }, 76 { "s4", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[20]) }, 77 { "s5", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[21]) }, 78 { "s6", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[22]) }, 79 { "s7", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[23]) }, 80 { "t8", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[24]) }, 81 { "t9", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[25]) }, 82 { "k0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[26]) }, 83 { "k1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[27]) }, 84 { "gp", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[28]) }, 85 { "sp", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[29]) }, 86 { "s8", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[30]) }, 87 { "ra", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[31]) }, 130 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) dbg_set_reg() argument 138 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, dbg_set_reg() 142 if (!(regs->cp0_status & ST0_CU1)) dbg_set_reg() 163 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) dbg_get_reg() argument 172 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, dbg_get_reg() 176 if (!(regs->cp0_status & ST0_CU1)) dbg_get_reg() 249 struct pt_regs *regs = (struct pt_regs *)ksp - 1; sleeping_thread_to_gdb_regs() local 257 *(ptr++) = regs->regs[reg]; sleeping_thread_to_gdb_regs() 261 *(ptr++) = regs->regs[reg]; sleeping_thread_to_gdb_regs() 268 *(ptr++) = regs->regs[reg]; sleeping_thread_to_gdb_regs() 270 *(ptr++) = regs->cp0_status; sleeping_thread_to_gdb_regs() 271 *(ptr++) = regs->lo; sleeping_thread_to_gdb_regs() 272 *(ptr++) = regs->hi; sleeping_thread_to_gdb_regs() 273 *(ptr++) = regs->cp0_badvaddr; sleeping_thread_to_gdb_regs() 274 *(ptr++) = regs->cp0_cause; sleeping_thread_to_gdb_regs() 275 *(ptr++) = regs->cp0_epc; sleeping_thread_to_gdb_regs() 278 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) kgdb_arch_set_pc() argument 280 regs->cp0_epc = pc; kgdb_arch_set_pc() 291 struct pt_regs *regs = args->regs; kgdb_mips_notify() local 292 int trap = (regs->cp0_cause & 0x7c) >> 2; kgdb_mips_notify() 305 if (user_mode(regs)) kgdb_mips_notify() 313 kgdb_nmicallback(smp_processor_id(), regs); kgdb_mips_notify() local 315 if (kgdb_handle_exception(trap, compute_signal(trap), cmd, regs)) { kgdb_mips_notify() 321 if ((trap == 9) && (regs->cp0_epc == (unsigned long)breakinst)) kgdb_mips_notify() 322 regs->cp0_epc += 4; kgdb_mips_notify() 334 struct pt_regs *regs, long err, int trap, int sig) kgdb_ll_trap() 337 .regs = regs, kgdb_ll_trap() 361 struct pt_regs *regs) kgdb_arch_handle_exception() 371 regs->cp0_epc = address; kgdb_arch_handle_exception() 333 kgdb_ll_trap(int cmd, const char *str, struct pt_regs *regs, long err, int trap, int sig) kgdb_ll_trap() argument 359 kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *regs) kgdb_arch_handle_exception() argument
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | debug.h | 15 extern int (*__debugger)(struct pt_regs *regs); 16 extern int (*__debugger_ipi)(struct pt_regs *regs); 17 extern int (*__debugger_bpt)(struct pt_regs *regs); 18 extern int (*__debugger_sstep)(struct pt_regs *regs); 19 extern int (*__debugger_iabr_match)(struct pt_regs *regs); 20 extern int (*__debugger_break_match)(struct pt_regs *regs); 21 extern int (*__debugger_fault_handler)(struct pt_regs *regs); 24 static inline int __NAME(struct pt_regs *regs) \ 27 return __ ## __NAME(regs); \ 40 static inline int debugger(struct pt_regs *regs) { return 0; } 41 static inline int debugger_ipi(struct pt_regs *regs) { return 0; } 42 static inline int debugger_bpt(struct pt_regs *regs) { return 0; } 43 static inline int debugger_sstep(struct pt_regs *regs) { return 0; } 44 static inline int debugger_iabr_match(struct pt_regs *regs) { return 0; } 45 static inline int debugger_break_match(struct pt_regs *regs) { return 0; } 46 static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } 52 extern void do_send_trap(struct pt_regs *regs, unsigned long address, 56 extern void do_break(struct pt_regs *regs, unsigned long address,
|
H A D | syscall.h | 26 struct pt_regs *regs) syscall_get_nr() 28 return TRAP(regs) == 0xc00 ? regs->gpr[0] : -1L; syscall_get_nr() 32 struct pt_regs *regs) syscall_rollback() 34 regs->gpr[3] = regs->orig_gpr3; syscall_rollback() 38 struct pt_regs *regs) syscall_get_error() 40 return (regs->ccr & 0x10000000) ? -regs->gpr[3] : 0; syscall_get_error() 44 struct pt_regs *regs) syscall_get_return_value() 46 return regs->gpr[3]; syscall_get_return_value() 50 struct pt_regs *regs, syscall_set_return_value() 54 regs->ccr |= 0x10000000L; syscall_set_return_value() 55 regs->gpr[3] = -error; syscall_set_return_value() 57 regs->ccr &= ~0x10000000L; syscall_set_return_value() 58 regs->gpr[3] = val; syscall_set_return_value() 63 struct pt_regs *regs, syscall_get_arguments() 75 args[n] = (u32) regs->gpr[3 + i + n]; syscall_get_arguments() 79 memcpy(args, ®s->gpr[3 + i], n * sizeof(args[0])); syscall_get_arguments() 83 struct pt_regs *regs, syscall_set_arguments() 88 memcpy(®s->gpr[3 + i], args, n * sizeof(args[0])); syscall_set_arguments() 25 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 31 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 37 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 43 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 49 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 62 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 82 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | trace.h | 13 TP_PROTO(struct pt_regs *regs), 15 TP_ARGS(regs), 18 __field(struct pt_regs *, regs) 22 __entry->regs = regs; 25 TP_printk("pt_regs=%p", __entry->regs) 30 TP_PROTO(struct pt_regs *regs), 32 TP_ARGS(regs) 37 TP_PROTO(struct pt_regs *regs), 39 TP_ARGS(regs) 44 TP_PROTO(struct pt_regs *regs), 46 TP_ARGS(regs) 51 TP_PROTO(struct pt_regs *regs), 53 TP_ARGS(regs)
|
H A D | ptrace.h | 7 * this should only contain volatile regs 78 #define GET_IP(regs) ((regs)->nip) 79 #define GET_USP(regs) ((regs)->gpr[1]) 80 #define GET_FP(regs) (0) 81 #define SET_FP(regs, val) 84 extern unsigned long profile_pc(struct pt_regs *regs); 90 #define kernel_stack_pointer(regs) ((regs)->gpr[1]) is_syscall_success() 91 static inline int is_syscall_success(struct pt_regs *regs) is_syscall_success() argument 93 return !(regs->ccr & 0x10000000); is_syscall_success() 96 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 98 if (is_syscall_success(regs)) regs_return_value() 99 return regs->gpr[3]; regs_return_value() 101 return -regs->gpr[3]; regs_return_value() 105 #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) 107 #define user_mode(regs) (((regs)->msr & MSR_PR) != 0) 130 #define FULL_REGS(regs) (((regs)->trap & 1) == 0) 132 #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0) 133 #define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0) 134 #define IS_DEBUG_EXC(regs) (((regs)->trap & 8) != 0) 136 #define TRAP(regs) ((regs)->trap & ~0xF) 139 #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) 142 #define CHECK_FULL_REGS(regs) \ 144 if ((regs)->trap & 1) \ 165 * @regs: pt_regs from which register value is gotten 168 * regs_get_register returns the value of a register whose offset from @regs. 172 static inline unsigned long regs_get_register(struct pt_regs *regs, regs_get_register() argument 177 return *(unsigned long *)((unsigned long)regs + offset); regs_get_register() 182 * @regs: pt_regs which contains kernel stack pointer. 189 static inline bool regs_within_kernel_stack(struct pt_regs *regs, regs_within_kernel_stack() argument 193 (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); regs_within_kernel_stack() 198 * @regs: pt_regs which contains kernel stack pointer. 202 * is specified by @regs. If the @n th entry is NOT in the kernel stack, 205 static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, regs_get_kernel_stack_nth() argument 208 unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); regs_get_kernel_stack_nth() 210 if (regs_within_kernel_stack(regs, (unsigned long)addr)) regs_get_kernel_stack_nth()
|
/linux-4.1.27/arch/microblaze/kernel/ |
H A D | process.c | 22 void show_regs(struct pt_regs *regs) show_regs() argument 26 pr_info(" Registers dump: mode=%X\r\n", regs->pt_mode); show_regs() 28 regs->r1, regs->r2, regs->r3, regs->r4); show_regs() 30 regs->r5, regs->r6, regs->r7, regs->r8); show_regs() 32 regs->r9, regs->r10, regs->r11, regs->r12); show_regs() 34 regs->r13, regs->r14, regs->r15, regs->r16); show_regs() 36 regs->r17, regs->r18, regs->r19, regs->r20); show_regs() 38 regs->r21, regs->r22, regs->r23, regs->r24); show_regs() 40 regs->r25, regs->r26, regs->r27, regs->r28); show_regs() 42 regs->r29, regs->r30, regs->r31, regs->pc); show_regs() 44 regs->msr, regs->ear, regs->esr, regs->fsr); show_regs() 88 * regs which were saved immediately after entering the kernel state copy_thread() 143 void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp) start_thread() argument 145 regs->pc = pc; start_thread() 146 regs->r1 = usp; start_thread() 147 regs->pt_mode = 0; start_thread() 149 regs->msr |= MSR_UMS; start_thread() 150 regs->msr &= ~MSR_VM; start_thread() 159 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs) dump_fpu() argument
|
H A D | exceptions.c | 53 asmlinkage void sw_exception(struct pt_regs *regs) sw_exception() argument 55 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->r16); sw_exception() 56 flush_dcache_range(regs->r16, regs->r16 + 0x4); sw_exception() 57 flush_icache_range(regs->r16, regs->r16 + 0x4); sw_exception() 60 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) _exception() argument 64 if (kernel_mode(regs)) _exception() 65 die("Exception in kernel mode", regs, signr); _exception() 74 asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, full_exception() argument 78 addr = regs->pc; full_exception() 83 type, user_mode(regs) ? "user" : "kernel", fsr, full_exception() 84 (unsigned int) regs->pc, (unsigned int) regs->esr); full_exception() 89 if (user_mode(regs)) { full_exception() 91 _exception(SIGILL, regs, ILL_ILLOPC, addr); full_exception() 95 die("opcode exception", regs, SIGBUS); full_exception() 98 if (user_mode(regs)) { full_exception() 100 _exception(SIGBUS, regs, BUS_ADRERR, addr); full_exception() 104 die("bus exception", regs, SIGBUS); full_exception() 107 if (user_mode(regs)) { full_exception() 109 _exception(SIGBUS, regs, BUS_ADRERR, addr); full_exception() 113 die("bus exception", regs, SIGBUS); full_exception() 116 if (user_mode(regs)) { full_exception() 118 _exception(SIGFPE, regs, FPE_INTDIV, addr); full_exception() 122 die("Divide by zero exception", regs, SIGBUS); full_exception() 138 _exception(SIGFPE, regs, fsr, addr); full_exception() 144 _exception(SIGILL, regs, ILL_PRVOPC, addr); full_exception() 151 kernel_mode(regs) ? "kernel" : "user"); full_exception()
|
/linux-4.1.27/arch/arm/mach-omap2/ |
H A D | gpio.c | 62 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); omap2_gpio_dev_init() 63 if (!pdata->regs) { omap2_gpio_dev_init() 80 pdata->regs->revision = OMAP24XX_GPIO_REVISION; omap2_gpio_dev_init() 81 pdata->regs->direction = OMAP24XX_GPIO_OE; omap2_gpio_dev_init() 82 pdata->regs->datain = OMAP24XX_GPIO_DATAIN; omap2_gpio_dev_init() 83 pdata->regs->dataout = OMAP24XX_GPIO_DATAOUT; omap2_gpio_dev_init() 84 pdata->regs->set_dataout = OMAP24XX_GPIO_SETDATAOUT; omap2_gpio_dev_init() 85 pdata->regs->clr_dataout = OMAP24XX_GPIO_CLEARDATAOUT; omap2_gpio_dev_init() 86 pdata->regs->irqstatus = OMAP24XX_GPIO_IRQSTATUS1; omap2_gpio_dev_init() 87 pdata->regs->irqstatus2 = OMAP24XX_GPIO_IRQSTATUS2; omap2_gpio_dev_init() 88 pdata->regs->irqenable = OMAP24XX_GPIO_IRQENABLE1; omap2_gpio_dev_init() 89 pdata->regs->irqenable2 = OMAP24XX_GPIO_IRQENABLE2; omap2_gpio_dev_init() 90 pdata->regs->set_irqenable = OMAP24XX_GPIO_SETIRQENABLE1; omap2_gpio_dev_init() 91 pdata->regs->clr_irqenable = OMAP24XX_GPIO_CLEARIRQENABLE1; omap2_gpio_dev_init() 92 pdata->regs->debounce = OMAP24XX_GPIO_DEBOUNCE_VAL; omap2_gpio_dev_init() 93 pdata->regs->debounce_en = OMAP24XX_GPIO_DEBOUNCE_EN; omap2_gpio_dev_init() 94 pdata->regs->ctrl = OMAP24XX_GPIO_CTRL; omap2_gpio_dev_init() 95 pdata->regs->wkup_en = OMAP24XX_GPIO_WAKE_EN; omap2_gpio_dev_init() 96 pdata->regs->leveldetect0 = OMAP24XX_GPIO_LEVELDETECT0; omap2_gpio_dev_init() 97 pdata->regs->leveldetect1 = OMAP24XX_GPIO_LEVELDETECT1; omap2_gpio_dev_init() 98 pdata->regs->risingdetect = OMAP24XX_GPIO_RISINGDETECT; omap2_gpio_dev_init() 99 pdata->regs->fallingdetect = OMAP24XX_GPIO_FALLINGDETECT; omap2_gpio_dev_init() 102 pdata->regs->revision = OMAP4_GPIO_REVISION; omap2_gpio_dev_init() 103 pdata->regs->direction = OMAP4_GPIO_OE; omap2_gpio_dev_init() 104 pdata->regs->datain = OMAP4_GPIO_DATAIN; omap2_gpio_dev_init() 105 pdata->regs->dataout = OMAP4_GPIO_DATAOUT; omap2_gpio_dev_init() 106 pdata->regs->set_dataout = OMAP4_GPIO_SETDATAOUT; omap2_gpio_dev_init() 107 pdata->regs->clr_dataout = OMAP4_GPIO_CLEARDATAOUT; omap2_gpio_dev_init() 108 pdata->regs->irqstatus_raw0 = OMAP4_GPIO_IRQSTATUSRAW0; omap2_gpio_dev_init() 109 pdata->regs->irqstatus_raw1 = OMAP4_GPIO_IRQSTATUSRAW1; omap2_gpio_dev_init() 110 pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; omap2_gpio_dev_init() 111 pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; omap2_gpio_dev_init() 112 pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; omap2_gpio_dev_init() 113 pdata->regs->irqenable2 = OMAP4_GPIO_IRQSTATUSSET1; omap2_gpio_dev_init() 114 pdata->regs->set_irqenable = OMAP4_GPIO_IRQSTATUSSET0; omap2_gpio_dev_init() 115 pdata->regs->clr_irqenable = OMAP4_GPIO_IRQSTATUSCLR0; omap2_gpio_dev_init() 116 pdata->regs->debounce = OMAP4_GPIO_DEBOUNCINGTIME; omap2_gpio_dev_init() 117 pdata->regs->debounce_en = OMAP4_GPIO_DEBOUNCENABLE; omap2_gpio_dev_init() 118 pdata->regs->ctrl = OMAP4_GPIO_CTRL; omap2_gpio_dev_init() 119 pdata->regs->wkup_en = OMAP4_GPIO_IRQWAKEN0; omap2_gpio_dev_init() 120 pdata->regs->leveldetect0 = OMAP4_GPIO_LEVELDETECT0; omap2_gpio_dev_init() 121 pdata->regs->leveldetect1 = OMAP4_GPIO_LEVELDETECT1; omap2_gpio_dev_init() 122 pdata->regs->risingdetect = OMAP4_GPIO_RISINGDETECT; omap2_gpio_dev_init() 123 pdata->regs->fallingdetect = OMAP4_GPIO_FALLINGDETECT; omap2_gpio_dev_init() 127 kfree(pdata->regs); omap2_gpio_dev_init()
|
/linux-4.1.27/arch/avr32/include/asm/ |
H A D | ptrace.h | 21 #define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER) 22 #define instruction_pointer(regs) ((regs)->pc) 23 #define profile_pc(regs) instruction_pointer(regs) 24 #define user_stack_pointer(regs) ((regs)->sp) 26 static __inline__ int valid_user_regs(struct pt_regs *regs) valid_user_regs() argument 32 if ((regs->sr & 0xffff0000) == 0) valid_user_regs() 39 regs->sr &= 0x0000ffff; valid_user_regs()
|
/linux-4.1.27/arch/m32r/include/asm/ |
H A D | ptrace.h | 26 #define user_mode(regs) ((M32R_PSW_BPM & (regs)->psw) != 0) 28 #define user_mode(regs) ((M32R_PSW_BSM & (regs)->psw) != 0) 33 #define instruction_pointer(regs) ((regs)->bpc) 34 #define profile_pc(regs) instruction_pointer(regs) 35 #define user_stack_pointer(regs) ((regs)->spu) 37 extern void withdraw_debug_trap(struct pt_regs *regs);
|
/linux-4.1.27/arch/arm/include/asm/ |
H A D | ptrace.h | 20 #define user_mode(regs) \ 21 (((regs)->ARM_cpsr & 0xf) == 0) 24 #define thumb_mode(regs) \ 25 (((regs)->ARM_cpsr & PSR_T_BIT)) 27 #define thumb_mode(regs) (0) 31 #define isa_mode(regs) \ 32 ((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \ 33 (((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT)))) 35 #define isa_mode(regs) 1 /* Thumb */ 38 #define processor_mode(regs) \ 39 ((regs)->ARM_cpsr & MODE_MASK) 41 #define interrupts_enabled(regs) \ 42 (!((regs)->ARM_cpsr & PSR_I_BIT)) 44 #define fast_interrupts_enabled(regs) \ 45 (!((regs)->ARM_cpsr & PSR_F_BIT)) 50 static inline int valid_user_regs(struct pt_regs *regs) valid_user_regs() argument 53 unsigned long mode = regs->ARM_cpsr & MODE_MASK; valid_user_regs() 58 regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); valid_user_regs() 60 if ((regs->ARM_cpsr & PSR_I_BIT) == 0) { valid_user_regs() 70 regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; valid_user_regs() 72 regs->ARM_cpsr |= USR_MODE; valid_user_regs() 80 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 82 return regs->ARM_r0; regs_return_value() 85 #define instruction_pointer(regs) (regs)->ARM_pc 88 #define frame_pointer(regs) (regs)->ARM_r7 90 #define frame_pointer(regs) (regs)->ARM_fp 93 static inline void instruction_pointer_set(struct pt_regs *regs, instruction_pointer_set() argument 96 instruction_pointer(regs) = val; instruction_pointer_set() 100 extern unsigned long profile_pc(struct pt_regs *regs); 102 #define profile_pc(regs) instruction_pointer(regs) 125 extern bool regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr); 126 extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, 131 * @regs: pt_regs from which register value is gotten 134 * regs_get_register returns the value of a register whose offset from @regs. 138 static inline unsigned long regs_get_register(struct pt_regs *regs, regs_get_register() argument 143 return *(unsigned long *)((unsigned long)regs + offset); regs_get_register() 147 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) kernel_stack_pointer() argument 149 return regs->ARM_sp; kernel_stack_pointer() 152 static inline unsigned long user_stack_pointer(struct pt_regs *regs) user_stack_pointer() argument 154 return regs->ARM_sp; user_stack_pointer()
|
H A D | syscall.h | 22 struct pt_regs *regs) syscall_get_nr() 28 struct pt_regs *regs) syscall_rollback() 30 regs->ARM_r0 = regs->ARM_ORIG_r0; syscall_rollback() 34 struct pt_regs *regs) syscall_get_error() 36 unsigned long error = regs->ARM_r0; syscall_get_error() 41 struct pt_regs *regs) syscall_get_return_value() 43 return regs->ARM_r0; syscall_get_return_value() 47 struct pt_regs *regs, syscall_set_return_value() 50 regs->ARM_r0 = (long) error ? error : val; syscall_set_return_value() 56 struct pt_regs *regs, syscall_get_arguments() 73 args[0] = regs->ARM_ORIG_r0; syscall_get_arguments() 79 memcpy(args, ®s->ARM_r0 + i, n * sizeof(args[0])); syscall_get_arguments() 83 struct pt_regs *regs, syscall_set_arguments() 97 regs->ARM_ORIG_r0 = args[0]; syscall_set_arguments() 103 memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); syscall_set_arguments() 21 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 27 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 33 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 40 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 46 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 55 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 82 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
H A D | stacktrace.h | 18 void arm_get_current_stackframe(struct pt_regs *regs, struct stackframe *frame) arm_get_current_stackframe() argument 20 frame->fp = frame_pointer(regs); arm_get_current_stackframe() 21 frame->sp = regs->ARM_sp; arm_get_current_stackframe() 22 frame->lr = regs->ARM_lr; arm_get_current_stackframe() 23 frame->pc = regs->ARM_pc; arm_get_current_stackframe()
|
H A D | perf_event.h | 17 extern unsigned long perf_instruction_pointer(struct pt_regs *regs); 18 extern unsigned long perf_misc_flags(struct pt_regs *regs); 19 #define perf_misc_flags(regs) perf_misc_flags(regs)
|
/linux-4.1.27/arch/blackfin/include/asm/ |
H A D | syscall.h | 26 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 28 return regs->p0; syscall_get_nr() 32 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 34 regs->p0 = regs->orig_p0; syscall_rollback() 38 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 40 return IS_ERR_VALUE(regs->r0) ? regs->r0 : 0; syscall_get_error() 44 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 46 return regs->r0; syscall_get_return_value() 50 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, syscall_set_return_value() argument 53 regs->r0 = error ? -error : val; syscall_set_return_value() 59 * @regs: the register layout to extract syscall arguments from 67 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, syscall_get_arguments() argument 75 long *aregs = ®s->r0 - i; syscall_get_arguments() 85 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, syscall_set_arguments() argument 88 long *aregs = ®s->r0 - i; syscall_set_arguments()
|
/linux-4.1.27/arch/cris/arch-v10/kernel/ |
H A D | traps.c | 17 show_registers(struct pt_regs *regs) show_registers() argument 28 regs->irp, regs->srp, regs->dccr, usp, regs->mof); show_registers() 31 regs->r0, regs->r1, regs->r2, regs->r3); show_registers() 34 regs->r4, regs->r5, regs->r6, regs->r7); show_registers() 37 regs->r8, regs->r9, regs->r10, regs->r11); show_registers() 40 regs->r12, regs->r13, regs->orig_r10, (long unsigned)regs); show_registers() 51 if (!user_mode(regs)) { show_registers() 65 if (regs->irp < PAGE_OFFSET) show_registers() 69 * Quite often the value at regs->irp doesn't point to the show_registers() 73 * point, but small enough to fit on a row. The regs->irp show_registers() 80 if (__get_user(c, &((unsigned char *)regs->irp)[i])) { show_registers() 102 void handle_nmi(struct pt_regs *regs) handle_nmi() argument 105 nmi_handler(regs); handle_nmi() 116 handle_BUG(struct pt_regs *regs) handle_BUG() argument 120 unsigned long irp = regs->irp; handle_BUG()
|
/linux-4.1.27/arch/um/kernel/ |
H A D | signal.c | 21 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 32 if (PT_REGS_SYSCALL_NR(regs) >= 0) { handle_signal() 34 switch (PT_REGS_SYSCALL_RET(regs)) { handle_signal() 37 PT_REGS_SYSCALL_RET(regs) = -EINTR; handle_signal() 42 PT_REGS_SYSCALL_RET(regs) = -EINTR; handle_signal() 47 PT_REGS_RESTART_SYSCALL(regs); handle_signal() 48 PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs); handle_signal() 53 sp = PT_REGS_SP(regs); handle_signal() 59 err = setup_signal_stack_sc(sp, ksig, regs, oldset); handle_signal() 62 err = setup_signal_stack_si(sp, ksig, regs, oldset); handle_signal() 67 static int kern_do_signal(struct pt_regs *regs) kern_do_signal() argument 75 handle_signal(&ksig, regs); kern_do_signal() 79 if (!handled_sig && (PT_REGS_SYSCALL_NR(regs) >= 0)) { kern_do_signal() 81 switch (PT_REGS_SYSCALL_RET(regs)) { kern_do_signal() 85 PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs); kern_do_signal() 86 PT_REGS_RESTART_SYSCALL(regs); kern_do_signal() 89 PT_REGS_ORIG_SYSCALL(regs) = __NR_restart_syscall; kern_do_signal() 90 PT_REGS_RESTART_SYSCALL(regs); kern_do_signal() 105 is_syscall(PT_REGS_IP(¤t->thread.regs)); kern_do_signal() 118 return kern_do_signal(¤t->thread.regs); do_signal()
|
H A D | ptrace.c | 67 case PTRACE_GETREGS: { /* Get all gp regs from the child. */ arch_ptrace() 81 case PTRACE_SETREGS: { /* Set all gp regs in the child. */ arch_ptrace() 114 static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, send_sigtrap() argument 124 info.si_addr = UPT_IS_USER(regs) ? (void __user *) UPT_IP(regs) : NULL; send_sigtrap() 134 void syscall_trace_enter(struct pt_regs *regs) syscall_trace_enter() argument 136 audit_syscall_entry(UPT_SYSCALL_NR(®s->regs), syscall_trace_enter() 137 UPT_SYSCALL_ARG1(®s->regs), syscall_trace_enter() 138 UPT_SYSCALL_ARG2(®s->regs), syscall_trace_enter() 139 UPT_SYSCALL_ARG3(®s->regs), syscall_trace_enter() 140 UPT_SYSCALL_ARG4(®s->regs)); syscall_trace_enter() 145 tracehook_report_syscall_entry(regs); syscall_trace_enter() 148 void syscall_trace_leave(struct pt_regs *regs) syscall_trace_leave() argument 152 audit_syscall_exit(regs); syscall_trace_leave() 156 send_sigtrap(current, ®s->regs, 0); syscall_trace_leave() 161 tracehook_report_syscall_exit(regs, 0); syscall_trace_leave()
|
H A D | exec.c | 35 get_safe_registers(current_pt_regs()->regs.gp, flush_thread() 36 current_pt_regs()->regs.fp); flush_thread() 41 void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) start_thread() argument 43 PT_REGS_IP(regs) = eip; start_thread() 44 PT_REGS_SP(regs) = esp; start_thread() 47 SUBARCH_EXECVE1(regs->regs); start_thread()
|
/linux-4.1.27/drivers/media/tuners/ |
H A D | tda18271-common.c | 69 unsigned char *regs = priv->tda18271_regs; tda18271_dump_regs() local 72 tda_reg("ID_BYTE = 0x%02x\n", 0xff & regs[R_ID]); tda18271_dump_regs() 73 tda_reg("THERMO_BYTE = 0x%02x\n", 0xff & regs[R_TM]); tda18271_dump_regs() 74 tda_reg("POWER_LEVEL_BYTE = 0x%02x\n", 0xff & regs[R_PL]); tda18271_dump_regs() 75 tda_reg("EASY_PROG_BYTE_1 = 0x%02x\n", 0xff & regs[R_EP1]); tda18271_dump_regs() 76 tda_reg("EASY_PROG_BYTE_2 = 0x%02x\n", 0xff & regs[R_EP2]); tda18271_dump_regs() 77 tda_reg("EASY_PROG_BYTE_3 = 0x%02x\n", 0xff & regs[R_EP3]); tda18271_dump_regs() 78 tda_reg("EASY_PROG_BYTE_4 = 0x%02x\n", 0xff & regs[R_EP4]); tda18271_dump_regs() 79 tda_reg("EASY_PROG_BYTE_5 = 0x%02x\n", 0xff & regs[R_EP5]); tda18271_dump_regs() 80 tda_reg("CAL_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_CPD]); tda18271_dump_regs() 81 tda_reg("CAL_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_CD1]); tda18271_dump_regs() 82 tda_reg("CAL_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_CD2]); tda18271_dump_regs() 83 tda_reg("CAL_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_CD3]); tda18271_dump_regs() 84 tda_reg("MAIN_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_MPD]); tda18271_dump_regs() 85 tda_reg("MAIN_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_MD1]); tda18271_dump_regs() 86 tda_reg("MAIN_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_MD2]); tda18271_dump_regs() 87 tda_reg("MAIN_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_MD3]); tda18271_dump_regs() 89 /* only dump extended regs if DBG_ADV is set */ tda18271_dump_regs() 96 tda_reg("EXTENDED_BYTE_1 = 0x%02x\n", 0xff & regs[R_EB1]); tda18271_dump_regs() 97 tda_reg("EXTENDED_BYTE_2 = 0x%02x\n", 0xff & regs[R_EB2]); tda18271_dump_regs() 98 tda_reg("EXTENDED_BYTE_3 = 0x%02x\n", 0xff & regs[R_EB3]); tda18271_dump_regs() 99 tda_reg("EXTENDED_BYTE_4 = 0x%02x\n", 0xff & regs[R_EB4]); tda18271_dump_regs() 100 tda_reg("EXTENDED_BYTE_5 = 0x%02x\n", 0xff & regs[R_EB5]); tda18271_dump_regs() 101 tda_reg("EXTENDED_BYTE_6 = 0x%02x\n", 0xff & regs[R_EB6]); tda18271_dump_regs() 102 tda_reg("EXTENDED_BYTE_7 = 0x%02x\n", 0xff & regs[R_EB7]); tda18271_dump_regs() 103 tda_reg("EXTENDED_BYTE_8 = 0x%02x\n", 0xff & regs[R_EB8]); tda18271_dump_regs() 104 tda_reg("EXTENDED_BYTE_9 W = 0x%02x\n", 0xff & regs[R_EB9]); tda18271_dump_regs() 105 tda_reg("EXTENDED_BYTE_10 = 0x%02x\n", 0xff & regs[R_EB10]); tda18271_dump_regs() 106 tda_reg("EXTENDED_BYTE_11 = 0x%02x\n", 0xff & regs[R_EB11]); tda18271_dump_regs() 107 tda_reg("EXTENDED_BYTE_12 = 0x%02x\n", 0xff & regs[R_EB12]); tda18271_dump_regs() 108 tda_reg("EXTENDED_BYTE_13 = 0x%02x\n", 0xff & regs[R_EB13]); tda18271_dump_regs() 109 tda_reg("EXTENDED_BYTE_14 = 0x%02x\n", 0xff & regs[R_EB14]); tda18271_dump_regs() 110 tda_reg("EXTENDED_BYTE_15 = 0x%02x\n", 0xff & regs[R_EB15]); tda18271_dump_regs() 111 tda_reg("EXTENDED_BYTE_16 W = 0x%02x\n", 0xff & regs[R_EB16]); tda18271_dump_regs() 112 tda_reg("EXTENDED_BYTE_17 W = 0x%02x\n", 0xff & regs[R_EB17]); tda18271_dump_regs() 113 tda_reg("EXTENDED_BYTE_18 = 0x%02x\n", 0xff & regs[R_EB18]); tda18271_dump_regs() 114 tda_reg("EXTENDED_BYTE_19 W = 0x%02x\n", 0xff & regs[R_EB19]); tda18271_dump_regs() 115 tda_reg("EXTENDED_BYTE_20 W = 0x%02x\n", 0xff & regs[R_EB20]); tda18271_dump_regs() 116 tda_reg("EXTENDED_BYTE_21 = 0x%02x\n", 0xff & regs[R_EB21]); tda18271_dump_regs() 117 tda_reg("EXTENDED_BYTE_22 = 0x%02x\n", 0xff & regs[R_EB22]); tda18271_dump_regs() 118 tda_reg("EXTENDED_BYTE_23 = 0x%02x\n", 0xff & regs[R_EB23]); tda18271_dump_regs() 124 unsigned char *regs = priv->tda18271_regs; tda18271_read_regs() local 131 .buf = regs, .len = 16 } tda18271_read_regs() 153 unsigned char *regs = priv->tda18271_regs; tda18271_read_extended() local 181 regs[i] = regdump[i]; tda18271_read_extended() 194 unsigned char *regs = priv->tda18271_regs; __tda18271_write_regs() local 236 buf[i] = regs[idx - 1 + i]; __tda18271_write_regs() 272 unsigned char *regs = priv->tda18271_regs; __tda18271_charge_pump_source() local 276 regs[r_cp] &= ~0x20; __tda18271_charge_pump_source() 277 regs[r_cp] |= ((force & 1) << 5); __tda18271_charge_pump_source() 292 unsigned char *regs = priv->tda18271_regs; tda18271_init_regs() local 308 regs[R_ID] = 0x83; tda18271_init_regs() 311 regs[R_ID] = 0x84; tda18271_init_regs() 315 regs[R_TM] = 0x08; tda18271_init_regs() 316 regs[R_PL] = 0x80; tda18271_init_regs() 317 regs[R_EP1] = 0xc6; tda18271_init_regs() 318 regs[R_EP2] = 0xdf; tda18271_init_regs() 319 regs[R_EP3] = 0x16; tda18271_init_regs() 320 regs[R_EP4] = 0x60; tda18271_init_regs() 321 regs[R_EP5] = 0x80; tda18271_init_regs() 322 regs[R_CPD] = 0x80; tda18271_init_regs() 323 regs[R_CD1] = 0x00; tda18271_init_regs() 324 regs[R_CD2] = 0x00; tda18271_init_regs() 325 regs[R_CD3] = 0x00; tda18271_init_regs() 326 regs[R_MPD] = 0x00; tda18271_init_regs() 327 regs[R_MD1] = 0x00; tda18271_init_regs() 328 regs[R_MD2] = 0x00; tda18271_init_regs() 329 regs[R_MD3] = 0x00; tda18271_init_regs() 333 regs[R_EB1] = 0xff; tda18271_init_regs() 336 regs[R_EB1] = 0xfc; tda18271_init_regs() 340 regs[R_EB2] = 0x01; tda18271_init_regs() 341 regs[R_EB3] = 0x84; tda18271_init_regs() 342 regs[R_EB4] = 0x41; tda18271_init_regs() 343 regs[R_EB5] = 0x01; tda18271_init_regs() 344 regs[R_EB6] = 0x84; tda18271_init_regs() 345 regs[R_EB7] = 0x40; tda18271_init_regs() 346 regs[R_EB8] = 0x07; tda18271_init_regs() 347 regs[R_EB9] = 0x00; tda18271_init_regs() 348 regs[R_EB10] = 0x00; tda18271_init_regs() 349 regs[R_EB11] = 0x96; tda18271_init_regs() 353 regs[R_EB12] = 0x0f; tda18271_init_regs() 356 regs[R_EB12] = 0x33; tda18271_init_regs() 360 regs[R_EB13] = 0xc1; tda18271_init_regs() 361 regs[R_EB14] = 0x00; tda18271_init_regs() 362 regs[R_EB15] = 0x8f; tda18271_init_regs() 363 regs[R_EB16] = 0x00; tda18271_init_regs() 364 regs[R_EB17] = 0x00; tda18271_init_regs() 368 regs[R_EB18] = 0x00; tda18271_init_regs() 371 regs[R_EB18] = 0x8c; tda18271_init_regs() 375 regs[R_EB19] = 0x00; tda18271_init_regs() 376 regs[R_EB20] = 0x20; tda18271_init_regs() 380 regs[R_EB21] = 0x33; tda18271_init_regs() 383 regs[R_EB21] = 0xb3; tda18271_init_regs() 387 regs[R_EB22] = 0x48; tda18271_init_regs() 388 regs[R_EB23] = 0xb0; tda18271_init_regs() 393 regs[R_EB17] = 0x00; tda18271_init_regs() 395 regs[R_EB17] = 0x03; tda18271_init_regs() 397 regs[R_EB17] = 0x43; tda18271_init_regs() 399 regs[R_EB17] = 0x4c; tda18271_init_regs() 404 regs[R_EB20] = 0xa0; tda18271_init_regs() 406 regs[R_EB20] = 0xa7; tda18271_init_regs() 408 regs[R_EB20] = 0xe7; tda18271_init_regs() 410 regs[R_EB20] = 0xec; tda18271_init_regs() 417 regs[R_EP3] = 0x1f; tda18271_init_regs() 418 regs[R_EP4] = 0x66; tda18271_init_regs() 419 regs[R_EP5] = 0x81; tda18271_init_regs() 420 regs[R_CPD] = 0xcc; tda18271_init_regs() 421 regs[R_CD1] = 0x6c; tda18271_init_regs() 422 regs[R_CD2] = 0x00; tda18271_init_regs() 423 regs[R_CD3] = 0x00; tda18271_init_regs() 424 regs[R_MPD] = 0xcd; tda18271_init_regs() 425 regs[R_MD1] = 0x77; tda18271_init_regs() 426 regs[R_MD2] = 0x08; tda18271_init_regs() 427 regs[R_MD3] = 0x00; tda18271_init_regs() 446 regs[R_EP5] = 0x85; tda18271_init_regs() 447 regs[R_CPD] = 0xcb; tda18271_init_regs() 448 regs[R_CD1] = 0x66; tda18271_init_regs() 449 regs[R_CD2] = 0x70; tda18271_init_regs() 459 regs[R_EP5] = 0x82; tda18271_init_regs() 460 regs[R_CPD] = 0xa8; tda18271_init_regs() 461 regs[R_CD2] = 0x00; tda18271_init_regs() 462 regs[R_MPD] = 0xa9; tda18271_init_regs() 463 regs[R_MD1] = 0x73; tda18271_init_regs() 464 regs[R_MD2] = 0x1a; tda18271_init_regs() 473 regs[R_EP5] = 0x86; tda18271_init_regs() 474 regs[R_CPD] = 0xa8; tda18271_init_regs() 475 regs[R_CD1] = 0x66; tda18271_init_regs() 476 regs[R_CD2] = 0xa0; tda18271_init_regs() 486 regs[R_EP5] = 0x83; tda18271_init_regs() 487 regs[R_CPD] = 0x98; tda18271_init_regs() 488 regs[R_CD1] = 0x65; tda18271_init_regs() 489 regs[R_CD2] = 0x00; tda18271_init_regs() 490 regs[R_MPD] = 0x99; tda18271_init_regs() 491 regs[R_MD1] = 0x71; tda18271_init_regs() 492 regs[R_MD2] = 0xcd; tda18271_init_regs() 501 regs[R_EP5] = 0x87; tda18271_init_regs() 502 regs[R_CD1] = 0x65; tda18271_init_regs() 503 regs[R_CD2] = 0x50; tda18271_init_regs() 513 regs[R_EP4] = 0x64; tda18271_init_regs() 547 unsigned char *regs = priv->tda18271_regs; tda18271_set_standby_mode() local 552 regs[R_EP3] &= ~0xe0; /* clear sm, sm_lt, sm_xt */ tda18271_set_standby_mode() 553 regs[R_EP3] |= (sm ? (1 << 7) : 0) | tda18271_set_standby_mode() 566 unsigned char *regs = priv->tda18271_regs; tda18271_calc_main_pll() local 574 regs[R_MPD] = (0x7f & pd); tda18271_calc_main_pll() 578 regs[R_MD1] = 0x7f & (div >> 16); tda18271_calc_main_pll() 579 regs[R_MD2] = 0xff & (div >> 8); tda18271_calc_main_pll() 580 regs[R_MD3] = 0xff & div; tda18271_calc_main_pll() 589 unsigned char *regs = priv->tda18271_regs; tda18271_calc_cal_pll() local 597 regs[R_CPD] = pd; tda18271_calc_cal_pll() 601 regs[R_CD1] = 0x7f & (div >> 16); tda18271_calc_cal_pll() 602 regs[R_CD2] = 0xff & (div >> 8); tda18271_calc_cal_pll() 603 regs[R_CD3] = 0xff & div; tda18271_calc_cal_pll() 614 unsigned char *regs = priv->tda18271_regs; tda18271_calc_bp_filter() local 621 regs[R_EP1] &= ~0x07; /* clear bp filter bits */ tda18271_calc_bp_filter() 622 regs[R_EP1] |= (0x07 & val); tda18271_calc_bp_filter() 631 unsigned char *regs = priv->tda18271_regs; tda18271_calc_km() local 638 regs[R_EB13] &= ~0x7c; /* clear k & m bits */ tda18271_calc_km() 639 regs[R_EB13] |= (0x7c & val); tda18271_calc_km() 648 unsigned char *regs = priv->tda18271_regs; tda18271_calc_rf_band() local 655 regs[R_EP2] &= ~0xe0; /* clear rf band bits */ tda18271_calc_rf_band() 656 regs[R_EP2] |= (0xe0 & (val << 5)); tda18271_calc_rf_band() 665 unsigned char *regs = priv->tda18271_regs; tda18271_calc_gain_taper() local 672 regs[R_EP2] &= ~0x1f; /* clear gain taper bits */ tda18271_calc_gain_taper() 673 regs[R_EP2] |= (0x1f & val); tda18271_calc_gain_taper() 682 unsigned char *regs = priv->tda18271_regs; tda18271_calc_ir_measure() local 689 regs[R_EP5] &= ~0x07; tda18271_calc_ir_measure() 690 regs[R_EP5] |= (0x07 & val); tda18271_calc_ir_measure() 699 unsigned char *regs = priv->tda18271_regs; tda18271_calc_rf_cal() local 712 regs[R_EB14] = val; tda18271_calc_rf_cal()
|
H A D | fc0011.c | 188 u8 regs[FC11_NR_REGS] = { }; fc0011_set_params() local 190 regs[FC11_REG_7] = 0x0F; fc0011_set_params() 191 regs[FC11_REG_8] = 0x3E; fc0011_set_params() 192 regs[FC11_REG_10] = 0xB8; fc0011_set_params() 193 regs[FC11_REG_11] = 0x80; fc0011_set_params() 194 regs[FC11_REG_RCCAL] = 0x04; fc0011_set_params() 195 err = fc0011_writereg(priv, FC11_REG_7, regs[FC11_REG_7]); fc0011_set_params() 196 err |= fc0011_writereg(priv, FC11_REG_8, regs[FC11_REG_8]); fc0011_set_params() 197 err |= fc0011_writereg(priv, FC11_REG_10, regs[FC11_REG_10]); fc0011_set_params() 198 err |= fc0011_writereg(priv, FC11_REG_11, regs[FC11_REG_11]); fc0011_set_params() 199 err |= fc0011_writereg(priv, FC11_REG_RCCAL, regs[FC11_REG_RCCAL]); fc0011_set_params() 206 regs[FC11_REG_VCO] = 0x82; fc0011_set_params() 209 regs[FC11_REG_VCO] = 0x42; fc0011_set_params() 212 regs[FC11_REG_VCO] = 0x22; fc0011_set_params() 215 regs[FC11_REG_VCO] = 0x12; fc0011_set_params() 218 regs[FC11_REG_VCO] = 0x0A; fc0011_set_params() 232 regs[FC11_REG_XINHI] = xin >> 8; fc0011_set_params() 233 regs[FC11_REG_XINLO] = xin; fc0011_set_params() 254 regs[FC11_REG_FA] = fa; fc0011_set_params() 255 regs[FC11_REG_FP] = fp; fc0011_set_params() 262 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M; fc0011_set_params() 271 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW6M; fc0011_set_params() 278 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 281 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 282 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_1; fc0011_set_params() 285 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 286 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_2; fc0011_set_params() 291 regs[FC11_REG_FA] = 0x6; fc0011_set_params() 292 regs[FC11_REG_FP] = 0x11; fc0011_set_params() 296 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_CLKOUT; fc0011_set_params() 300 err = fc0011_writereg(priv, i, regs[i]); fc0011_set_params() 324 err |= fc0011_writereg(priv, i, regs[i]); fc0011_set_params() 325 err |= fc0011_writereg(priv, FC11_REG_7, regs[FC11_REG_7]); fc0011_set_params() 326 err |= fc0011_writereg(priv, FC11_REG_8, regs[FC11_REG_8]); fc0011_set_params() 327 err |= fc0011_writereg(priv, FC11_REG_10, regs[FC11_REG_10]); fc0011_set_params() 328 err |= fc0011_writereg(priv, FC11_REG_11, regs[FC11_REG_11]); fc0011_set_params() 329 err |= fc0011_writereg(priv, FC11_REG_RCCAL, regs[FC11_REG_RCCAL]); fc0011_set_params() 354 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 355 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_1; fc0011_set_params() 357 regs[FC11_REG_VCOSEL]); fc0011_set_params() 364 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 366 regs[FC11_REG_VCOSEL]); fc0011_set_params() 373 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 374 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_2; fc0011_set_params() 376 regs[FC11_REG_VCOSEL]); fc0011_set_params() 383 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 384 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_1; fc0011_set_params() 386 regs[FC11_REG_VCOSEL]); fc0011_set_params() 390 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 392 regs[FC11_REG_VCOSEL]); fc0011_set_params() 402 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 403 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_1; fc0011_set_params() 405 regs[FC11_REG_VCOSEL]); fc0011_set_params() 412 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); fc0011_set_params() 413 regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_2; fc0011_set_params() 415 regs[FC11_REG_VCOSEL]); fc0011_set_params() 426 err = fc0011_readreg(priv, FC11_REG_RCCAL, ®s[FC11_REG_RCCAL]); fc0011_set_params() 429 regs[FC11_REG_RCCAL] |= FC11_RCCAL_FORCE; fc0011_set_params() 430 err = fc0011_writereg(priv, FC11_REG_RCCAL, regs[FC11_REG_RCCAL]); fc0011_set_params() 433 regs[FC11_REG_16] = 0xB; fc0011_set_params() 434 err = fc0011_writereg(priv, FC11_REG_16, regs[FC11_REG_16]); fc0011_set_params() 441 (unsigned int)regs[FC11_REG_FA], fc0011_set_params() 442 (unsigned int)regs[FC11_REG_FP], fc0011_set_params() 443 (unsigned int)regs[FC11_REG_XINHI], fc0011_set_params() 444 (unsigned int)regs[FC11_REG_XINLO], fc0011_set_params() 445 (unsigned int)regs[FC11_REG_VCO], fc0011_set_params() 446 (unsigned int)regs[FC11_REG_VCOSEL], fc0011_set_params()
|
/linux-4.1.27/arch/mn10300/kernel/ |
H A D | kgdb.c | 19 #include <asm/serial-regs.h> 32 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) pt_regs_to_gdb_regs() argument 34 unsigned long ssp = (unsigned long) (regs + 1); pt_regs_to_gdb_regs() 36 gdb_regs[GDB_FR_D0] = regs->d0; pt_regs_to_gdb_regs() 37 gdb_regs[GDB_FR_D1] = regs->d1; pt_regs_to_gdb_regs() 38 gdb_regs[GDB_FR_D2] = regs->d2; pt_regs_to_gdb_regs() 39 gdb_regs[GDB_FR_D3] = regs->d3; pt_regs_to_gdb_regs() 40 gdb_regs[GDB_FR_A0] = regs->a0; pt_regs_to_gdb_regs() 41 gdb_regs[GDB_FR_A1] = regs->a1; pt_regs_to_gdb_regs() 42 gdb_regs[GDB_FR_A2] = regs->a2; pt_regs_to_gdb_regs() 43 gdb_regs[GDB_FR_A3] = regs->a3; pt_regs_to_gdb_regs() 44 gdb_regs[GDB_FR_SP] = (regs->epsw & EPSW_nSL) ? regs->sp : ssp; pt_regs_to_gdb_regs() 45 gdb_regs[GDB_FR_PC] = regs->pc; pt_regs_to_gdb_regs() 46 gdb_regs[GDB_FR_MDR] = regs->mdr; pt_regs_to_gdb_regs() 47 gdb_regs[GDB_FR_EPSW] = regs->epsw; pt_regs_to_gdb_regs() 48 gdb_regs[GDB_FR_LIR] = regs->lir; pt_regs_to_gdb_regs() 49 gdb_regs[GDB_FR_LAR] = regs->lar; pt_regs_to_gdb_regs() 50 gdb_regs[GDB_FR_MDRQ] = regs->mdrq; pt_regs_to_gdb_regs() 51 gdb_regs[GDB_FR_E0] = regs->e0; pt_regs_to_gdb_regs() 52 gdb_regs[GDB_FR_E1] = regs->e1; pt_regs_to_gdb_regs() 53 gdb_regs[GDB_FR_E2] = regs->e2; pt_regs_to_gdb_regs() 54 gdb_regs[GDB_FR_E3] = regs->e3; pt_regs_to_gdb_regs() 55 gdb_regs[GDB_FR_E4] = regs->e4; pt_regs_to_gdb_regs() 56 gdb_regs[GDB_FR_E5] = regs->e5; pt_regs_to_gdb_regs() 57 gdb_regs[GDB_FR_E6] = regs->e6; pt_regs_to_gdb_regs() 58 gdb_regs[GDB_FR_E7] = regs->e7; pt_regs_to_gdb_regs() 61 gdb_regs[GDB_FR_USP] = regs->sp; pt_regs_to_gdb_regs() 62 gdb_regs[GDB_FR_MCRH] = regs->mcrh; pt_regs_to_gdb_regs() 63 gdb_regs[GDB_FR_MCRL] = regs->mcrl; pt_regs_to_gdb_regs() 64 gdb_regs[GDB_FR_MCVF] = regs->mcvf; pt_regs_to_gdb_regs() 86 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs_to_pt_regs() argument 88 regs->d0 = gdb_regs[GDB_FR_D0]; gdb_regs_to_pt_regs() 89 regs->d1 = gdb_regs[GDB_FR_D1]; gdb_regs_to_pt_regs() 90 regs->d2 = gdb_regs[GDB_FR_D2]; gdb_regs_to_pt_regs() 91 regs->d3 = gdb_regs[GDB_FR_D3]; gdb_regs_to_pt_regs() 92 regs->a0 = gdb_regs[GDB_FR_A0]; gdb_regs_to_pt_regs() 93 regs->a1 = gdb_regs[GDB_FR_A1]; gdb_regs_to_pt_regs() 94 regs->a2 = gdb_regs[GDB_FR_A2]; gdb_regs_to_pt_regs() 95 regs->a3 = gdb_regs[GDB_FR_A3]; gdb_regs_to_pt_regs() 96 regs->sp = gdb_regs[GDB_FR_SP]; gdb_regs_to_pt_regs() 97 regs->pc = gdb_regs[GDB_FR_PC]; gdb_regs_to_pt_regs() 98 regs->mdr = gdb_regs[GDB_FR_MDR]; gdb_regs_to_pt_regs() 99 regs->epsw = gdb_regs[GDB_FR_EPSW]; gdb_regs_to_pt_regs() 100 regs->lir = gdb_regs[GDB_FR_LIR]; gdb_regs_to_pt_regs() 101 regs->lar = gdb_regs[GDB_FR_LAR]; gdb_regs_to_pt_regs() 102 regs->mdrq = gdb_regs[GDB_FR_MDRQ]; gdb_regs_to_pt_regs() 103 regs->e0 = gdb_regs[GDB_FR_E0]; gdb_regs_to_pt_regs() 104 regs->e1 = gdb_regs[GDB_FR_E1]; gdb_regs_to_pt_regs() 105 regs->e2 = gdb_regs[GDB_FR_E2]; gdb_regs_to_pt_regs() 106 regs->e3 = gdb_regs[GDB_FR_E3]; gdb_regs_to_pt_regs() 107 regs->e4 = gdb_regs[GDB_FR_E4]; gdb_regs_to_pt_regs() 108 regs->e5 = gdb_regs[GDB_FR_E5]; gdb_regs_to_pt_regs() 109 regs->e6 = gdb_regs[GDB_FR_E6]; gdb_regs_to_pt_regs() 110 regs->e7 = gdb_regs[GDB_FR_E7]; gdb_regs_to_pt_regs() 111 regs->sp = gdb_regs[GDB_FR_SSP]; gdb_regs_to_pt_regs() 113 // regs->usp = gdb_regs[GDB_FR_USP]; gdb_regs_to_pt_regs() 114 regs->mcrh = gdb_regs[GDB_FR_MCRH]; gdb_regs_to_pt_regs() 115 regs->mcrl = gdb_regs[GDB_FR_MCRL]; gdb_regs_to_pt_regs() 116 regs->mcvf = gdb_regs[GDB_FR_MCVF]; gdb_regs_to_pt_regs() 120 // regs->fpcr = gdb_regs[GDB_FR_FPCR]; gdb_regs_to_pt_regs() 121 // regs->fs0 = gdb_regs[GDB_FR_FS0]; gdb_regs_to_pt_regs() 155 static int kgdb_arch_do_singlestep(struct pt_regs *regs) kgdb_arch_do_singlestep() argument 159 u8 *pc = (u8 *)regs->pc, *sp = (u8 *)(regs + 1), cur; kgdb_arch_do_singlestep() 188 if (regs->pc == regs->lar) kgdb_arch_do_singlestep() 190 y = (u8 *)regs->lar; kgdb_arch_do_singlestep() 219 x = (u8 *)regs->mdr; kgdb_arch_do_singlestep() 240 case 0: x = (u8 *)regs->a0; break; kgdb_arch_do_singlestep() 241 case 1: x = (u8 *)regs->a1; break; kgdb_arch_do_singlestep() 242 case 2: x = (u8 *)regs->a2; break; kgdb_arch_do_singlestep() 243 case 3: x = (u8 *)regs->a3; break; kgdb_arch_do_singlestep() 360 static bool kgdb_arch_undo_singlestep(struct pt_regs *regs) kgdb_arch_undo_singlestep() argument 368 if (x == (u8 *)regs->pc) kgdb_arch_undo_singlestep() 378 if (y == (u8 *)regs->pc) kgdb_arch_undo_singlestep() 418 struct pt_regs *regs) kgdb_arch_handle_exception() 429 regs->pc = addr; kgdb_arch_handle_exception() 435 kgdb_arch_do_singlestep(regs); kgdb_arch_handle_exception() 450 struct pt_regs *regs) debugger_intercept() 454 if (kgdb_arch_undo_singlestep(regs)) { debugger_intercept() 460 ret = kgdb_handle_exception(excep, signo, si_code, regs); debugger_intercept() 470 int at_debugger_breakpoint(struct pt_regs *regs) at_debugger_breakpoint() argument 472 return regs->pc == (unsigned long)&__arch_kgdb_breakpoint; at_debugger_breakpoint() 491 void debugger_nmi_interrupt(struct pt_regs *regs, enum exception_code code) debugger_nmi_interrupt() argument 493 kgdb_nmicallback(arch_smp_processor_id(), regs); debugger_nmi_interrupt() local 416 kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *regs) kgdb_arch_handle_exception() argument 449 debugger_intercept(enum exception_code excep, int signo, int si_code, struct pt_regs *regs) debugger_intercept() argument
|
H A D | traps.c | 37 #include <asm/cpu-regs.h> 38 #include <asm/busctl-regs.h> 125 int die_if_no_fixup(const char *str, struct pt_regs *regs, die_if_no_fixup() argument 131 if (user_mode(regs)) die_if_no_fixup() 153 if (fixup_exception(regs)) die_if_no_fixup() 159 if (probe_kernel_read(&opcode, (u8 *)regs->pc, 1) < 0) die_if_no_fixup() 162 if (notify_die(DIE_BREAKPOINT, str, regs, code, 0, 0)) die_if_no_fixup() 164 if (at_debugger_breakpoint(regs)) die_if_no_fixup() 165 regs->pc++; die_if_no_fixup() 173 regs->pc -= 2; die_if_no_fixup() 177 if (report_bug(regs->pc, regs) == BUG_TRAP_TYPE_WARN) die_if_no_fixup() 181 regs->pc -= 2; die_if_no_fixup() 188 if (debugger_intercept(code, signo, si_code, regs) == 0) die_if_no_fixup() 191 if (notify_die(DIE_GPF, str, regs, code, 0, 0)) die_if_no_fixup() 195 die(str, regs, code); die_if_no_fixup() 201 asmlinkage void handle_exception(struct pt_regs *regs, u32 intcode) handle_exception() argument 206 if (die_if_no_fixup(NULL, regs, intcode)) handle_exception() 213 info.si_addr = (void *) regs->pc; handle_exception() 220 asmlinkage void nmi(struct pt_regs *regs, enum exception_code code) nmi() argument 223 if (debugger_intercept(code, SIGQUIT, 0, regs)) nmi() 227 show_registers(regs); nmi() 299 void show_registers_only(struct pt_regs *regs) show_registers_only() argument 303 ssp = (unsigned long) regs + sizeof(*regs); show_registers_only() 306 regs->pc, regs->epsw, ssp, user_mode(regs) ? "User" : "Super"); show_registers_only() 308 regs->d0, regs->d1, regs->d2, regs->d3); show_registers_only() 310 regs->a0, regs->a1, regs->a2, regs->a3); show_registers_only() 312 regs->e0, regs->e1, regs->e2, regs->e3); show_registers_only() 314 regs->e4, regs->e5, regs->e6, regs->e7); show_registers_only() 316 regs->lar, regs->lir, regs->mdr, regs->sp); show_registers_only() 318 regs->mcvf, regs->mcrl, regs->mcrh, regs->mdrq); show_registers_only() 345 void show_registers(struct pt_regs *regs) show_registers() argument 350 show_registers_only(regs); show_registers() 352 if (!user_mode(regs)) show_registers() 353 sp = (unsigned long) regs + sizeof(*regs); show_registers() 355 sp = regs->sp; show_registers() 360 if (!user_mode(regs)) { show_registers() 366 if (regs->pc < PAGE_OFFSET) show_registers() 371 if (__get_user(c, &((unsigned char *) regs->pc)[i])) show_registers() 407 void die(const char *str, struct pt_regs *regs, enum exception_code code) die() argument 413 show_registers(regs); die() 415 if (regs->pc >= 0x02000000 && regs->pc < 0x04000000 && die() 416 (regs->epsw & (EPSW_IM | EPSW_IE)) != (EPSW_IM | EPSW_IE)) { die() 429 asmlinkage void do_double_fault(struct pt_regs *regs) do_double_fault() argument 437 show_registers(regs); do_double_fault() 443 asmlinkage void io_bus_error(u32 bcberr, u32 bcbear, struct pt_regs *regs) io_bus_error() argument 492 show_registers(regs); io_bus_error() 500 asmlinkage void uninitialised_exception(struct pt_regs *regs, uninitialised_exception() argument 505 if (debugger_intercept(code, SIGSYS, 0, regs) == 0) uninitialised_exception() 510 show_registers(regs); uninitialised_exception()
|
/linux-4.1.27/arch/cris/include/arch-v10/arch/ |
H A D | elf.h | 42 struct; regs is a pt_regs struct. We dump all registers, though several are 45 #define ELF_CORE_COPY_REGS(pr_reg, regs) \ 46 pr_reg[0] = regs->r0; \ 47 pr_reg[1] = regs->r1; \ 48 pr_reg[2] = regs->r2; \ 49 pr_reg[3] = regs->r3; \ 50 pr_reg[4] = regs->r4; \ 51 pr_reg[5] = regs->r5; \ 52 pr_reg[6] = regs->r6; \ 53 pr_reg[7] = regs->r7; \ 54 pr_reg[8] = regs->r8; \ 55 pr_reg[9] = regs->r9; \ 56 pr_reg[10] = regs->r10; \ 57 pr_reg[11] = regs->r11; \ 58 pr_reg[12] = regs->r12; \ 59 pr_reg[13] = regs->r13; \ 61 pr_reg[15] = regs->irp; /* pc */ \ 67 pr_reg[21] = (regs->dccr & 0xffff); /* ccr */ \ 69 pr_reg[23] = regs->mof; /* mof */ \ 73 pr_reg[27] = regs->srp; /* srp */ \ 75 pr_reg[29] = regs->dccr; /* dccr */ \
|
/linux-4.1.27/drivers/media/platform/exynos-gsc/ |
H A D | Makefile | 1 exynos-gsc-objs := gsc-core.o gsc-m2m.o gsc-regs.o
|
/linux-4.1.27/arch/metag/oprofile/ |
H A D | backtrace.h | 4 void metag_backtrace(struct pt_regs * const regs, unsigned int depth);
|
/linux-4.1.27/arch/openrisc/include/asm/ |
H A D | syscall.h | 27 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 29 return regs->orig_gpr11; syscall_get_nr() 33 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 35 regs->gpr[11] = regs->orig_gpr11; syscall_rollback() 39 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 41 return IS_ERR_VALUE(regs->gpr[11]) ? regs->gpr[11] : 0; syscall_get_error() 45 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 47 return regs->gpr[11]; syscall_get_return_value() 51 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, syscall_set_return_value() argument 54 regs->gpr[11] = (long) error ?: val; syscall_set_return_value() 58 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, syscall_get_arguments() argument 63 memcpy(args, ®s->gpr[3 + i], n * sizeof(args[0])); syscall_get_arguments() 67 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, syscall_set_arguments() argument 72 memcpy(®s->gpr[3 + i], args, n * sizeof(args[0])); syscall_set_arguments()
|
/linux-4.1.27/arch/arm/mach-pxa/include/mach/ |
H A D | pxa3xx.h | 5 #include <mach/pxa3xx-regs.h>
|
H A D | pxa25x.h | 5 #include <mach/pxa2xx-regs.h>
|
/linux-4.1.27/arch/arm/mm/ |
H A D | extable.c | 7 int fixup_exception(struct pt_regs *regs) fixup_exception() argument 11 fixup = search_exception_tables(instruction_pointer(regs)); fixup_exception() 13 regs->ARM_pc = fixup->fixup; fixup_exception() 16 regs->ARM_cpsr &= ~PSR_IT_MASK; fixup_exception()
|
/linux-4.1.27/arch/arc/include/asm/ |
H A D | syscall.h | 18 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 20 if (user_mode(regs) && in_syscall(regs)) syscall_get_nr() 21 return regs->r8; syscall_get_nr() 27 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 29 regs->r0 = regs->orig_r0; syscall_rollback() 33 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 36 return IS_ERR_VALUE(regs->r0) ? regs->r0 : 0; syscall_get_error() 40 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 42 return regs->r0; syscall_get_return_value() 46 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, syscall_set_return_value() argument 49 regs->r0 = (long) error ?: val; syscall_set_return_value() 57 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, syscall_get_arguments() argument 60 unsigned long *inside_ptregs = &(regs->r0); syscall_get_arguments()
|
H A D | ptrace.h | 17 /* THE pt_regs: Defines how regs are saved during entry into kernel */ 66 #define instruction_pointer(regs) (unsigned long)((regs)->ret) 67 #define profile_pc(regs) instruction_pointer(regs) 70 #define user_mode(regs) (regs->status32 & STATUS_U_MASK) 72 #define user_stack_pointer(regs)\ 74 if (user_mode(regs)) \ 75 sp = (regs)->sp;\ 82 #define delay_mode(regs) ((regs->status32 & STATUS_DE_MASK) == STATUS_DE_MASK) 84 #define in_syscall(regs) ((regs->ecr_vec == ECR_V_TRAP) && !regs->ecr_param) 85 #define in_brkpt_trap(regs) ((regs->ecr_vec == ECR_V_TRAP) && regs->ecr_param) 100 static inline long regs_return_value(struct pt_regs *regs) regs_return_value() argument 102 return regs->r0; regs_return_value()
|
/linux-4.1.27/arch/um/include/asm/ |
H A D | ptrace-generic.h | 15 struct uml_pt_regs regs; member in struct:pt_regs 20 #define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS } 22 #define PT_REGS_IP(r) UPT_IP(&(r)->regs) 23 #define PT_REGS_SP(r) UPT_SP(&(r)->regs) 25 #define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs) 27 #define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs) 29 #define instruction_pointer(regs) PT_REGS_IP(regs) 40 extern void syscall_trace_enter(struct pt_regs *regs); 41 extern void syscall_trace_leave(struct pt_regs *regs);
|
/linux-4.1.27/arch/arm64/kernel/ |
H A D | perf_regs.c | 10 u64 perf_reg_value(struct pt_regs *regs, int idx) perf_reg_value() argument 20 if (compat_user_mode(regs)) { perf_reg_value() 22 return regs->compat_sp; perf_reg_value() 24 return regs->compat_lr; perf_reg_value() 28 return regs->sp; perf_reg_value() 31 return regs->pc; perf_reg_value() 33 return regs->regs[idx]; perf_reg_value() 55 struct pt_regs *regs, perf_get_regs_user() 58 regs_user->regs = task_pt_regs(current); perf_get_regs_user() 54 perf_get_regs_user(struct perf_regs *regs_user, struct pt_regs *regs, struct pt_regs *regs_user_copy) perf_get_regs_user() argument
|
H A D | signal.c | 95 static int restore_sigframe(struct pt_regs *regs, restore_sigframe() argument 107 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], restore_sigframe() 109 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); restore_sigframe() 110 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); restore_sigframe() 111 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); restore_sigframe() 116 regs->syscallno = ~0UL; restore_sigframe() 118 err |= !valid_user_regs(®s->user_regs); restore_sigframe() 129 asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) sys_rt_sigreturn() argument 140 if (regs->sp & 15) sys_rt_sigreturn() 143 frame = (struct rt_sigframe __user *)regs->sp; sys_rt_sigreturn() 148 if (restore_sigframe(regs, frame)) sys_rt_sigreturn() 154 return regs->regs[0]; sys_rt_sigreturn() 160 regs->pc, regs->sp); sys_rt_sigreturn() 166 struct pt_regs *regs, sigset_t *set) setup_sigframe() 173 __put_user_error(regs->regs[29], &sf->fp, err); setup_sigframe() 174 __put_user_error(regs->regs[30], &sf->lr, err); setup_sigframe() 177 __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], setup_sigframe() 179 __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); setup_sigframe() 180 __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); setup_sigframe() 181 __put_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); setup_sigframe() 213 struct pt_regs *regs) get_sigframe() 218 sp = sp_top = sigsp(regs->sp, ksig); get_sigframe() 232 static void setup_return(struct pt_regs *regs, struct k_sigaction *ka, setup_return() argument 237 regs->regs[0] = usig; setup_return() 238 regs->sp = (unsigned long)frame; setup_return() 239 regs->regs[29] = regs->sp + offsetof(struct rt_sigframe, fp); setup_return() 240 regs->pc = (unsigned long)ka->sa.sa_handler; setup_return() 247 regs->regs[30] = (unsigned long)sigtramp; setup_return() 251 struct pt_regs *regs) setup_rt_frame() 256 frame = get_sigframe(ksig, regs); setup_rt_frame() 263 err |= __save_altstack(&frame->uc.uc_stack, regs->sp); setup_rt_frame() 264 err |= setup_sigframe(frame, regs, set); setup_rt_frame() 266 setup_return(regs, &ksig->ka, frame, usig); setup_rt_frame() 269 regs->regs[1] = (unsigned long)&frame->info; setup_rt_frame() 270 regs->regs[2] = (unsigned long)&frame->uc; setup_rt_frame() 277 static void setup_restart_syscall(struct pt_regs *regs) setup_restart_syscall() argument 280 compat_setup_restart_syscall(regs); setup_restart_syscall() 282 regs->regs[8] = __NR_restart_syscall; setup_restart_syscall() 288 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 300 ret = compat_setup_rt_frame(usig, ksig, oldset, regs); handle_signal() 302 ret = compat_setup_frame(usig, ksig, oldset, regs); handle_signal() 304 ret = setup_rt_frame(usig, ksig, oldset, regs); handle_signal() 310 ret |= !valid_user_regs(®s->user_regs); handle_signal() 331 static void do_signal(struct pt_regs *regs) do_signal() argument 335 int syscall = (int)regs->syscallno; do_signal() 342 continue_addr = regs->pc; do_signal() 343 restart_addr = continue_addr - (compat_thumb_mode(regs) ? 2 : 4); do_signal() 344 retval = regs->regs[0]; do_signal() 349 regs->syscallno = ~0UL; do_signal() 360 regs->regs[0] = regs->orig_x0; do_signal() 361 regs->pc = restart_addr; do_signal() 376 if (regs->pc == restart_addr && do_signal() 381 regs->regs[0] = -EINTR; do_signal() 382 regs->pc = continue_addr; do_signal() 385 handle_signal(&ksig, regs); do_signal() 393 if (syscall >= 0 && regs->pc == restart_addr) { do_signal() 395 setup_restart_syscall(regs); do_signal() 402 asmlinkage void do_notify_resume(struct pt_regs *regs, do_notify_resume() argument 406 do_signal(regs); do_notify_resume() 410 tracehook_notify_resume(regs); do_notify_resume() 165 setup_sigframe(struct rt_sigframe __user *sf, struct pt_regs *regs, sigset_t *set) setup_sigframe() argument 212 get_sigframe(struct ksignal *ksig, struct pt_regs *regs) get_sigframe() argument 250 setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | kgdb.c | 28 { "x0", 8, offsetof(struct pt_regs, regs[0])}, 29 { "x1", 8, offsetof(struct pt_regs, regs[1])}, 30 { "x2", 8, offsetof(struct pt_regs, regs[2])}, 31 { "x3", 8, offsetof(struct pt_regs, regs[3])}, 32 { "x4", 8, offsetof(struct pt_regs, regs[4])}, 33 { "x5", 8, offsetof(struct pt_regs, regs[5])}, 34 { "x6", 8, offsetof(struct pt_regs, regs[6])}, 35 { "x7", 8, offsetof(struct pt_regs, regs[7])}, 36 { "x8", 8, offsetof(struct pt_regs, regs[8])}, 37 { "x9", 8, offsetof(struct pt_regs, regs[9])}, 38 { "x10", 8, offsetof(struct pt_regs, regs[10])}, 39 { "x11", 8, offsetof(struct pt_regs, regs[11])}, 40 { "x12", 8, offsetof(struct pt_regs, regs[12])}, 41 { "x13", 8, offsetof(struct pt_regs, regs[13])}, 42 { "x14", 8, offsetof(struct pt_regs, regs[14])}, 43 { "x15", 8, offsetof(struct pt_regs, regs[15])}, 44 { "x16", 8, offsetof(struct pt_regs, regs[16])}, 45 { "x17", 8, offsetof(struct pt_regs, regs[17])}, 46 { "x18", 8, offsetof(struct pt_regs, regs[18])}, 47 { "x19", 8, offsetof(struct pt_regs, regs[19])}, 48 { "x20", 8, offsetof(struct pt_regs, regs[20])}, 49 { "x21", 8, offsetof(struct pt_regs, regs[21])}, 50 { "x22", 8, offsetof(struct pt_regs, regs[22])}, 51 { "x23", 8, offsetof(struct pt_regs, regs[23])}, 52 { "x24", 8, offsetof(struct pt_regs, regs[24])}, 53 { "x25", 8, offsetof(struct pt_regs, regs[25])}, 54 { "x26", 8, offsetof(struct pt_regs, regs[26])}, 55 { "x27", 8, offsetof(struct pt_regs, regs[27])}, 56 { "x28", 8, offsetof(struct pt_regs, regs[28])}, 57 { "x29", 8, offsetof(struct pt_regs, regs[29])}, 58 { "x30", 8, offsetof(struct pt_regs, regs[30])}, 98 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) dbg_get_reg() argument 104 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, dbg_get_reg() 111 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) dbg_set_reg() argument 117 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, dbg_set_reg() 130 memcpy((void *)gdb_regs, (void *)thread_regs->regs, GP_REG_BYTES); sleeping_thread_to_gdb_regs() 133 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) kgdb_arch_set_pc() argument 135 regs->pc = pc; kgdb_arch_set_pc() 140 static void kgdb_arch_update_addr(struct pt_regs *regs, kgdb_arch_update_addr() argument 148 kgdb_arch_set_pc(regs, addr); kgdb_arch_update_addr() 150 kgdb_arch_set_pc(regs, regs->pc + 4); kgdb_arch_update_addr() 216 static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr) kgdb_brk_fn() argument 218 kgdb_handle_exception(1, SIGTRAP, 0, regs); kgdb_brk_fn() 222 static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) kgdb_compiled_brk_fn() argument 225 kgdb_handle_exception(1, SIGTRAP, 0, regs); kgdb_compiled_brk_fn() 230 static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr) kgdb_step_brk_fn() argument 232 kgdb_handle_exception(1, SIGTRAP, 0, regs); kgdb_step_brk_fn() 266 struct pt_regs *regs = args->regs; __kgdb_notify() local 268 if (kgdb_handle_exception(1, args->signr, cmd, regs)) __kgdb_notify()
|
H A D | signal32.c | 323 static int compat_restore_sigframe(struct pt_regs *regs, compat_restore_sigframe() argument 336 __get_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err); compat_restore_sigframe() 337 __get_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err); compat_restore_sigframe() 338 __get_user_error(regs->regs[2], &sf->uc.uc_mcontext.arm_r2, err); compat_restore_sigframe() 339 __get_user_error(regs->regs[3], &sf->uc.uc_mcontext.arm_r3, err); compat_restore_sigframe() 340 __get_user_error(regs->regs[4], &sf->uc.uc_mcontext.arm_r4, err); compat_restore_sigframe() 341 __get_user_error(regs->regs[5], &sf->uc.uc_mcontext.arm_r5, err); compat_restore_sigframe() 342 __get_user_error(regs->regs[6], &sf->uc.uc_mcontext.arm_r6, err); compat_restore_sigframe() 343 __get_user_error(regs->regs[7], &sf->uc.uc_mcontext.arm_r7, err); compat_restore_sigframe() 344 __get_user_error(regs->regs[8], &sf->uc.uc_mcontext.arm_r8, err); compat_restore_sigframe() 345 __get_user_error(regs->regs[9], &sf->uc.uc_mcontext.arm_r9, err); compat_restore_sigframe() 346 __get_user_error(regs->regs[10], &sf->uc.uc_mcontext.arm_r10, err); compat_restore_sigframe() 347 __get_user_error(regs->regs[11], &sf->uc.uc_mcontext.arm_fp, err); compat_restore_sigframe() 348 __get_user_error(regs->regs[12], &sf->uc.uc_mcontext.arm_ip, err); compat_restore_sigframe() 349 __get_user_error(regs->compat_sp, &sf->uc.uc_mcontext.arm_sp, err); compat_restore_sigframe() 350 __get_user_error(regs->compat_lr, &sf->uc.uc_mcontext.arm_lr, err); compat_restore_sigframe() 351 __get_user_error(regs->pc, &sf->uc.uc_mcontext.arm_pc, err); compat_restore_sigframe() 352 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.arm_cpsr, err); compat_restore_sigframe() 357 regs->syscallno = ~0UL; compat_restore_sigframe() 359 err |= !valid_user_regs(®s->user_regs); compat_restore_sigframe() 368 asmlinkage int compat_sys_sigreturn(struct pt_regs *regs) compat_sys_sigreturn() argument 380 if (regs->compat_sp & 7) compat_sys_sigreturn() 383 frame = (struct compat_sigframe __user *)regs->compat_sp; compat_sys_sigreturn() 388 if (compat_restore_sigframe(regs, frame)) compat_sys_sigreturn() 391 return regs->regs[0]; compat_sys_sigreturn() 397 regs->pc, regs->sp); compat_sys_sigreturn() 402 asmlinkage int compat_sys_rt_sigreturn(struct pt_regs *regs) compat_sys_rt_sigreturn() argument 414 if (regs->compat_sp & 7) compat_sys_rt_sigreturn() 417 frame = (struct compat_rt_sigframe __user *)regs->compat_sp; compat_sys_rt_sigreturn() 422 if (compat_restore_sigframe(regs, &frame->sig)) compat_sys_rt_sigreturn() 428 return regs->regs[0]; compat_sys_rt_sigreturn() 434 regs->pc, regs->sp); compat_sys_rt_sigreturn() 440 struct pt_regs *regs, compat_get_sigframe() 443 compat_ulong_t sp = sigsp(regs->compat_sp, ksig); compat_get_sigframe() 460 static void compat_setup_return(struct pt_regs *regs, struct k_sigaction *ka, compat_setup_return() argument 466 compat_ulong_t spsr = regs->pstate & ~(PSR_f | COMPAT_PSR_E_BIT); compat_setup_return() 497 regs->regs[0] = usig; compat_setup_return() 498 regs->compat_sp = ptr_to_compat(frame); compat_setup_return() 499 regs->compat_lr = retcode; compat_setup_return() 500 regs->pc = handler; compat_setup_return() 501 regs->pstate = spsr; compat_setup_return() 505 struct pt_regs *regs, sigset_t *set) compat_setup_sigframe() 510 __put_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err); compat_setup_sigframe() 511 __put_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err); compat_setup_sigframe() 512 __put_user_error(regs->regs[2], &sf->uc.uc_mcontext.arm_r2, err); compat_setup_sigframe() 513 __put_user_error(regs->regs[3], &sf->uc.uc_mcontext.arm_r3, err); compat_setup_sigframe() 514 __put_user_error(regs->regs[4], &sf->uc.uc_mcontext.arm_r4, err); compat_setup_sigframe() 515 __put_user_error(regs->regs[5], &sf->uc.uc_mcontext.arm_r5, err); compat_setup_sigframe() 516 __put_user_error(regs->regs[6], &sf->uc.uc_mcontext.arm_r6, err); compat_setup_sigframe() 517 __put_user_error(regs->regs[7], &sf->uc.uc_mcontext.arm_r7, err); compat_setup_sigframe() 518 __put_user_error(regs->regs[8], &sf->uc.uc_mcontext.arm_r8, err); compat_setup_sigframe() 519 __put_user_error(regs->regs[9], &sf->uc.uc_mcontext.arm_r9, err); compat_setup_sigframe() 520 __put_user_error(regs->regs[10], &sf->uc.uc_mcontext.arm_r10, err); compat_setup_sigframe() 521 __put_user_error(regs->regs[11], &sf->uc.uc_mcontext.arm_fp, err); compat_setup_sigframe() 522 __put_user_error(regs->regs[12], &sf->uc.uc_mcontext.arm_ip, err); compat_setup_sigframe() 523 __put_user_error(regs->compat_sp, &sf->uc.uc_mcontext.arm_sp, err); compat_setup_sigframe() 524 __put_user_error(regs->compat_lr, &sf->uc.uc_mcontext.arm_lr, err); compat_setup_sigframe() 525 __put_user_error(regs->pc, &sf->uc.uc_mcontext.arm_pc, err); compat_setup_sigframe() 526 __put_user_error(regs->pstate, &sf->uc.uc_mcontext.arm_cpsr, err); compat_setup_sigframe() 550 sigset_t *set, struct pt_regs *regs) compat_setup_rt_frame() 555 frame = compat_get_sigframe(ksig, regs, sizeof(*frame)); compat_setup_rt_frame() 565 err |= __compat_save_altstack(&frame->sig.uc.uc_stack, regs->compat_sp); compat_setup_rt_frame() 567 err |= compat_setup_sigframe(&frame->sig, regs, set); compat_setup_rt_frame() 570 compat_setup_return(regs, &ksig->ka, frame->sig.retcode, frame, usig); compat_setup_rt_frame() 571 regs->regs[1] = (compat_ulong_t)(unsigned long)&frame->info; compat_setup_rt_frame() 572 regs->regs[2] = (compat_ulong_t)(unsigned long)&frame->sig.uc; compat_setup_rt_frame() 579 struct pt_regs *regs) compat_setup_frame() 584 frame = compat_get_sigframe(ksig, regs, sizeof(*frame)); compat_setup_frame() 591 err |= compat_setup_sigframe(frame, regs, set); compat_setup_frame() 593 compat_setup_return(regs, &ksig->ka, frame->retcode, frame, usig); compat_setup_frame() 598 void compat_setup_restart_syscall(struct pt_regs *regs) compat_setup_restart_syscall() argument 600 regs->regs[7] = __NR_compat_restart_syscall; compat_setup_restart_syscall() 439 compat_get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize) compat_get_sigframe() argument 504 compat_setup_sigframe(struct compat_sigframe __user *sf, struct pt_regs *regs, sigset_t *set) compat_setup_sigframe() argument 549 compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) compat_setup_rt_frame() argument 578 compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) compat_setup_frame() argument
|
/linux-4.1.27/arch/frv/include/asm/ |
H A D | ptrace.h | 17 #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) 28 #define user_mode(regs) (!((regs)->psr & PSR_S)) 29 #define instruction_pointer(regs) ((regs)->pc) 30 #define user_stack_pointer(regs) ((regs)->sp) 34 #define profile_pc(regs) ((regs)->pc)
|
H A D | syscall.h | 22 struct pt_regs *regs) syscall_get_nr() 24 return regs->syscallno; syscall_get_nr() 32 struct pt_regs *regs) syscall_rollback() 34 regs->gr8 = regs->orig_gr8; syscall_rollback() 42 struct pt_regs *regs) syscall_get_error() 44 return IS_ERR_VALUE(regs->gr8) ? regs->gr8 : 0; syscall_get_error() 51 struct pt_regs *regs) syscall_get_return_value() 53 return regs->gr8; syscall_get_return_value() 60 struct pt_regs *regs, syscall_set_return_value() 64 regs->gr8 = -error; syscall_set_return_value() 66 regs->gr8 = val; syscall_set_return_value() 73 struct pt_regs *regs, syscall_get_arguments() 87 case 6: args[5] = regs->gr13; syscall_get_arguments() 88 case 5: args[4] = regs->gr12; syscall_get_arguments() 89 case 4: args[3] = regs->gr11; syscall_get_arguments() 90 case 3: args[2] = regs->gr10; syscall_get_arguments() 91 case 2: args[1] = regs->gr9; syscall_get_arguments() 92 case 1: args[0] = regs->gr8; syscall_get_arguments() 103 struct pt_regs *regs, syscall_set_arguments() 111 case 6: regs->gr13 = args[5]; syscall_set_arguments() 112 case 5: regs->gr12 = args[4]; syscall_set_arguments() 113 case 4: regs->gr11 = args[3]; syscall_set_arguments() 114 case 3: regs->gr10 = args[2]; syscall_set_arguments() 115 case 2: regs->gr9 = args[1]; syscall_set_arguments() 116 case 1: regs->gr8 = args[0]; syscall_set_arguments() 21 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 31 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 41 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 50 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 59 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 72 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 102 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/parisc/kernel/ |
H A D | traps.c | 47 struct pt_regs *regs); 73 static void print_gr(char *level, struct pt_regs *regs) print_gr() argument 80 printbinary(buf, regs->gr[0], 32); print_gr() 84 PRINTREGS(level, regs->gr, "r", RFMT, i); print_gr() 87 static void print_fr(char *level, struct pt_regs *regs) print_fr() argument 111 PRINTREGS(level, regs->fr, "fr", FFMT, i); print_fr() 114 void show_regs(struct pt_regs *regs) show_regs() argument 120 user = user_mode(regs); show_regs() 125 print_gr(level, regs); show_regs() 128 PRINTREGS(level, regs->sr, "sr", RFMT, i); show_regs() 131 print_fr(level, regs); show_regs() 137 level, regs->iasq[0], regs->iasq[1], regs->iaoq[0], regs->iaoq[1]); show_regs() 139 level, regs->iir, regs->isr, regs->ior); show_regs() 142 printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28); show_regs() 145 printk("%s IAOQ[0]: " RFMT "\n", level, regs->iaoq[0]); show_regs() 146 printk("%s IAOQ[1]: " RFMT "\n", level, regs->iaoq[1]); show_regs() 147 printk("%s RP(r2): " RFMT "\n", level, regs->gr[2]); show_regs() 149 printk("%s IAOQ[0]: %pS\n", level, (void *) regs->iaoq[0]); show_regs() 150 printk("%s IAOQ[1]: %pS\n", level, (void *) regs->iaoq[1]); show_regs() 151 printk("%s RP(r2): %pS\n", level, (void *) regs->gr[2]); show_regs() 153 parisc_show_stack(current, NULL, regs); show_regs() 160 #define parisc_printk_ratelimited(critical, regs, fmt, ...) { \ 163 show_regs(regs); \ 187 struct pt_regs *regs) parisc_show_stack() 193 if (regs) { parisc_show_stack() 194 unwind_frame_init(&info, t, regs); parisc_show_stack() 231 void die_if_kernel(char *str, struct pt_regs *regs, long err) die_if_kernel() argument 233 if (user_mode(regs)) { die_if_kernel() 237 parisc_printk_ratelimited(1, regs, die_if_kernel() 239 current->comm, task_pid_nr(current), str, err, regs->iaoq[0]); die_if_kernel() 280 show_regs(regs); die_if_kernel() 299 static void handle_gdb_break(struct pt_regs *regs, int wot) handle_gdb_break() argument 306 si.si_addr = (void __user *) (regs->iaoq[0] & ~3); handle_gdb_break() 310 static void handle_break(struct pt_regs *regs) handle_break() argument 312 unsigned iir = regs->iir; handle_break() 314 if (unlikely(iir == PARISC_BUG_BREAK_INSN && !user_mode(regs))) { handle_break() 317 tt = report_bug(regs->iaoq[0] & ~3, regs); handle_break() 319 regs->iaoq[0] += 4; handle_break() 320 regs->iaoq[1] += 4; handle_break() 323 die_if_kernel("Unknown kernel breakpoint", regs, handle_break() 328 parisc_printk_ratelimited(0, regs, handle_break() 334 handle_gdb_break(regs, TRAP_BRKPT); handle_break() 337 static void default_trap(int code, struct pt_regs *regs) default_trap() argument 340 show_regs(regs); default_trap() 343 void (*cpu_lpmc) (int code, struct pt_regs *regs) __read_mostly = default_trap; 346 void transfer_pim_to_trap_frame(struct pt_regs *regs) transfer_pim_to_trap_frame() argument 364 regs->gr[0] = pim_wide->cr[22]; transfer_pim_to_trap_frame() 367 regs->gr[i] = pim_wide->gr[i]; transfer_pim_to_trap_frame() 370 regs->fr[i] = pim_wide->fr[i]; transfer_pim_to_trap_frame() 373 regs->sr[i] = pim_wide->sr[i]; transfer_pim_to_trap_frame() 375 regs->iasq[0] = pim_wide->cr[17]; transfer_pim_to_trap_frame() 376 regs->iasq[1] = pim_wide->iasq_back; transfer_pim_to_trap_frame() 377 regs->iaoq[0] = pim_wide->cr[18]; transfer_pim_to_trap_frame() 378 regs->iaoq[1] = pim_wide->iaoq_back; transfer_pim_to_trap_frame() 380 regs->sar = pim_wide->cr[11]; transfer_pim_to_trap_frame() 381 regs->iir = pim_wide->cr[19]; transfer_pim_to_trap_frame() 382 regs->isr = pim_wide->cr[20]; transfer_pim_to_trap_frame() 383 regs->ior = pim_wide->cr[21]; transfer_pim_to_trap_frame() 388 regs->gr[0] = pim_narrow->cr[22]; transfer_pim_to_trap_frame() 391 regs->gr[i] = pim_narrow->gr[i]; transfer_pim_to_trap_frame() 394 regs->fr[i] = pim_narrow->fr[i]; transfer_pim_to_trap_frame() 397 regs->sr[i] = pim_narrow->sr[i]; transfer_pim_to_trap_frame() 399 regs->iasq[0] = pim_narrow->cr[17]; transfer_pim_to_trap_frame() 400 regs->iasq[1] = pim_narrow->iasq_back; transfer_pim_to_trap_frame() 401 regs->iaoq[0] = pim_narrow->cr[18]; transfer_pim_to_trap_frame() 402 regs->iaoq[1] = pim_narrow->iaoq_back; transfer_pim_to_trap_frame() 404 regs->sar = pim_narrow->cr[11]; transfer_pim_to_trap_frame() 405 regs->iir = pim_narrow->cr[19]; transfer_pim_to_trap_frame() 406 regs->isr = pim_narrow->cr[20]; transfer_pim_to_trap_frame() 407 regs->ior = pim_narrow->cr[21]; transfer_pim_to_trap_frame() 415 regs->ksp = 0; transfer_pim_to_trap_frame() 416 regs->kpc = 0; transfer_pim_to_trap_frame() 417 regs->orig_r28 = 0; transfer_pim_to_trap_frame() 426 void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset) parisc_terminate() argument 447 transfer_pim_to_trap_frame(regs); parisc_terminate() 457 /* show_stack(NULL, (unsigned long *)regs->gr[30]); */ parisc_terminate() 459 unwind_frame_init(&info, current, regs); parisc_terminate() 464 printk(KERN_CRIT "%s: Code=%d regs=%p (Addr=" RFMT ")\n", parisc_terminate() 465 msg, code, regs, offset); parisc_terminate() 466 show_regs(regs); parisc_terminate() 487 void notrace handle_interruption(int code, struct pt_regs *regs) handle_interruption() argument 518 if (((unsigned long)regs->iaoq[0] & 3) && handle_interruption() 519 ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { handle_interruption() 521 regs->iaoq[0] = 0 | 3; handle_interruption() 522 regs->iaoq[1] = regs->iaoq[0] + 4; handle_interruption() 523 regs->iasq[0] = regs->iasq[1] = regs->sr[7]; handle_interruption() 524 regs->gr[0] &= ~PSW_B; handle_interruption() 541 regs, code, 0); handle_interruption() 551 regs->gr[0] &= ~PSW_R; handle_interruption() 552 if (user_space(regs)) handle_interruption() 553 handle_gdb_break(regs, TRAP_TRACE); handle_interruption() 563 cpu_lpmc(5, regs); handle_interruption() 568 fault_address = regs->iaoq[0]; handle_interruption() 569 fault_space = regs->iasq[0]; handle_interruption() 574 die_if_kernel("Illegal instruction", regs, code); handle_interruption() 580 handle_break(regs); handle_interruption() 585 die_if_kernel("Privileged operation", regs, code); handle_interruption() 591 if ((regs->iir & 0xffdfffe0) == 0x034008a0) { handle_interruption() 597 if (regs->iir & 0x00200000) handle_interruption() 598 regs->gr[regs->iir & 0x1f] = mfctl(27); handle_interruption() 600 regs->gr[regs->iir & 0x1f] = mfctl(26); handle_interruption() 602 regs->iaoq[0] = regs->iaoq[1]; handle_interruption() 603 regs->iaoq[1] += 4; handle_interruption() 604 regs->iasq[0] = regs->iasq[1]; handle_interruption() 608 die_if_kernel("Privileged register usage", regs, code); handle_interruption() 613 si.si_addr = (void __user *) regs->iaoq[0]; handle_interruption() 621 si.si_addr = (void __user *) regs->iaoq[0]; handle_interruption() 629 if(user_mode(regs)){ handle_interruption() 634 si.si_addr = (void __user *) regs->iaoq[0]; handle_interruption() 643 die_if_kernel("Floating point exception", regs, 0); /* quiet */ handle_interruption() 645 handle_fpe(regs); handle_interruption() 668 fault_address = regs->ior; handle_interruption() 669 fault_space = regs->isr; handle_interruption() 675 if (check_unaligned(regs)) { handle_interruption() 676 handle_unaligned(regs); handle_interruption() 682 fault_address = regs->ior; handle_interruption() 683 fault_space = regs->isr; handle_interruption() 688 regs->gr[0] |= PSW_X; /* So we can single-step over the trap */ handle_interruption() 692 handle_gdb_break(regs, TRAP_HWBKPT); handle_interruption() 697 regs->gr[0] &= ~PSW_T; handle_interruption() 698 if (user_space(regs)) handle_interruption() 699 handle_gdb_break(regs, TRAP_BRANCH); handle_interruption() 720 if (user_mode(regs)) { handle_interruption() 724 vma = find_vma(current->mm,regs->iaoq[0]); handle_interruption() 725 if (vma && (regs->iaoq[0] >= vma->vm_start) handle_interruption() 728 fault_address = regs->iaoq[0]; handle_interruption() 729 fault_space = regs->iasq[0]; handle_interruption() 739 if (code == 27 && !user_mode(regs) && handle_interruption() 740 fixup_exception(regs)) handle_interruption() 743 die_if_kernel("Protection id trap", regs, code); handle_interruption() 748 si.si_addr = (void __user *) regs->iaoq[0]; handle_interruption() 750 si.si_addr = (void __user *) regs->ior; handle_interruption() 756 handle_unaligned(regs); handle_interruption() 760 if (user_mode(regs)) { handle_interruption() 761 parisc_printk_ratelimited(0, regs, KERN_DEBUG handle_interruption() 768 si.si_addr = (void __user *) regs->ior; handle_interruption() 774 parisc_terminate("Unexpected interruption", regs, code, 0); handle_interruption() 778 if (user_mode(regs)) { handle_interruption() 779 if ((fault_space >> SPACEID_SHIFT) != (regs->sr[7] >> SPACEID_SHIFT)) { handle_interruption() 780 parisc_printk_ratelimited(0, regs, KERN_DEBUG handle_interruption() 787 si.si_addr = (void __user *) regs->ior; handle_interruption() 802 if (fixup_exception(regs)) handle_interruption() 805 parisc_terminate("Kernel Fault", regs, code, fault_address); handle_interruption() 809 do_page_fault(regs, code, fault_address); handle_interruption() 186 parisc_show_stack(struct task_struct *task, unsigned long *sp, struct pt_regs *regs) parisc_show_stack() argument
|
H A D | unaligned.c | 133 void die_if_kernel (char *str, struct pt_regs *regs, long err); 135 static int emulate_ldh(struct pt_regs *regs, int toreg) emulate_ldh() argument 137 unsigned long saddr = regs->ior; emulate_ldh() 142 regs->isr, regs->ior, toreg); emulate_ldh() 158 : "0" (val), "r" (saddr), "r" (regs->isr) emulate_ldh() 164 regs->gr[toreg] = val; emulate_ldh() 169 static int emulate_ldw(struct pt_regs *regs, int toreg, int flop) emulate_ldw() argument 171 unsigned long saddr = regs->ior; emulate_ldw() 176 regs->isr, regs->ior, toreg); emulate_ldw() 196 : "0" (val), "r" (saddr), "r" (regs->isr) emulate_ldw() 202 ((__u32*)(regs->fr))[toreg] = val; emulate_ldw() 204 regs->gr[toreg] = val; emulate_ldw() 208 static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) emulate_ldd() argument 210 unsigned long saddr = regs->ior; emulate_ldd() 215 regs->isr, regs->ior, toreg); emulate_ldd() 240 : "0" (val), "r" (saddr), "r" (regs->isr) emulate_ldd() 266 : "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr) emulate_ldd() 275 regs->fr[toreg] = val; emulate_ldd() 277 regs->gr[toreg] = val; emulate_ldd() 282 static int emulate_sth(struct pt_regs *regs, int frreg) emulate_sth() argument 284 unsigned long val = regs->gr[frreg]; emulate_sth() 291 val, regs->isr, regs->ior); emulate_sth() 307 : "r" (val), "r" (regs->ior), "r" (regs->isr) emulate_sth() 313 static int emulate_stw(struct pt_regs *regs, int frreg, int flop) emulate_stw() argument 319 val = ((__u32*)(regs->fr))[frreg]; emulate_stw() 321 val = regs->gr[frreg]; emulate_stw() 326 val, regs->isr, regs->ior); emulate_stw() 354 : "r" (val), "r" (regs->ior), "r" (regs->isr) emulate_stw() 359 static int emulate_std(struct pt_regs *regs, int frreg, int flop) emulate_std() argument 365 val = regs->fr[frreg]; emulate_std() 367 val = regs->gr[frreg]; emulate_std() 372 val, regs->isr, regs->ior); emulate_std() 406 : "r" (val), "r" (regs->ior), "r" (regs->isr) emulate_std() 441 : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr) emulate_std() 449 void handle_unaligned(struct pt_regs *regs) handle_unaligned() argument 452 unsigned long newbase = R1(regs->iir)?regs->gr[R1(regs->iir)]:0; handle_unaligned() 461 if (user_mode(regs)) { handle_unaligned() 470 current->comm, task_pid_nr(current), regs->ior, regs->iaoq[0]); handle_unaligned() 473 show_regs(regs); handle_unaligned() 482 switch (MAJOR_OP(regs->iir)) handle_unaligned() 487 if (regs->iir&0x20) handle_unaligned() 490 if (regs->iir&0x1000) /* short loads */ handle_unaligned() 491 if (regs->iir&0x200) handle_unaligned() 492 newbase += IM5_3(regs->iir); handle_unaligned() 494 newbase += IM5_2(regs->iir); handle_unaligned() 495 else if (regs->iir&0x2000) /* scaled indexed */ handle_unaligned() 498 switch (regs->iir & OPCODE1_MASK) handle_unaligned() 508 newbase += (R2(regs->iir)?regs->gr[R2(regs->iir)]:0)<<shift; handle_unaligned() 510 newbase += (R2(regs->iir)?regs->gr[R2(regs->iir)]:0); handle_unaligned() 516 newbase += IM14(regs->iir); handle_unaligned() 520 if (regs->iir&8) handle_unaligned() 523 newbase += IM14(regs->iir&~0xe); handle_unaligned() 529 newbase += IM14(regs->iir&6); handle_unaligned() 533 if (regs->iir&4) handle_unaligned() 536 newbase += IM14(regs->iir&~4); handle_unaligned() 542 switch (regs->iir & OPCODE1_MASK) handle_unaligned() 546 ret = emulate_ldh(regs, R3(regs->iir)); handle_unaligned() 553 ret = emulate_ldw(regs, R3(regs->iir),0); handle_unaligned() 557 ret = emulate_sth(regs, R2(regs->iir)); handle_unaligned() 562 ret = emulate_stw(regs, R2(regs->iir),0); handle_unaligned() 570 ret = emulate_ldd(regs, R3(regs->iir),0); handle_unaligned() 575 ret = emulate_std(regs, R2(regs->iir),0); handle_unaligned() 584 ret = emulate_ldw(regs,FR3(regs->iir),1); handle_unaligned() 590 ret = emulate_ldd(regs,R3(regs->iir),1); handle_unaligned() 598 ret = emulate_stw(regs,FR3(regs->iir),1); handle_unaligned() 604 ret = emulate_std(regs,R3(regs->iir),1); handle_unaligned() 615 switch (regs->iir & OPCODE2_MASK) handle_unaligned() 619 ret = emulate_ldd(regs,R2(regs->iir),1); handle_unaligned() 623 ret = emulate_std(regs, R2(regs->iir),1); handle_unaligned() 626 ret = emulate_ldd(regs, R2(regs->iir),0); handle_unaligned() 629 ret = emulate_std(regs, R2(regs->iir),0); handle_unaligned() 633 switch (regs->iir & OPCODE3_MASK) handle_unaligned() 637 ret = emulate_ldw(regs, R2(regs->iir),0); handle_unaligned() 640 ret = emulate_ldw(regs, R2(regs->iir),1); handle_unaligned() 645 ret = emulate_stw(regs, R2(regs->iir),1); handle_unaligned() 648 ret = emulate_stw(regs, R2(regs->iir),0); handle_unaligned() 651 switch (regs->iir & OPCODE4_MASK) handle_unaligned() 654 ret = emulate_ldh(regs, R2(regs->iir)); handle_unaligned() 658 ret = emulate_ldw(regs, R2(regs->iir),0); handle_unaligned() 661 ret = emulate_sth(regs, R2(regs->iir)); handle_unaligned() 665 ret = emulate_stw(regs, R2(regs->iir),0); handle_unaligned() 669 if (ret == 0 && modify && R1(regs->iir)) handle_unaligned() 670 regs->gr[R1(regs->iir)] = newbase; handle_unaligned() 674 printk(KERN_CRIT "Not-handled unaligned insn 0x%08lx\n", regs->iir); handle_unaligned() 685 if (!user_mode(regs) && fixup_exception(regs)) handle_unaligned() 689 die_if_kernel("Unaligned data reference", regs, 28); handle_unaligned() 696 si.si_addr = (void __user *)regs->ior; handle_unaligned() 706 si.si_addr = (void __user *)regs->ior; handle_unaligned() 714 regs->gr[0]|=PSW_N; handle_unaligned() 723 check_unaligned(struct pt_regs *regs) check_unaligned() argument 730 switch (regs->iir & OPCODE1_MASK) { check_unaligned() 748 switch (regs->iir & OPCODE4_MASK) { check_unaligned() 763 return (int)(regs->ior & align_mask); check_unaligned()
|
H A D | asm-offsets.c | 66 DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs)); main() 67 DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0])); main() 68 DEFINE(TASK_PT_GR1, offsetof(struct task_struct, thread.regs.gr[ 1])); main() 69 DEFINE(TASK_PT_GR2, offsetof(struct task_struct, thread.regs.gr[ 2])); main() 70 DEFINE(TASK_PT_GR3, offsetof(struct task_struct, thread.regs.gr[ 3])); main() 71 DEFINE(TASK_PT_GR4, offsetof(struct task_struct, thread.regs.gr[ 4])); main() 72 DEFINE(TASK_PT_GR5, offsetof(struct task_struct, thread.regs.gr[ 5])); main() 73 DEFINE(TASK_PT_GR6, offsetof(struct task_struct, thread.regs.gr[ 6])); main() 74 DEFINE(TASK_PT_GR7, offsetof(struct task_struct, thread.regs.gr[ 7])); main() 75 DEFINE(TASK_PT_GR8, offsetof(struct task_struct, thread.regs.gr[ 8])); main() 76 DEFINE(TASK_PT_GR9, offsetof(struct task_struct, thread.regs.gr[ 9])); main() 77 DEFINE(TASK_PT_GR10, offsetof(struct task_struct, thread.regs.gr[10])); main() 78 DEFINE(TASK_PT_GR11, offsetof(struct task_struct, thread.regs.gr[11])); main() 79 DEFINE(TASK_PT_GR12, offsetof(struct task_struct, thread.regs.gr[12])); main() 80 DEFINE(TASK_PT_GR13, offsetof(struct task_struct, thread.regs.gr[13])); main() 81 DEFINE(TASK_PT_GR14, offsetof(struct task_struct, thread.regs.gr[14])); main() 82 DEFINE(TASK_PT_GR15, offsetof(struct task_struct, thread.regs.gr[15])); main() 83 DEFINE(TASK_PT_GR16, offsetof(struct task_struct, thread.regs.gr[16])); main() 84 DEFINE(TASK_PT_GR17, offsetof(struct task_struct, thread.regs.gr[17])); main() 85 DEFINE(TASK_PT_GR18, offsetof(struct task_struct, thread.regs.gr[18])); main() 86 DEFINE(TASK_PT_GR19, offsetof(struct task_struct, thread.regs.gr[19])); main() 87 DEFINE(TASK_PT_GR20, offsetof(struct task_struct, thread.regs.gr[20])); main() 88 DEFINE(TASK_PT_GR21, offsetof(struct task_struct, thread.regs.gr[21])); main() 89 DEFINE(TASK_PT_GR22, offsetof(struct task_struct, thread.regs.gr[22])); main() 90 DEFINE(TASK_PT_GR23, offsetof(struct task_struct, thread.regs.gr[23])); main() 91 DEFINE(TASK_PT_GR24, offsetof(struct task_struct, thread.regs.gr[24])); main() 92 DEFINE(TASK_PT_GR25, offsetof(struct task_struct, thread.regs.gr[25])); main() 93 DEFINE(TASK_PT_GR26, offsetof(struct task_struct, thread.regs.gr[26])); main() 94 DEFINE(TASK_PT_GR27, offsetof(struct task_struct, thread.regs.gr[27])); main() 95 DEFINE(TASK_PT_GR28, offsetof(struct task_struct, thread.regs.gr[28])); main() 96 DEFINE(TASK_PT_GR29, offsetof(struct task_struct, thread.regs.gr[29])); main() 97 DEFINE(TASK_PT_GR30, offsetof(struct task_struct, thread.regs.gr[30])); main() 98 DEFINE(TASK_PT_GR31, offsetof(struct task_struct, thread.regs.gr[31])); main() 99 DEFINE(TASK_PT_FR0, offsetof(struct task_struct, thread.regs.fr[ 0])); main() 100 DEFINE(TASK_PT_FR1, offsetof(struct task_struct, thread.regs.fr[ 1])); main() 101 DEFINE(TASK_PT_FR2, offsetof(struct task_struct, thread.regs.fr[ 2])); main() 102 DEFINE(TASK_PT_FR3, offsetof(struct task_struct, thread.regs.fr[ 3])); main() 103 DEFINE(TASK_PT_FR4, offsetof(struct task_struct, thread.regs.fr[ 4])); main() 104 DEFINE(TASK_PT_FR5, offsetof(struct task_struct, thread.regs.fr[ 5])); main() 105 DEFINE(TASK_PT_FR6, offsetof(struct task_struct, thread.regs.fr[ 6])); main() 106 DEFINE(TASK_PT_FR7, offsetof(struct task_struct, thread.regs.fr[ 7])); main() 107 DEFINE(TASK_PT_FR8, offsetof(struct task_struct, thread.regs.fr[ 8])); main() 108 DEFINE(TASK_PT_FR9, offsetof(struct task_struct, thread.regs.fr[ 9])); main() 109 DEFINE(TASK_PT_FR10, offsetof(struct task_struct, thread.regs.fr[10])); main() 110 DEFINE(TASK_PT_FR11, offsetof(struct task_struct, thread.regs.fr[11])); main() 111 DEFINE(TASK_PT_FR12, offsetof(struct task_struct, thread.regs.fr[12])); main() 112 DEFINE(TASK_PT_FR13, offsetof(struct task_struct, thread.regs.fr[13])); main() 113 DEFINE(TASK_PT_FR14, offsetof(struct task_struct, thread.regs.fr[14])); main() 114 DEFINE(TASK_PT_FR15, offsetof(struct task_struct, thread.regs.fr[15])); main() 115 DEFINE(TASK_PT_FR16, offsetof(struct task_struct, thread.regs.fr[16])); main() 116 DEFINE(TASK_PT_FR17, offsetof(struct task_struct, thread.regs.fr[17])); main() 117 DEFINE(TASK_PT_FR18, offsetof(struct task_struct, thread.regs.fr[18])); main() 118 DEFINE(TASK_PT_FR19, offsetof(struct task_struct, thread.regs.fr[19])); main() 119 DEFINE(TASK_PT_FR20, offsetof(struct task_struct, thread.regs.fr[20])); main() 120 DEFINE(TASK_PT_FR21, offsetof(struct task_struct, thread.regs.fr[21])); main() 121 DEFINE(TASK_PT_FR22, offsetof(struct task_struct, thread.regs.fr[22])); main() 122 DEFINE(TASK_PT_FR23, offsetof(struct task_struct, thread.regs.fr[23])); main() 123 DEFINE(TASK_PT_FR24, offsetof(struct task_struct, thread.regs.fr[24])); main() 124 DEFINE(TASK_PT_FR25, offsetof(struct task_struct, thread.regs.fr[25])); main() 125 DEFINE(TASK_PT_FR26, offsetof(struct task_struct, thread.regs.fr[26])); main() 126 DEFINE(TASK_PT_FR27, offsetof(struct task_struct, thread.regs.fr[27])); main() 127 DEFINE(TASK_PT_FR28, offsetof(struct task_struct, thread.regs.fr[28])); main() 128 DEFINE(TASK_PT_FR29, offsetof(struct task_struct, thread.regs.fr[29])); main() 129 DEFINE(TASK_PT_FR30, offsetof(struct task_struct, thread.regs.fr[30])); main() 130 DEFINE(TASK_PT_FR31, offsetof(struct task_struct, thread.regs.fr[31])); main() 131 DEFINE(TASK_PT_SR0, offsetof(struct task_struct, thread.regs.sr[ 0])); main() 132 DEFINE(TASK_PT_SR1, offsetof(struct task_struct, thread.regs.sr[ 1])); main() 133 DEFINE(TASK_PT_SR2, offsetof(struct task_struct, thread.regs.sr[ 2])); main() 134 DEFINE(TASK_PT_SR3, offsetof(struct task_struct, thread.regs.sr[ 3])); main() 135 DEFINE(TASK_PT_SR4, offsetof(struct task_struct, thread.regs.sr[ 4])); main() 136 DEFINE(TASK_PT_SR5, offsetof(struct task_struct, thread.regs.sr[ 5])); main() 137 DEFINE(TASK_PT_SR6, offsetof(struct task_struct, thread.regs.sr[ 6])); main() 138 DEFINE(TASK_PT_SR7, offsetof(struct task_struct, thread.regs.sr[ 7])); main() 139 DEFINE(TASK_PT_IASQ0, offsetof(struct task_struct, thread.regs.iasq[0])); main() 140 DEFINE(TASK_PT_IASQ1, offsetof(struct task_struct, thread.regs.iasq[1])); main() 141 DEFINE(TASK_PT_IAOQ0, offsetof(struct task_struct, thread.regs.iaoq[0])); main() 142 DEFINE(TASK_PT_IAOQ1, offsetof(struct task_struct, thread.regs.iaoq[1])); main() 143 DEFINE(TASK_PT_CR27, offsetof(struct task_struct, thread.regs.cr27)); main() 144 DEFINE(TASK_PT_ORIG_R28, offsetof(struct task_struct, thread.regs.orig_r28)); main() 145 DEFINE(TASK_PT_KSP, offsetof(struct task_struct, thread.regs.ksp)); main() 146 DEFINE(TASK_PT_KPC, offsetof(struct task_struct, thread.regs.kpc)); main() 147 DEFINE(TASK_PT_SAR, offsetof(struct task_struct, thread.regs.sar)); main() 148 DEFINE(TASK_PT_IIR, offsetof(struct task_struct, thread.regs.iir)); main() 149 DEFINE(TASK_PT_ISR, offsetof(struct task_struct, thread.regs.isr)); main() 150 DEFINE(TASK_PT_IOR, offsetof(struct task_struct, thread.regs.ior)); main()
|
H A D | signal.c | 71 restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) restore_sigcontext() argument 75 err |= __copy_from_user(regs->gr, sc->sc_gr, sizeof(regs->gr)); restore_sigcontext() 76 err |= __copy_from_user(regs->fr, sc->sc_fr, sizeof(regs->fr)); restore_sigcontext() 77 err |= __copy_from_user(regs->iaoq, sc->sc_iaoq, sizeof(regs->iaoq)); restore_sigcontext() 78 err |= __copy_from_user(regs->iasq, sc->sc_iasq, sizeof(regs->iasq)); restore_sigcontext() 79 err |= __get_user(regs->sar, &sc->sc_sar); restore_sigcontext() 81 regs->iaoq[0],regs->iaoq[1]); restore_sigcontext() 82 DBG(2,"restore_sigcontext: r28 is %ld\n", regs->gr[28]); restore_sigcontext() 87 sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) sys_rt_sigreturn() argument 91 unsigned long usp = (regs->gr[30] & ~(0x01UL)); sys_rt_sigreturn() 108 regs->orig_r28 = 1; /* no restarts for sigreturn */ sys_rt_sigreturn() 134 &compat_frame->regs, regs)) sys_rt_sigreturn() 145 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) sys_rt_sigreturn() 159 regs->gr[31] = regs->iaoq[0]; sys_rt_sigreturn() 161 DBG(1,"sys_rt_sigreturn: returning to %#lx, DUMPING REGS:\n", regs->iaoq[0]); sys_rt_sigreturn() 162 show_regs(regs); sys_rt_sigreturn() 195 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, int in_syscall) setup_sigcontext() argument 205 /* regs->iaoq is undefined in the syscall return path */ setup_sigcontext() 206 err |= __put_user(regs->gr[31], &sc->sc_iaoq[0]); setup_sigcontext() 207 err |= __put_user(regs->gr[31]+4, &sc->sc_iaoq[1]); setup_sigcontext() 208 err |= __put_user(regs->sr[3], &sc->sc_iasq[0]); setup_sigcontext() 209 err |= __put_user(regs->sr[3], &sc->sc_iasq[1]); setup_sigcontext() 211 regs->gr[31], regs->gr[31]+4); setup_sigcontext() 213 err |= __copy_to_user(sc->sc_iaoq, regs->iaoq, sizeof(regs->iaoq)); setup_sigcontext() 214 err |= __copy_to_user(sc->sc_iasq, regs->iasq, sizeof(regs->iasq)); setup_sigcontext() 216 regs->iaoq[0], regs->iaoq[1]); setup_sigcontext() 220 err |= __copy_to_user(sc->sc_gr, regs->gr, sizeof(regs->gr)); setup_sigcontext() 221 err |= __copy_to_user(sc->sc_fr, regs->fr, sizeof(regs->fr)); setup_sigcontext() 222 err |= __put_user(regs->sar, &sc->sc_sar); setup_sigcontext() 223 DBG(1,"setup_sigcontext: r28 is %ld\n", regs->gr[28]); setup_sigcontext() 229 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs, setup_rt_frame() argument 241 usp = (regs->gr[30] & ~(0x01UL)); setup_rt_frame() 256 err |= __compat_save_altstack( &compat_frame->uc.uc_stack, regs->gr[30]); setup_rt_frame() 260 &compat_frame->regs, regs, in_syscall); setup_rt_frame() 268 err |= __save_altstack(&frame->uc.uc_stack, regs->gr[30]); setup_rt_frame() 271 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); setup_rt_frame() 331 regs->gr[19] = fdesc.gp; setup_rt_frame() 344 regs->gr[19] = fdesc.gp; setup_rt_frame() 346 haddr, regs->gr[19], in_syscall); setup_rt_frame() 358 regs->gr[31] = haddr; setup_rt_frame() 382 regs->gr[0] = psw; setup_rt_frame() 383 regs->iaoq[0] = haddr | 3; setup_rt_frame() 384 regs->iaoq[1] = regs->iaoq[0] + 4; setup_rt_frame() 387 regs->gr[2] = rp; /* userland return pointer */ setup_rt_frame() 388 regs->gr[26] = ksig->sig; /* signal number */ setup_rt_frame() 392 regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */ setup_rt_frame() 393 regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */ setup_rt_frame() 397 regs->gr[25] = A(&frame->info); /* siginfo pointer */ setup_rt_frame() 398 regs->gr[24] = A(&frame->uc); /* ucontext pointer */ setup_rt_frame() 402 regs->gr[30], sigframe_size, setup_rt_frame() 403 regs->gr[30] + sigframe_size); setup_rt_frame() 405 regs->gr[30] = (A(frame) + sigframe_size); setup_rt_frame() 409 current->comm, current->pid, frame, regs->gr[30], setup_rt_frame() 410 regs->iaoq[0], regs->iaoq[1], rp); setup_rt_frame() 420 handle_signal(struct ksignal *ksig, struct pt_regs *regs, int in_syscall) handle_signal() argument 425 DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n", handle_signal() 426 ksig->sig, ksig->ka, ksig->info, oldset, regs); handle_signal() 429 ret = setup_rt_frame(ksig, oldset, regs, in_syscall); handle_signal() 434 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", handle_signal() 435 regs->gr[28]); handle_signal() 439 syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) syscall_restart() argument 441 if (regs->orig_r28) syscall_restart() 443 regs->orig_r28 = 1; /* no more restarts */ syscall_restart() 445 switch (regs->gr[28]) { syscall_restart() 449 regs->gr[28] = -EINTR; syscall_restart() 455 regs->gr[28] = -EINTR; syscall_restart() 463 regs->gr[31] -= 8; /* delayed branching */ syscall_restart() 469 insert_restart_trampoline(struct pt_regs *regs) insert_restart_trampoline() argument 471 if (regs->orig_r28) insert_restart_trampoline() 473 regs->orig_r28 = 1; /* no more restarts */ insert_restart_trampoline() 474 switch(regs->gr[28]) { insert_restart_trampoline() 477 unsigned int *usp = (unsigned int *)regs->gr[30]; insert_restart_trampoline() 492 err |= put_user(regs->gr[31] >> 32, &usp[0]); insert_restart_trampoline() 493 err |= put_user(regs->gr[31] & 0xffffffff, &usp[1]); insert_restart_trampoline() 496 err |= put_user(regs->gr[31], &usp[0]); insert_restart_trampoline() 508 regs->gr[31] = regs->gr[30] + 8; insert_restart_trampoline() 519 regs->gr[31] -= 8; insert_restart_trampoline() 539 do_signal(struct pt_regs *regs, long in_syscall) do_signal() argument 543 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n", do_signal() 544 regs, regs->sr[7], in_syscall); do_signal() 547 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); do_signal() 550 syscall_restart(regs, &ksig.ka); do_signal() 552 handle_signal(&ksig, regs, in_syscall); do_signal() 558 insert_restart_trampoline(regs); do_signal() 560 DBG(1,"do_signal: Exit (not delivered), regs->gr[28] = %ld\n", do_signal() 561 regs->gr[28]); do_signal() 566 void do_notify_resume(struct pt_regs *regs, long in_syscall) do_notify_resume() argument 569 do_signal(regs, in_syscall); do_notify_resume() 573 tracehook_notify_resume(regs); do_notify_resume()
|
/linux-4.1.27/arch/tile/include/asm/ |
H A D | syscall.h | 36 static inline int syscall_get_nr(struct task_struct *t, struct pt_regs *regs) syscall_get_nr() argument 38 return regs->regs[TREG_SYSCALL_NR]; syscall_get_nr() 42 struct pt_regs *regs) syscall_rollback() 44 regs->regs[0] = regs->orig_r0; syscall_rollback() 48 struct pt_regs *regs) syscall_get_error() 50 unsigned long error = regs->regs[0]; syscall_get_error() 55 struct pt_regs *regs) syscall_get_return_value() 57 return regs->regs[0]; syscall_get_return_value() 61 struct pt_regs *regs, syscall_set_return_value() 64 regs->regs[0] = (long) error ?: val; syscall_set_return_value() 68 struct pt_regs *regs, syscall_get_arguments() 73 memcpy(args, ®s[i], n * sizeof(args[0])); syscall_get_arguments() 77 struct pt_regs *regs, syscall_set_arguments() 82 memcpy(®s[i], args, n * sizeof(args[0])); syscall_set_arguments() 41 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 47 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 54 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 60 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 67 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 76 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/cris/arch-v32/kernel/ |
H A D | traps.c | 12 void show_registers(struct pt_regs *regs) show_registers() argument 27 regs->erp, regs->srp, regs->ccs, usp, regs->mof); show_registers() 30 regs->r0, regs->r1, regs->r2, regs->r3); show_registers() 33 regs->r4, regs->r5, regs->r6, regs->r7); show_registers() 36 regs->r8, regs->r9, regs->r10, regs->r11); show_registers() 39 regs->r12, regs->r13, regs->orig_r10, regs->acr); show_registers() 41 printk(" sp: %08lx\n", (unsigned long)regs); show_registers() 59 if (!user_mode(regs)) { show_registers() 73 if (regs->erp < PAGE_OFFSET) show_registers() 77 * Quite often the value at regs->erp doesn't point to the show_registers() 81 * point, but small enough to fit on a row. The regs->erp show_registers() 88 if (__get_user(c, &((unsigned char *)regs->erp)[i])) { show_registers() 113 void handle_nmi(struct pt_regs *regs) handle_nmi() argument 120 nmi_handler(regs); handle_nmi() 132 extern void die_if_kernel(const char *str, struct pt_regs *regs, long err); 134 /* Copy of the regs at BUG() time. */ 144 void fixup_BUG(struct pt_regs *regs) fixup_BUG() argument 146 BUG_regs = *regs; fixup_BUG() 159 fixup = search_exception_tables(instruction_pointer(regs) - 2); fixup_BUG() 162 instruction_pointer(regs) = fixup->fixup; fixup_BUG() 163 arch_fixup(regs); fixup_BUG() 167 /* Dont try to lookup the filename + line, just dump regs. */ fixup_BUG() 173 * Break 14 handler. Save regs and jump into the fixup_BUG. 189 handle_BUG(struct pt_regs *regs) handle_BUG() argument
|
/linux-4.1.27/drivers/rtc/ |
H A D | rtc-ds1216.c | 83 struct ds1216_regs regs; ds1216_rtc_read_time() local 86 ds1216_read(priv->ioaddr, (u8 *)®s); ds1216_rtc_read_time() 88 tm->tm_sec = bcd2bin(regs.sec); ds1216_rtc_read_time() 89 tm->tm_min = bcd2bin(regs.min); ds1216_rtc_read_time() 90 if (regs.hour & DS1216_HOUR_1224) { ds1216_rtc_read_time() 92 tm->tm_hour = bcd2bin(regs.hour & 0x1f); ds1216_rtc_read_time() 93 if (regs.hour & DS1216_HOUR_AMPM) ds1216_rtc_read_time() 96 tm->tm_hour = bcd2bin(regs.hour & 0x3f); ds1216_rtc_read_time() 97 tm->tm_wday = (regs.wday & 7) - 1; ds1216_rtc_read_time() 98 tm->tm_mday = bcd2bin(regs.mday & 0x3f); ds1216_rtc_read_time() 99 tm->tm_mon = bcd2bin(regs.month & 0x1f); ds1216_rtc_read_time() 100 tm->tm_year = bcd2bin(regs.year); ds1216_rtc_read_time() 111 struct ds1216_regs regs; ds1216_rtc_set_time() local 114 ds1216_read(priv->ioaddr, (u8 *)®s); ds1216_rtc_set_time() 116 regs.tsec = 0; /* clear 0.1 and 0.01 seconds */ ds1216_rtc_set_time() 117 regs.sec = bin2bcd(tm->tm_sec); ds1216_rtc_set_time() 118 regs.min = bin2bcd(tm->tm_min); ds1216_rtc_set_time() 119 regs.hour &= DS1216_HOUR_1224; ds1216_rtc_set_time() 120 if (regs.hour && tm->tm_hour > 12) { ds1216_rtc_set_time() 121 regs.hour |= DS1216_HOUR_AMPM; ds1216_rtc_set_time() 124 regs.hour |= bin2bcd(tm->tm_hour); ds1216_rtc_set_time() 125 regs.wday &= ~7; ds1216_rtc_set_time() 126 regs.wday |= tm->tm_wday; ds1216_rtc_set_time() 127 regs.mday = bin2bcd(tm->tm_mday); ds1216_rtc_set_time() 128 regs.month = bin2bcd(tm->tm_mon); ds1216_rtc_set_time() 129 regs.year = bin2bcd(tm->tm_year % 100); ds1216_rtc_set_time() 132 ds1216_write(priv->ioaddr, (u8 *)®s); ds1216_rtc_set_time()
|
H A D | rtc-mpc5121.c | 82 struct mpc5121_rtc_regs __iomem *regs; member in struct:mpc5121_rtc_data 92 static void mpc5121_rtc_update_smh(struct mpc5121_rtc_regs __iomem *regs, mpc5121_rtc_update_smh() argument 95 out_8(®s->second_set, tm->tm_sec); mpc5121_rtc_update_smh() 96 out_8(®s->minute_set, tm->tm_min); mpc5121_rtc_update_smh() 97 out_8(®s->hour_set, tm->tm_hour); mpc5121_rtc_update_smh() 100 out_8(®s->set_time, 0x1); mpc5121_rtc_update_smh() 101 out_8(®s->set_time, 0x3); mpc5121_rtc_update_smh() 102 out_8(®s->set_time, 0x1); mpc5121_rtc_update_smh() 103 out_8(®s->set_time, 0x0); mpc5121_rtc_update_smh() 109 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_read_time() local 115 now = in_be32(®s->actual_time) + in_be32(®s->target_time); mpc5121_rtc_read_time() 123 mpc5121_rtc_update_smh(regs, tm); mpc5121_rtc_read_time() 131 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_set_time() local 141 out_be32(®s->target_time, now - in_be32(®s->actual_time)); mpc5121_rtc_set_time() 147 mpc5121_rtc_update_smh(regs, tm); mpc5121_rtc_set_time() 155 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5200_rtc_read_time() local 158 tm->tm_sec = in_8(®s->second); mpc5200_rtc_read_time() 159 tm->tm_min = in_8(®s->minute); mpc5200_rtc_read_time() 162 if (in_8(®s->hour) & 0x20) mpc5200_rtc_read_time() 163 tm->tm_hour = (in_8(®s->hour) >> 1) + mpc5200_rtc_read_time() 164 (in_8(®s->hour) & 1 ? 12 : 0); mpc5200_rtc_read_time() 166 tm->tm_hour = in_8(®s->hour); mpc5200_rtc_read_time() 168 tmp = in_8(®s->wday_mday); mpc5200_rtc_read_time() 170 tm->tm_mon = in_8(®s->month) - 1; mpc5200_rtc_read_time() 171 tm->tm_year = in_be16(®s->year) - 1900; mpc5200_rtc_read_time() 182 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5200_rtc_set_time() local 184 mpc5121_rtc_update_smh(regs, tm); mpc5200_rtc_set_time() 187 out_8(®s->month_set, tm->tm_mon + 1); mpc5200_rtc_set_time() 188 out_8(®s->weekday_set, tm->tm_wday ? tm->tm_wday : 7); mpc5200_rtc_set_time() 189 out_8(®s->date_set, tm->tm_mday); mpc5200_rtc_set_time() 190 out_be16(®s->year_set, tm->tm_year + 1900); mpc5200_rtc_set_time() 193 out_8(®s->set_date, 0x1); mpc5200_rtc_set_time() 194 out_8(®s->set_date, 0x3); mpc5200_rtc_set_time() 195 out_8(®s->set_date, 0x1); mpc5200_rtc_set_time() 196 out_8(®s->set_date, 0x0); mpc5200_rtc_set_time() 204 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_read_alarm() local 208 alarm->pending = in_8(®s->alm_status); mpc5121_rtc_read_alarm() 216 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_set_alarm() local 236 out_8(®s->alm_min_set, alarm->time.tm_min); mpc5121_rtc_set_alarm() 237 out_8(®s->alm_hour_set, alarm->time.tm_hour); mpc5121_rtc_set_alarm() 239 out_8(®s->alm_enable, alarm->enabled); mpc5121_rtc_set_alarm() 248 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_handler() local 250 if (in_8(®s->int_alm)) { mpc5121_rtc_handler() 252 out_8(®s->int_alm, 1); mpc5121_rtc_handler() 253 out_8(®s->alm_status, 1); mpc5121_rtc_handler() 265 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_handler_upd() local 267 if (in_8(®s->int_sec) && (in_8(®s->int_enable) & 0x1)) { mpc5121_rtc_handler_upd() 269 out_8(®s->int_sec, 1); mpc5121_rtc_handler_upd() 282 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_alarm_irq_enable() local 290 out_8(®s->alm_enable, val); mpc5121_rtc_alarm_irq_enable() 321 rtc->regs = of_iomap(op->dev.of_node, 0); mpc5121_rtc_probe() 322 if (!rtc->regs) { mpc5121_rtc_probe() 351 ka = in_be32(&rtc->regs->keep_alive); mpc5121_rtc_probe() 355 out_be32(&rtc->regs->keep_alive, ka); mpc5121_rtc_probe() 380 iounmap(rtc->regs); mpc5121_rtc_probe() 388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; mpc5121_rtc_remove() local 391 out_8(®s->alm_enable, 0); mpc5121_rtc_remove() 392 out_8(®s->int_enable, in_8(®s->int_enable) & ~0x1); mpc5121_rtc_remove() 394 iounmap(rtc->regs); mpc5121_rtc_remove()
|
H A D | rtc-max8907.c | 61 static void regs_to_tm(u8 *regs, struct rtc_time *tm) regs_to_tm() argument 63 tm->tm_year = bcd2bin(regs[RTC_YEAR2]) * 100 + regs_to_tm() 64 bcd2bin(regs[RTC_YEAR1]) - 1900; regs_to_tm() 65 tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1; regs_to_tm() 66 tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f); regs_to_tm() 67 tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07); regs_to_tm() 68 if (regs[RTC_HOUR] & HOUR_12) { regs_to_tm() 69 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f); regs_to_tm() 72 if (regs[RTC_HOUR] & HOUR_AM_PM) regs_to_tm() 75 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x03f); regs_to_tm() 77 tm->tm_min = bcd2bin(regs[RTC_MIN] & 0x7f); regs_to_tm() 78 tm->tm_sec = bcd2bin(regs[RTC_SEC] & 0x7f); regs_to_tm() 81 static void tm_to_regs(struct rtc_time *tm, u8 *regs) tm_to_regs() argument 87 regs[RTC_YEAR2] = bin2bcd(high); tm_to_regs() 88 regs[RTC_YEAR1] = bin2bcd(low); tm_to_regs() 89 regs[RTC_MONTH] = bin2bcd(tm->tm_mon + 1); tm_to_regs() 90 regs[RTC_DATE] = bin2bcd(tm->tm_mday); tm_to_regs() 91 regs[RTC_WEEKDAY] = tm->tm_wday; tm_to_regs() 92 regs[RTC_HOUR] = bin2bcd(tm->tm_hour); tm_to_regs() 93 regs[RTC_MIN] = bin2bcd(tm->tm_min); tm_to_regs() 94 regs[RTC_SEC] = bin2bcd(tm->tm_sec); tm_to_regs() 100 u8 regs[TIME_NUM]; max8907_rtc_read_time() local 103 ret = regmap_bulk_read(rtc->regmap, MAX8907_REG_RTC_SEC, regs, max8907_rtc_read_time() 108 regs_to_tm(regs, tm); max8907_rtc_read_time() 116 u8 regs[TIME_NUM]; max8907_rtc_set_time() local 118 tm_to_regs(tm, regs); max8907_rtc_set_time() 120 return regmap_bulk_write(rtc->regmap, MAX8907_REG_RTC_SEC, regs, max8907_rtc_set_time() 127 u8 regs[TIME_NUM]; max8907_rtc_read_alarm() local 131 ret = regmap_bulk_read(rtc->regmap, MAX8907_REG_ALARM0_SEC, regs, max8907_rtc_read_alarm() 136 regs_to_tm(regs, &alrm->time); max8907_rtc_read_alarm() 150 u8 regs[TIME_NUM]; max8907_rtc_set_alarm() local 153 tm_to_regs(&alrm->time, regs); max8907_rtc_set_alarm() 160 ret = regmap_bulk_write(rtc->regmap, MAX8907_REG_ALARM0_SEC, regs, max8907_rtc_set_alarm()
|
H A D | rtc-fm3130.c | 51 u8 regs[15]; member in struct:fm3130 72 fm3130->regs[FM3130_RTC_CONTROL] = fm3130_rtc_mode() 76 fm3130->regs[FM3130_RTC_CONTROL] &= fm3130_rtc_mode() 81 fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_WRITE; fm3130_rtc_mode() 84 fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_READ; fm3130_rtc_mode() 92 FM3130_RTC_CONTROL, fm3130->regs[FM3130_RTC_CONTROL]); fm3130_rtc_mode() 119 dev_dbg(dev, "%s: %15ph\n", "read", fm3130->regs); fm3130_get_time() 121 t->tm_sec = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_get_time() 122 t->tm_min = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_get_time() 123 tmp = fm3130->regs[FM3130_RTC_HOURS] & 0x3f; fm3130_get_time() 125 t->tm_wday = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1; fm3130_get_time() 126 t->tm_mday = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_get_time() 127 tmp = fm3130->regs[FM3130_RTC_MONTHS] & 0x1f; fm3130_get_time() 131 t->tm_year = bcd2bin(fm3130->regs[FM3130_RTC_YEARS]) + 100; fm3130_get_time() 148 u8 *buf = fm3130->regs; fm3130_set_time() 176 fm3130->regs[FM3130_RTC_SECONDS + i]); fm3130_set_time() 211 fm3130->regs[FM3130_ALARM_SECONDS], fm3130_read_alarm() 212 fm3130->regs[FM3130_ALARM_MINUTES], fm3130_read_alarm() 213 fm3130->regs[FM3130_ALARM_HOURS], fm3130_read_alarm() 214 fm3130->regs[FM3130_ALARM_DATE], fm3130_read_alarm() 215 fm3130->regs[FM3130_ALARM_MONTHS]); fm3130_read_alarm() 217 tm->tm_sec = bcd2bin(fm3130->regs[FM3130_ALARM_SECONDS] & 0x7F); fm3130_read_alarm() 218 tm->tm_min = bcd2bin(fm3130->regs[FM3130_ALARM_MINUTES] & 0x7F); fm3130_read_alarm() 219 tm->tm_hour = bcd2bin(fm3130->regs[FM3130_ALARM_HOURS] & 0x3F); fm3130_read_alarm() 220 tm->tm_mday = bcd2bin(fm3130->regs[FM3130_ALARM_DATE] & 0x3F); fm3130_read_alarm() 221 tm->tm_mon = bcd2bin(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F); fm3130_read_alarm() 233 fm3130->regs[FM3130_RTC_CONTROL] = fm3130_read_alarm() 236 if ((fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AEN) && fm3130_read_alarm() 237 (~fm3130->regs[FM3130_RTC_CONTROL] & fm3130_read_alarm() 257 fm3130->regs[FM3130_ALARM_SECONDS] = fm3130_set_alarm() 260 fm3130->regs[FM3130_ALARM_MINUTES] = fm3130_set_alarm() 263 fm3130->regs[FM3130_ALARM_HOURS] = fm3130_set_alarm() 266 fm3130->regs[FM3130_ALARM_DATE] = fm3130_set_alarm() 269 fm3130->regs[FM3130_ALARM_MONTHS] = fm3130_set_alarm() 273 fm3130->regs[FM3130_ALARM_SECONDS], fm3130_set_alarm() 274 fm3130->regs[FM3130_ALARM_MINUTES], fm3130_set_alarm() 275 fm3130->regs[FM3130_ALARM_HOURS], fm3130_set_alarm() 276 fm3130->regs[FM3130_ALARM_DATE], fm3130_set_alarm() 277 fm3130->regs[FM3130_ALARM_MONTHS]); fm3130_set_alarm() 282 fm3130->regs[FM3130_ALARM_SECONDS + i]); fm3130_set_alarm() 284 fm3130->regs[FM3130_RTC_CONTROL] = fm3130_set_alarm() 290 (fm3130->regs[FM3130_RTC_CONTROL] & fm3130_set_alarm() 295 fm3130->regs[FM3130_RTC_CONTROL] & fm3130_set_alarm() 312 fm3130->regs[FM3130_RTC_CONTROL] = fm3130_alarm_irq_enable() 316 enabled, fm3130->regs[FM3130_RTC_CONTROL]); fm3130_alarm_irq_enable() 321 FM3130_RTC_CONTROL, fm3130->regs[FM3130_RTC_CONTROL] & fm3130_alarm_irq_enable() 327 FM3130_RTC_CONTROL, (fm3130->regs[FM3130_RTC_CONTROL] & fm3130_alarm_irq_enable() 380 fm3130->msg[1].buf = &fm3130->regs[FM3130_RTC_SECONDS]; fm3130_probe() 391 fm3130->msg[3].buf = &fm3130->regs[FM3130_ALARM_SECONDS]; fm3130_probe() 403 fm3130->regs[FM3130_RTC_CONTROL] = fm3130_probe() 405 fm3130->regs[FM3130_CAL_CONTROL] = fm3130_probe() 409 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL) { fm3130_probe() 411 fm3130->regs[FM3130_RTC_CONTROL] & fm3130_probe() 417 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE || fm3130_probe() 418 fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ) { fm3130_probe() 420 fm3130->regs[FM3130_RTC_CONTROL] & fm3130_probe() 427 if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN) fm3130_probe() 429 fm3130->regs[FM3130_CAL_CONTROL] & fm3130_probe() 433 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_LB) { fm3130_probe() 435 fm3130->regs[FM3130_RTC_CONTROL] & fm3130_probe() 441 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_POR) { fm3130_probe() 443 fm3130->regs[FM3130_RTC_CONTROL] & fm3130_probe() 451 tmp = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_probe() 455 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_probe() 459 tmp = bcd2bin(fm3130->regs[FM3130_RTC_HOURS] & 0x3f); fm3130_probe() 463 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_probe() 467 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f); fm3130_probe() 476 tmp = bcd2bin(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); fm3130_probe() 480 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); fm3130_probe() 484 tmp = bcd2bin(fm3130->regs[FM3130_RTC_HOURS] & 0x3f); fm3130_probe() 488 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DAY] & 0x7); fm3130_probe() 492 tmp = bcd2bin(fm3130->regs[FM3130_RTC_DATE] & 0x3f); fm3130_probe() 496 tmp = bcd2bin(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f); fm3130_probe() 506 fm3130->regs); fm3130_probe()
|
/linux-4.1.27/arch/xtensa/include/asm/ |
H A D | ptrace.h | 60 # define user_mode(regs) (((regs)->ps & 0x00000020)!=0) 61 # define instruction_pointer(regs) ((regs)->pc) 62 # define return_pointer(regs) (MAKE_PC_FROM_RA((regs)->areg[0], \ 63 (regs)->areg[1])) 66 # define profile_pc(regs) instruction_pointer(regs) 68 # define profile_pc(regs) \ 70 in_lock_functions(instruction_pointer(regs)) ? \ 71 return_pointer(regs) : instruction_pointer(regs); \ 75 #define user_stack_pointer(regs) ((regs)->areg[1])
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | entry.h | 9 void handler_irq(int irq, struct pt_regs *regs); 13 void do_hw_interrupt(struct pt_regs *regs, unsigned long type); 14 void do_illegal_instruction(struct pt_regs *regs, unsigned long pc, 17 void do_priv_instruction(struct pt_regs *regs, unsigned long pc, 19 void do_memaccess_unaligned(struct pt_regs *regs, unsigned long pc, 21 void do_fpd_trap(struct pt_regs *regs, unsigned long pc, 23 void do_fpe_trap(struct pt_regs *regs, unsigned long pc, 25 void handle_tag_overflow(struct pt_regs *regs, unsigned long pc, 27 void handle_watchpoint(struct pt_regs *regs, unsigned long pc, 29 void handle_reg_access(struct pt_regs *regs, unsigned long pc, 31 void handle_cp_disabled(struct pt_regs *regs, unsigned long pc, 33 void handle_cp_exception(struct pt_regs *regs, unsigned long pc, 77 asmlinkage void sparc_breakpoint(struct pt_regs *regs); 78 void timer_interrupt(int irq, struct pt_regs *regs); 80 void do_notify_resume(struct pt_regs *regs, 84 asmlinkage int syscall_trace_enter(struct pt_regs *regs); 85 asmlinkage void syscall_trace_leave(struct pt_regs *regs); 87 void bad_trap_tl1(struct pt_regs *regs, long lvl); 89 void do_fpieee(struct pt_regs *regs); 90 void do_fpother(struct pt_regs *regs); 91 void do_tof(struct pt_regs *regs); 92 void do_div0(struct pt_regs *regs); 93 void do_illegal_instruction(struct pt_regs *regs); 94 void mem_address_unaligned(struct pt_regs *regs, 97 void sun4v_do_mna(struct pt_regs *regs, 100 void do_privop(struct pt_regs *regs); 101 void do_privact(struct pt_regs *regs); 102 void do_cee(struct pt_regs *regs); 103 void do_div0_tl1(struct pt_regs *regs); 104 void do_fpieee_tl1(struct pt_regs *regs); 105 void do_fpother_tl1(struct pt_regs *regs); 106 void do_ill_tl1(struct pt_regs *regs); 107 void do_irq_tl1(struct pt_regs *regs); 108 void do_lddfmna_tl1(struct pt_regs *regs); 109 void do_stdfmna_tl1(struct pt_regs *regs); 110 void do_paw(struct pt_regs *regs); 111 void do_paw_tl1(struct pt_regs *regs); 112 void do_vaw(struct pt_regs *regs); 113 void do_vaw_tl1(struct pt_regs *regs); 114 void do_tof_tl1(struct pt_regs *regs); 115 void do_getpsr(struct pt_regs *regs); 117 void spitfire_insn_access_exception(struct pt_regs *regs, 120 void spitfire_insn_access_exception_tl1(struct pt_regs *regs, 123 void spitfire_data_access_exception(struct pt_regs *regs, 126 void spitfire_data_access_exception_tl1(struct pt_regs *regs, 129 void spitfire_access_error(struct pt_regs *regs, 133 void cheetah_fecc_handler(struct pt_regs *regs, 136 void cheetah_cee_handler(struct pt_regs *regs, 139 void cheetah_deferred_handler(struct pt_regs *regs, 142 void cheetah_plus_parity_error(int type, struct pt_regs *regs); 144 void sun4v_insn_access_exception(struct pt_regs *regs, 147 void sun4v_insn_access_exception_tl1(struct pt_regs *regs, 150 void sun4v_data_access_exception(struct pt_regs *regs, 153 void sun4v_data_access_exception_tl1(struct pt_regs *regs, 156 void sun4v_resum_error(struct pt_regs *regs, 158 void sun4v_resum_overflow(struct pt_regs *regs); 159 void sun4v_nonresum_error(struct pt_regs *regs, 161 void sun4v_nonresum_overflow(struct pt_regs *regs); 168 void sun4v_itlb_error_report(struct pt_regs *regs, int tl); 175 void sun4v_dtlb_error_report(struct pt_regs *regs, int tl);
|
H A D | kgdb_64.c | 18 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) pt_regs_to_gdb_regs() argument 25 gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; pt_regs_to_gdb_regs() 27 win = (struct reg_window *) (regs->u_regs[UREG_FP] + STACK_BIAS); pt_regs_to_gdb_regs() 36 gdb_regs[GDB_PC] = regs->tpc; pt_regs_to_gdb_regs() 37 gdb_regs[GDB_NPC] = regs->tnpc; pt_regs_to_gdb_regs() 38 gdb_regs[GDB_STATE] = regs->tstate; pt_regs_to_gdb_regs() 41 gdb_regs[GDB_Y] = regs->y; pt_regs_to_gdb_regs() 87 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs_to_pt_regs() argument 93 regs->u_regs[UREG_G1 + i] = gdb_regs[GDB_G1 + i]; gdb_regs_to_pt_regs() 98 if (regs->tstate != gdb_regs[GDB_STATE]) { gdb_regs_to_pt_regs() 99 unsigned long cwp = regs->tstate & TSTATE_CWP; gdb_regs_to_pt_regs() 101 regs->tstate = (gdb_regs[GDB_STATE] & ~TSTATE_CWP) | cwp; gdb_regs_to_pt_regs() 104 regs->tpc = gdb_regs[GDB_PC]; gdb_regs_to_pt_regs() 105 regs->tnpc = gdb_regs[GDB_NPC]; gdb_regs_to_pt_regs() 106 regs->y = gdb_regs[GDB_Y]; gdb_regs_to_pt_regs() 108 win = (struct reg_window *) (regs->u_regs[UREG_FP] + STACK_BIAS); gdb_regs_to_pt_regs() 116 void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs) smp_kgdb_capture_client() argument 128 kgdb_nmicallback(raw_smp_processor_id(), regs); smp_kgdb_capture_client() local 163 asmlinkage void kgdb_trap(unsigned long trap_level, struct pt_regs *regs) kgdb_trap() argument 168 if (user_mode(regs)) { kgdb_trap() 169 bad_trap(regs, trap_level); kgdb_trap() 176 kgdb_handle_exception(0x172, SIGTRAP, 0, regs); kgdb_trap() 191 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) kgdb_arch_set_pc() argument 193 regs->tpc = ip; kgdb_arch_set_pc() 194 regs->tnpc = regs->tpc + 4; kgdb_arch_set_pc()
|
H A D | kgdb_32.c | 17 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) pt_regs_to_gdb_regs() argument 24 gdb_regs[GDB_G1 + i] = regs->u_regs[UREG_G1 + i]; pt_regs_to_gdb_regs() 26 win = (struct reg_window32 *) regs->u_regs[UREG_FP]; pt_regs_to_gdb_regs() 35 gdb_regs[GDB_Y] = regs->y; pt_regs_to_gdb_regs() 36 gdb_regs[GDB_PSR] = regs->psr; pt_regs_to_gdb_regs() 39 gdb_regs[GDB_PC] = regs->pc; pt_regs_to_gdb_regs() 40 gdb_regs[GDB_NPC] = regs->npc; pt_regs_to_gdb_regs() 80 void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) gdb_regs_to_pt_regs() argument 86 regs->u_regs[UREG_G1 + i] = gdb_regs[GDB_G1 + i]; gdb_regs_to_pt_regs() 91 if (regs->psr != gdb_regs[GDB_PSR]) { gdb_regs_to_pt_regs() 92 unsigned long cwp = regs->psr & PSR_CWP; gdb_regs_to_pt_regs() 94 regs->psr = (gdb_regs[GDB_PSR] & ~PSR_CWP) | cwp; gdb_regs_to_pt_regs() 97 regs->pc = gdb_regs[GDB_PC]; gdb_regs_to_pt_regs() 98 regs->npc = gdb_regs[GDB_NPC]; gdb_regs_to_pt_regs() 99 regs->y = gdb_regs[GDB_Y]; gdb_regs_to_pt_regs() 101 win = (struct reg_window32 *) regs->u_regs[UREG_FP]; gdb_regs_to_pt_regs() 136 extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type); 138 asmlinkage void kgdb_trap(struct pt_regs *regs) kgdb_trap() argument 142 if (user_mode(regs)) { kgdb_trap() 143 do_hw_interrupt(regs, 0xfd); kgdb_trap() 150 kgdb_handle_exception(0x172, SIGTRAP, 0, regs); kgdb_trap() 163 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) kgdb_arch_set_pc() argument 165 regs->pc = ip; kgdb_arch_set_pc() 166 regs->npc = regs->pc + 4; kgdb_arch_set_pc()
|
H A D | signal_32.c | 50 struct pt_regs regs; member in struct:rt_signal_frame 63 asmlinkage void do_sigreturn(struct pt_regs *regs) do_sigreturn() argument 77 sf = (struct signal_frame __user *) regs->u_regs[UREG_FP]; do_sigreturn() 93 up_psr = regs->psr; do_sigreturn() 94 err |= __copy_from_user(regs, &sf->info.si_regs, sizeof(struct pt_regs)); do_sigreturn() 97 regs->psr = (up_psr & ~(PSR_ICC | PSR_EF)) do_sigreturn() 98 | (regs->psr & (PSR_ICC | PSR_EF)); do_sigreturn() 101 pt_regs_clear_syscall(regs); do_sigreturn() 105 err |= restore_fpu_state(regs, fpu_save); do_sigreturn() 127 asmlinkage void do_rt_sigreturn(struct pt_regs *regs) do_rt_sigreturn() argument 137 sf = (struct rt_signal_frame __user *) regs->u_regs[UREG_FP]; do_rt_sigreturn() 142 err = __get_user(pc, &sf->regs.pc); do_rt_sigreturn() 143 err |= __get_user(npc, &sf->regs.npc); do_rt_sigreturn() 146 err |= __get_user(regs->y, &sf->regs.y); do_rt_sigreturn() 147 err |= __get_user(psr, &sf->regs.psr); do_rt_sigreturn() 149 err |= __copy_from_user(®s->u_regs[UREG_G1], do_rt_sigreturn() 150 &sf->regs.u_regs[UREG_G1], 15 * sizeof(u32)); do_rt_sigreturn() 152 regs->psr = (regs->psr & ~PSR_ICC) | (psr & PSR_ICC); do_rt_sigreturn() 155 pt_regs_clear_syscall(regs); do_rt_sigreturn() 159 err |= restore_fpu_state(regs, fpu_save); do_rt_sigreturn() 166 regs->pc = pc; do_rt_sigreturn() 167 regs->npc = npc; do_rt_sigreturn() 190 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize) get_sigframe() argument 192 unsigned long sp = regs->u_regs[UREG_FP]; get_sigframe() 215 static int setup_frame(struct ksignal *ksig, struct pt_regs *regs, setup_frame() argument 234 get_sigframe(ksig, regs, sigframe_size); setup_frame() 244 err = __copy_to_user(&sf->info.si_regs, regs, sizeof(struct pt_regs)); setup_frame() 251 err |= save_fpu_state(regs, fp); setup_frame() 269 err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], setup_frame() 281 regs->u_regs[UREG_FP] = (unsigned long) sf; setup_frame() 282 regs->u_regs[UREG_I0] = ksig->sig; setup_frame() 283 regs->u_regs[UREG_I1] = (unsigned long) &sf->info; setup_frame() 284 regs->u_regs[UREG_I2] = (unsigned long) &sf->info; setup_frame() 287 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; setup_frame() 288 regs->npc = (regs->pc + 4); setup_frame() 292 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; setup_frame() 294 regs->u_regs[UREG_I7] = (unsigned long)(&(sf->insns[0]) - 2); setup_frame() 310 static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs, setup_rt_frame() argument 327 get_sigframe(ksig, regs, sigframe_size); setup_rt_frame() 334 err = __put_user(regs->pc, &sf->regs.pc); setup_rt_frame() 335 err |= __put_user(regs->npc, &sf->regs.npc); setup_rt_frame() 336 err |= __put_user(regs->y, &sf->regs.y); setup_rt_frame() 337 psr = regs->psr; setup_rt_frame() 340 err |= __put_user(psr, &sf->regs.psr); setup_rt_frame() 341 err |= __copy_to_user(&sf->regs.u_regs, regs->u_regs, sizeof(regs->u_regs)); setup_rt_frame() 347 err |= save_fpu_state(regs, fp); setup_rt_frame() 363 err |= __save_altstack(&sf->stack, regs->u_regs[UREG_FP]); setup_rt_frame() 366 err |= __copy_to_user(sf, (char *) regs->u_regs[UREG_FP], setup_rt_frame() 380 regs->u_regs[UREG_FP] = (unsigned long) sf; setup_rt_frame() 381 regs->u_regs[UREG_I0] = ksig->sig; setup_rt_frame() 382 regs->u_regs[UREG_I1] = (unsigned long) &sf->info; setup_rt_frame() 383 regs->u_regs[UREG_I2] = (unsigned long) &sf->regs; setup_rt_frame() 385 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 386 regs->npc = (regs->pc + 4); setup_rt_frame() 389 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; setup_rt_frame() 391 regs->u_regs[UREG_I7] = (unsigned long)(&(sf->insns[0]) - 2); setup_rt_frame() 408 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 414 err = setup_rt_frame(ksig, regs, oldset); handle_signal() 416 err = setup_frame(ksig, regs, oldset); handle_signal() 420 static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, syscall_restart() argument 423 switch(regs->u_regs[UREG_I0]) { syscall_restart() 427 regs->u_regs[UREG_I0] = EINTR; syscall_restart() 428 regs->psr |= PSR_C; syscall_restart() 435 regs->u_regs[UREG_I0] = orig_i0; syscall_restart() 436 regs->pc -= 4; syscall_restart() 437 regs->npc -= 4; syscall_restart() 445 static void do_signal(struct pt_regs *regs, unsigned long orig_i0) do_signal() argument 469 if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) do_signal() 470 regs->u_regs[UREG_G6] = orig_i0; do_signal() 479 if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C)) { do_signal() 481 orig_i0 = regs->u_regs[UREG_G6]; do_signal() 486 syscall_restart(orig_i0, regs, &ksig.ka.sa); do_signal() 487 handle_signal(&ksig, regs); do_signal() 490 switch (regs->u_regs[UREG_I0]) { do_signal() 495 regs->u_regs[UREG_I0] = orig_i0; do_signal() 496 regs->pc -= 4; do_signal() 497 regs->npc -= 4; do_signal() 498 pt_regs_clear_syscall(regs); do_signal() 500 regs->u_regs[UREG_G1] = __NR_restart_syscall; do_signal() 501 regs->pc -= 4; do_signal() 502 regs->npc -= 4; do_signal() 503 pt_regs_clear_syscall(regs); do_signal() 510 void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, do_notify_resume() argument 514 do_signal(regs, orig_i0); do_notify_resume() 517 tracehook_notify_resume(regs); do_notify_resume()
|
H A D | sigutil.h | 4 int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu); 5 int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu);
|
H A D | signal_64.c | 44 asmlinkage void sparc64_set_context(struct pt_regs *regs) sparc64_set_context() argument 47 regs->u_regs[UREG_I0]; sparc64_set_context() 65 if (regs->u_regs[UREG_I1]) { sparc64_set_context() 81 regs->tpc = pc; sparc64_set_context() 82 regs->tnpc = npc; sparc64_set_context() 83 err |= __get_user(regs->y, &((*grp)[MC_Y])); sparc64_set_context() 85 regs->tstate &= ~(TSTATE_ASI | TSTATE_ICC | TSTATE_XCC); sparc64_set_context() 86 regs->tstate |= (tstate & (TSTATE_ASI | TSTATE_ICC | TSTATE_XCC)); sparc64_set_context() 87 err |= __get_user(regs->u_regs[UREG_G1], (&(*grp)[MC_G1])); sparc64_set_context() 88 err |= __get_user(regs->u_regs[UREG_G2], (&(*grp)[MC_G2])); sparc64_set_context() 89 err |= __get_user(regs->u_regs[UREG_G3], (&(*grp)[MC_G3])); sparc64_set_context() 90 err |= __get_user(regs->u_regs[UREG_G4], (&(*grp)[MC_G4])); sparc64_set_context() 91 err |= __get_user(regs->u_regs[UREG_G5], (&(*grp)[MC_G5])); sparc64_set_context() 92 err |= __get_user(regs->u_regs[UREG_G6], (&(*grp)[MC_G6])); sparc64_set_context() 96 err |= __get_user(regs->u_regs[UREG_I0], (&(*grp)[MC_O0])); sparc64_set_context() 97 err |= __get_user(regs->u_regs[UREG_I1], (&(*grp)[MC_O1])); sparc64_set_context() 98 err |= __get_user(regs->u_regs[UREG_I2], (&(*grp)[MC_O2])); sparc64_set_context() 99 err |= __get_user(regs->u_regs[UREG_I3], (&(*grp)[MC_O3])); sparc64_set_context() 100 err |= __get_user(regs->u_regs[UREG_I4], (&(*grp)[MC_O4])); sparc64_set_context() 101 err |= __get_user(regs->u_regs[UREG_I5], (&(*grp)[MC_O5])); sparc64_set_context() 102 err |= __get_user(regs->u_regs[UREG_I6], (&(*grp)[MC_O6])); sparc64_set_context() 103 err |= __get_user(regs->u_regs[UREG_I7], (&(*grp)[MC_O7])); sparc64_set_context() 108 (&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6]))); sparc64_set_context() 110 (&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7]))); sparc64_set_context() 131 regs->tstate &= ~TSTATE_PEF; sparc64_set_context() 143 asmlinkage void sparc64_get_context(struct pt_regs *regs) sparc64_get_context() argument 146 regs->u_regs[UREG_I0]; sparc64_get_context() 169 regs->tpc = (regs->tnpc & 0xffffffff); sparc64_get_context() 170 regs->tnpc = (regs->tnpc + 4) & 0xffffffff; sparc64_get_context() 172 regs->tpc = regs->tnpc; sparc64_get_context() 173 regs->tnpc += 4; sparc64_get_context() 183 err |= __put_user(regs->tstate, &((*grp)[MC_TSTATE])); sparc64_get_context() 184 err |= __put_user(regs->tpc, &((*grp)[MC_PC])); sparc64_get_context() 185 err |= __put_user(regs->tnpc, &((*grp)[MC_NPC])); sparc64_get_context() 186 err |= __put_user(regs->y, &((*grp)[MC_Y])); sparc64_get_context() 187 err |= __put_user(regs->u_regs[UREG_G1], &((*grp)[MC_G1])); sparc64_get_context() 188 err |= __put_user(regs->u_regs[UREG_G2], &((*grp)[MC_G2])); sparc64_get_context() 189 err |= __put_user(regs->u_regs[UREG_G3], &((*grp)[MC_G3])); sparc64_get_context() 190 err |= __put_user(regs->u_regs[UREG_G4], &((*grp)[MC_G4])); sparc64_get_context() 191 err |= __put_user(regs->u_regs[UREG_G5], &((*grp)[MC_G5])); sparc64_get_context() 192 err |= __put_user(regs->u_regs[UREG_G6], &((*grp)[MC_G6])); sparc64_get_context() 193 err |= __put_user(regs->u_regs[UREG_G7], &((*grp)[MC_G7])); sparc64_get_context() 194 err |= __put_user(regs->u_regs[UREG_I0], &((*grp)[MC_O0])); sparc64_get_context() 195 err |= __put_user(regs->u_regs[UREG_I1], &((*grp)[MC_O1])); sparc64_get_context() 196 err |= __put_user(regs->u_regs[UREG_I2], &((*grp)[MC_O2])); sparc64_get_context() 197 err |= __put_user(regs->u_regs[UREG_I3], &((*grp)[MC_O3])); sparc64_get_context() 198 err |= __put_user(regs->u_regs[UREG_I4], &((*grp)[MC_O4])); sparc64_get_context() 199 err |= __put_user(regs->u_regs[UREG_I5], &((*grp)[MC_O5])); sparc64_get_context() 200 err |= __put_user(regs->u_regs[UREG_I6], &((*grp)[MC_O6])); sparc64_get_context() 201 err |= __put_user(regs->u_regs[UREG_I7], &((*grp)[MC_O7])); sparc64_get_context() 204 (&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[6]))); sparc64_get_context() 206 (&(((struct reg_window __user *)(STACK_BIAS+regs->u_regs[UREG_I6]))->ins[7]))); sparc64_get_context() 240 struct pt_regs regs; member in struct:rt_signal_frame 247 void do_rt_sigreturn(struct pt_regs *regs) do_rt_sigreturn() argument 261 (regs->u_regs [UREG_FP] + STACK_BIAS); do_rt_sigreturn() 267 err = get_user(tpc, &sf->regs.tpc); do_rt_sigreturn() 268 err |= __get_user(tnpc, &sf->regs.tnpc); do_rt_sigreturn() 276 err |= __get_user(regs->y, &sf->regs.y); do_rt_sigreturn() 277 err |= __get_user(tstate, &sf->regs.tstate); do_rt_sigreturn() 278 err |= copy_from_user(regs->u_regs, sf->regs.u_regs, sizeof(regs->u_regs)); do_rt_sigreturn() 281 regs->tstate &= ~(TSTATE_ASI | TSTATE_ICC | TSTATE_XCC); do_rt_sigreturn() 282 regs->tstate |= (tstate & (TSTATE_ASI | TSTATE_ICC | TSTATE_XCC)); do_rt_sigreturn() 286 err |= restore_fpu_state(regs, fpu_save); do_rt_sigreturn() 299 regs->tpc = tpc; do_rt_sigreturn() 300 regs->tnpc = tnpc; do_rt_sigreturn() 303 pt_regs_clear_syscall(regs); do_rt_sigreturn() 319 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize) get_sigframe() argument 321 unsigned long sp = regs->u_regs[UREG_FP] + STACK_BIAS; get_sigframe() 345 setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) setup_rt_frame() argument 363 get_sigframe(ksig, regs, sf_size); setup_rt_frame() 373 err = copy_to_user(&sf->regs, regs, sizeof (*regs)); setup_rt_frame() 378 err |= save_fpu_state(regs, fpu_save); setup_rt_frame() 394 err |= __save_altstack(&sf->stack, regs->u_regs[UREG_FP]); setup_rt_frame() 400 (u64 __user *)(regs->u_regs[UREG_FP] + setup_rt_frame() 419 regs->u_regs[UREG_FP] = ((unsigned long) sf) - STACK_BIAS; setup_rt_frame() 420 regs->u_regs[UREG_I0] = ksig->sig; setup_rt_frame() 421 regs->u_regs[UREG_I1] = (unsigned long) &sf->info; setup_rt_frame() 427 regs->u_regs[UREG_I2] = (unsigned long) &sf->info; setup_rt_frame() 430 regs->tpc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 431 regs->tnpc = (regs->tpc + 4); setup_rt_frame() 433 regs->tpc &= 0xffffffff; setup_rt_frame() 434 regs->tnpc &= 0xffffffff; setup_rt_frame() 437 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; setup_rt_frame() 441 static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, syscall_restart() argument 444 switch (regs->u_regs[UREG_I0]) { syscall_restart() 448 regs->u_regs[UREG_I0] = EINTR; syscall_restart() 449 regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY); syscall_restart() 456 regs->u_regs[UREG_I0] = orig_i0; syscall_restart() 457 regs->tpc -= 4; syscall_restart() 458 regs->tnpc -= 4; syscall_restart() 466 static void do_signal(struct pt_regs *regs, unsigned long orig_i0) do_signal() argument 490 if (pt_regs_is_syscall(regs) && do_signal() 491 (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) do_signal() 492 regs->u_regs[UREG_G6] = orig_i0; do_signal() 496 do_signal32(regs); do_signal() 504 if (pt_regs_is_syscall(regs) && do_signal() 505 (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { do_signal() 507 orig_i0 = regs->u_regs[UREG_G6]; do_signal() 512 syscall_restart(orig_i0, regs, &ksig.ka.sa); do_signal() 513 signal_setup_done(setup_rt_frame(&ksig, regs), &ksig, 0); do_signal() 516 switch (regs->u_regs[UREG_I0]) { do_signal() 521 regs->u_regs[UREG_I0] = orig_i0; do_signal() 522 regs->tpc -= 4; do_signal() 523 regs->tnpc -= 4; do_signal() 524 pt_regs_clear_syscall(regs); do_signal() 526 regs->u_regs[UREG_G1] = __NR_restart_syscall; do_signal() 527 regs->tpc -= 4; do_signal() 528 regs->tnpc -= 4; do_signal() 529 pt_regs_clear_syscall(regs); do_signal() 536 void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags) do_notify_resume() argument 540 do_signal(regs, orig_i0); do_notify_resume() 543 tracehook_notify_resume(regs); do_notify_resume()
|
H A D | kprobes.c | 27 * - Remember "regs->tnpc" and interrupt level stored in 28 * "regs->tstate" so we can restore them later 30 * - Set regs->tpc to point to kprobe->ainsn.insn[0] 31 * - Set regs->tnpc to point to kprobe->ainsn.insn[1] 37 * - Set regs->tpc to "remembered" regs->tnpc stored above, 38 * restore the PIL interrupt level in "regs->tstate" as well 39 * - Make any adjustments necessary to regs->tnpc in order 92 static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, set_current_kprobe() argument 96 kcb->kprobe_orig_tnpc = regs->tnpc; set_current_kprobe() 97 kcb->kprobe_orig_tstate_pil = (regs->tstate & TSTATE_PIL); set_current_kprobe() 100 static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs, prepare_singlestep() argument 103 regs->tstate |= TSTATE_PIL; prepare_singlestep() 107 regs->tpc = (unsigned long) p->addr; prepare_singlestep() 108 regs->tnpc = kcb->kprobe_orig_tnpc; prepare_singlestep() 110 regs->tpc = (unsigned long) &p->ainsn.insn[0]; prepare_singlestep() 111 regs->tnpc = (unsigned long) &p->ainsn.insn[1]; prepare_singlestep() 115 static int __kprobes kprobe_handler(struct pt_regs *regs) kprobe_handler() argument 118 void *addr = (void *) regs->tpc; kprobe_handler() 133 regs->tstate = ((regs->tstate & ~TSTATE_PIL) | kprobe_handler() 144 set_current_kprobe(p, regs, kcb); kprobe_handler() 147 prepare_singlestep(p, regs, kcb); kprobe_handler() 159 if (p->break_handler && p->break_handler(p, regs)) kprobe_handler() 181 set_current_kprobe(p, regs, kcb); kprobe_handler() 183 if (p->pre_handler && p->pre_handler(p, regs)) kprobe_handler() 187 prepare_singlestep(p, regs, kcb); kprobe_handler() 199 * regs->tpc and regs->tnpc still hold the values of the 205 struct pt_regs *regs) relbranch_fixup() 210 if (regs->tnpc == regs->tpc + 0x4UL) relbranch_fixup() 227 return (real_pc + (regs->tnpc - ainsn_addr)); relbranch_fixup() 233 return regs->tnpc; relbranch_fixup() 239 static void __kprobes retpc_fixup(struct pt_regs *regs, u32 insn, retpc_fixup() argument 246 slot = ®s->u_regs[UREG_I7]; retpc_fixup() 254 slot = ®s->u_regs[rd]; retpc_fixup() 261 (regs->u_regs[UREG_FP] + STACK_BIAS); retpc_fixup() 281 struct pt_regs *regs, struct kprobe_ctlblk *kcb) resume_execution() 285 regs->tnpc = relbranch_fixup(insn, p, regs); resume_execution() 288 regs->tpc = kcb->kprobe_orig_tnpc; resume_execution() 290 retpc_fixup(regs, insn, (unsigned long) p->addr); resume_execution() 292 regs->tstate = ((regs->tstate & ~TSTATE_PIL) | resume_execution() 296 static int __kprobes post_kprobe_handler(struct pt_regs *regs) post_kprobe_handler() argument 306 cur->post_handler(cur, regs, 0); post_kprobe_handler() 309 resume_execution(cur, regs, kcb); post_kprobe_handler() 323 int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) kprobe_fault_handler() argument 339 regs->tpc = (unsigned long)cur->addr; kprobe_fault_handler() 340 regs->tnpc = kcb->kprobe_orig_tnpc; kprobe_fault_handler() 341 regs->tstate = ((regs->tstate & ~TSTATE_PIL) | kprobe_fault_handler() 365 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) kprobe_fault_handler() 373 entry = search_exception_tables(regs->tpc); kprobe_fault_handler() 375 regs->tpc = entry->fixup; kprobe_fault_handler() 376 regs->tnpc = regs->tpc + 4; kprobe_fault_handler() 401 if (args->regs && user_mode(args->regs)) kprobe_exceptions_notify() 406 if (kprobe_handler(args->regs)) kprobe_exceptions_notify() 410 if (post_kprobe_handler(args->regs)) kprobe_exceptions_notify() 420 struct pt_regs *regs) kprobe_trap() 426 if (user_mode(regs)) { kprobe_trap() 428 bad_trap(regs, trap_level); kprobe_trap() 437 regs, 0, trap_level, SIGTRAP) != NOTIFY_STOP) kprobe_trap() 438 bad_trap(regs, trap_level); kprobe_trap() 444 int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) setjmp_pre_handler() argument 449 memcpy(&(kcb->jprobe_saved_regs), regs, sizeof(*regs)); setjmp_pre_handler() 451 regs->tpc = (unsigned long) jp->entry; setjmp_pre_handler() 452 regs->tnpc = ((unsigned long) jp->entry) + 0x4UL; setjmp_pre_handler() 453 regs->tstate |= TSTATE_PIL; setjmp_pre_handler() 477 int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) longjmp_break_handler() argument 479 u32 *addr = (u32 *) regs->tpc; longjmp_break_handler() 483 memcpy(regs, &(kcb->jprobe_saved_regs), sizeof(*regs)); longjmp_break_handler() 503 struct pt_regs *regs) arch_prepare_kretprobe() 505 ri->ret_addr = (kprobe_opcode_t *)(regs->u_regs[UREG_RETPC] + 8); arch_prepare_kretprobe() 508 regs->u_regs[UREG_RETPC] = arch_prepare_kretprobe() 516 struct pt_regs *regs) trampoline_probe_handler() 546 ri->rp->handler(ri, regs); hlist_for_each_entry_safe() 561 regs->tpc = orig_ret_address; 562 regs->tnpc = orig_ret_address + 4; 204 relbranch_fixup(u32 insn, struct kprobe *p, struct pt_regs *regs) relbranch_fixup() argument 280 resume_execution(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) resume_execution() argument 419 kprobe_trap(unsigned long trap_level, struct pt_regs *regs) kprobe_trap() argument 502 arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) arch_prepare_kretprobe() argument 515 trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) trampoline_probe_handler() argument
|
H A D | signal32.c | 61 struct pt_regs32 regs; member in struct:rt_signal_frame32 67 /* Only valid if (regs.psr & (PSR_VERS|PSR_IMPL)) == PSR_V8PLUS */ 141 void do_sigreturn32(struct pt_regs *regs) do_sigreturn32() argument 157 regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; do_sigreturn32() 158 sf = (struct signal_frame32 __user *) regs->u_regs[UREG_FP]; do_sigreturn32() 176 regs->tpc = pc; do_sigreturn32() 177 regs->tnpc = npc; do_sigreturn32() 180 err = __get_user(regs->y, &sf->info.si_regs.y); do_sigreturn32() 184 err |= __get_user(regs->u_regs[i], &sf->info.si_regs.u_regs[i]); do_sigreturn32() 191 err |= __get_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); do_sigreturn32() 193 regs->tstate &= ~TSTATE_ASI; do_sigreturn32() 194 regs->tstate |= ((asi & 0xffUL) << 24UL); do_sigreturn32() 199 regs->tstate &= ~(TSTATE_ICC|TSTATE_XCC); do_sigreturn32() 200 regs->tstate |= psr_to_tstate_icc(psr); do_sigreturn32() 203 pt_regs_clear_syscall(regs); do_sigreturn32() 207 err |= restore_fpu_state(regs, compat_ptr(fpu_save)); do_sigreturn32() 227 asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) do_rt_sigreturn32() argument 241 regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; do_rt_sigreturn32() 242 sf = (struct rt_signal_frame32 __user *) regs->u_regs[UREG_FP]; do_rt_sigreturn32() 249 if (get_user(pc, &sf->regs.pc) || do_rt_sigreturn32() 250 __get_user(npc, &sf->regs.npc)) do_rt_sigreturn32() 260 regs->tpc = pc; do_rt_sigreturn32() 261 regs->tnpc = npc; do_rt_sigreturn32() 264 err = __get_user(regs->y, &sf->regs.y); do_rt_sigreturn32() 265 err |= __get_user(psr, &sf->regs.psr); do_rt_sigreturn32() 268 err |= __get_user(regs->u_regs[i], &sf->regs.u_regs[i]); do_rt_sigreturn32() 275 err |= __get_user(((u32 *)regs->u_regs)[2*i], &sf->v8plus.g_upper[i]); do_rt_sigreturn32() 277 regs->tstate &= ~TSTATE_ASI; do_rt_sigreturn32() 278 regs->tstate |= ((asi & 0xffUL) << 24UL); do_rt_sigreturn32() 283 regs->tstate &= ~(TSTATE_ICC|TSTATE_XCC); do_rt_sigreturn32() 284 regs->tstate |= psr_to_tstate_icc(psr); do_rt_sigreturn32() 287 pt_regs_clear_syscall(regs); do_rt_sigreturn32() 291 err |= restore_fpu_state(regs, compat_ptr(fpu_save)); do_rt_sigreturn32() 318 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize) get_sigframe() argument 322 regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; get_sigframe() 323 sp = regs->u_regs[UREG_FP]; get_sigframe() 404 static int setup_frame32(struct ksignal *ksig, struct pt_regs *regs, setup_frame32() argument 427 get_sigframe(ksig, regs, sigframe_size); setup_frame32() 438 regs->tpc &= 0xffffffff; setup_frame32() 439 regs->tnpc &= 0xffffffff; setup_frame32() 441 err = put_user(regs->tpc, &sf->info.si_regs.pc); setup_frame32() 442 err |= __put_user(regs->tnpc, &sf->info.si_regs.npc); setup_frame32() 443 err |= __put_user(regs->y, &sf->info.si_regs.y); setup_frame32() 444 psr = tstate_to_psr(regs->tstate); setup_frame32() 449 err |= __put_user(regs->u_regs[i], &sf->info.si_regs.u_regs[i]); setup_frame32() 453 err |= __put_user(((u32 *)regs->u_regs)[2*i], setup_frame32() 455 err |= __put_user((regs->tstate & TSTATE_ASI) >> 24UL, setup_frame32() 461 err |= save_fpu_state(regs, fp); setup_frame32() 488 (u32 __user *)(regs->u_regs[UREG_FP]), setup_frame32() 505 regs->u_regs[UREG_FP] = (unsigned long) sf; setup_frame32() 506 regs->u_regs[UREG_I0] = ksig->sig; setup_frame32() 507 regs->u_regs[UREG_I1] = (unsigned long) &sf->info; setup_frame32() 508 regs->u_regs[UREG_I2] = (unsigned long) &sf->info; setup_frame32() 511 regs->tpc = (unsigned long) ksig->ka.sa.sa_handler; setup_frame32() 512 regs->tnpc = (regs->tpc + 4); setup_frame32() 514 regs->tpc &= 0xffffffff; setup_frame32() 515 regs->tnpc &= 0xffffffff; setup_frame32() 520 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; setup_frame32() 524 regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2); setup_frame32() 535 static int setup_rt_frame32(struct ksignal *ksig, struct pt_regs *regs, setup_rt_frame32() argument 558 get_sigframe(ksig, regs, sigframe_size); setup_rt_frame32() 569 regs->tpc &= 0xffffffff; setup_rt_frame32() 570 regs->tnpc &= 0xffffffff; setup_rt_frame32() 572 err = put_user(regs->tpc, &sf->regs.pc); setup_rt_frame32() 573 err |= __put_user(regs->tnpc, &sf->regs.npc); setup_rt_frame32() 574 err |= __put_user(regs->y, &sf->regs.y); setup_rt_frame32() 575 psr = tstate_to_psr(regs->tstate); setup_rt_frame32() 578 err |= __put_user(psr, &sf->regs.psr); setup_rt_frame32() 580 err |= __put_user(regs->u_regs[i], &sf->regs.u_regs[i]); setup_rt_frame32() 584 err |= __put_user(((u32 *)regs->u_regs)[2*i], setup_rt_frame32() 586 err |= __put_user((regs->tstate & TSTATE_ASI) >> 24UL, setup_rt_frame32() 592 err |= save_fpu_state(regs, fp); setup_rt_frame32() 611 err |= __compat_save_altstack(&sf->stack, regs->u_regs[UREG_FP]); setup_rt_frame32() 619 (u32 __user *)(regs->u_regs[UREG_FP]), setup_rt_frame32() 636 regs->u_regs[UREG_FP] = (unsigned long) sf; setup_rt_frame32() 637 regs->u_regs[UREG_I0] = ksig->sig; setup_rt_frame32() 638 regs->u_regs[UREG_I1] = (unsigned long) &sf->info; setup_rt_frame32() 639 regs->u_regs[UREG_I2] = (unsigned long) &sf->regs; setup_rt_frame32() 642 regs->tpc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame32() 643 regs->tnpc = (regs->tpc + 4); setup_rt_frame32() 645 regs->tpc &= 0xffffffff; setup_rt_frame32() 646 regs->tnpc &= 0xffffffff; setup_rt_frame32() 651 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; setup_rt_frame32() 655 regs->u_regs[UREG_I7] = (unsigned long) (&(sf->insns[0]) - 2); setup_rt_frame32() 671 struct pt_regs *regs) handle_signal32() 677 err = setup_rt_frame32(ksig, regs, oldset); handle_signal32() 679 err = setup_frame32(ksig, regs, oldset); handle_signal32() 684 static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs, syscall_restart32() argument 687 switch (regs->u_regs[UREG_I0]) { syscall_restart32() 691 regs->u_regs[UREG_I0] = EINTR; syscall_restart32() 692 regs->tstate |= TSTATE_ICARRY; syscall_restart32() 699 regs->u_regs[UREG_I0] = orig_i0; syscall_restart32() 700 regs->tpc -= 4; syscall_restart32() 701 regs->tnpc -= 4; syscall_restart32() 709 void do_signal32(struct pt_regs * regs) do_signal32() argument 716 if (pt_regs_is_syscall(regs) && do_signal32() 717 (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) { do_signal32() 719 orig_i0 = regs->u_regs[UREG_G6]; do_signal32() 724 syscall_restart32(orig_i0, regs, &ksig.ka.sa); do_signal32() 725 handle_signal32(&ksig, regs); do_signal32() 728 switch (regs->u_regs[UREG_I0]) { do_signal32() 733 regs->u_regs[UREG_I0] = orig_i0; do_signal32() 734 regs->tpc -= 4; do_signal32() 735 regs->tnpc -= 4; do_signal32() 736 pt_regs_clear_syscall(regs); do_signal32() 738 regs->u_regs[UREG_G1] = __NR_restart_syscall; do_signal32() 739 regs->tpc -= 4; do_signal32() 740 regs->tnpc -= 4; do_signal32() 741 pt_regs_clear_syscall(regs); do_signal32() 670 handle_signal32(struct ksignal *ksig, struct pt_regs *regs) handle_signal32() argument
|
H A D | unaligned_64.c | 58 static inline int decode_access_size(struct pt_regs *regs, unsigned int insn) decode_access_size() argument 74 die_if_kernel("Byte sized unaligned access?!?!", regs); decode_access_size() 86 static inline int decode_asi(unsigned int insn, struct pt_regs *regs) decode_asi() argument 90 return (unsigned char)(regs->tstate >> 24); /* %asi */ decode_asi() 119 static unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) fetch_reg() argument 124 return (!reg ? 0 : regs->u_regs[reg]); fetch_reg() 126 fp = regs->u_regs[UREG_FP]; fetch_reg() 128 if (regs->tstate & TSTATE_PRIV) { fetch_reg() 144 static unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs) fetch_reg_addr() argument 149 return ®s->u_regs[reg]; fetch_reg_addr() 151 fp = regs->u_regs[UREG_FP]; fetch_reg_addr() 153 if (regs->tstate & TSTATE_PRIV) { fetch_reg_addr() 168 unsigned long compute_effective_address(struct pt_regs *regs, compute_effective_address() argument 171 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; compute_effective_address() 178 addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); compute_effective_address() 181 addr = (fetch_reg(rs1, regs) + fetch_reg(rs2, regs)); compute_effective_address() 191 static void __used unaligned_panic(char *str, struct pt_regs *regs) unaligned_panic() argument 193 die_if_kernel(str, regs); unaligned_panic() 203 struct pt_regs *regs, int asi, int orig_asi) do_int_store() 212 (unsigned)fetch_reg(reg_num, regs) : 0)) << 32) | do_int_store() 213 (unsigned)fetch_reg(reg_num + 1, regs); do_int_store() 215 src_val_p = fetch_reg_addr(reg_num, regs); do_int_store() 238 static inline void advance(struct pt_regs *regs) advance() argument 240 regs->tpc = regs->tnpc; advance() 241 regs->tnpc += 4; advance() 243 regs->tpc &= 0xffffffff; advance() 244 regs->tnpc &= 0xffffffff; advance() 260 struct pt_regs *regs = current_thread_info()->kern_una_regs; kernel_mna_trap_fault() local 264 entry = search_exception_tables(regs->tpc); kernel_mna_trap_fault() 268 address = compute_effective_address(regs, insn, kernel_mna_trap_fault() 283 die_if_kernel("Oops", regs); kernel_mna_trap_fault() 286 regs->tpc = entry->fixup; kernel_mna_trap_fault() 287 regs->tnpc = regs->tpc + 4; kernel_mna_trap_fault() 290 regs->tstate &= ~TSTATE_ASI; kernel_mna_trap_fault() 291 regs->tstate |= (ASI_AIUS << 24UL); kernel_mna_trap_fault() 295 static void log_unaligned(struct pt_regs *regs) log_unaligned() argument 301 regs->tpc, (void *) regs->tpc); log_unaligned() 305 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) kernel_unaligned_trap() argument 308 int size = decode_access_size(regs, insn); kernel_unaligned_trap() 311 current_thread_info()->kern_una_regs = regs; kernel_unaligned_trap() 314 orig_asi = asi = decode_asi(insn, regs); kernel_unaligned_trap() 324 log_unaligned(regs); kernel_unaligned_trap() 328 "at <%016lx>.\n", regs->tpc); kernel_unaligned_trap() 330 "unaligned load/store.", regs); kernel_unaligned_trap() 337 addr = compute_effective_address(regs, insn, kernel_unaligned_trap() 339 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, addr); kernel_unaligned_trap() 353 reg_addr = fetch_reg_addr(((insn>>25)&0x1f), regs); kernel_unaligned_trap() 380 (unsigned long *) addr, regs, kernel_unaligned_trap() 391 advance(regs); kernel_unaligned_trap() 395 int handle_popc(u32 insn, struct pt_regs *regs) handle_popc() argument 397 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; handle_popc() 401 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0); handle_popc() 407 value = fetch_reg(insn & 0x1f, regs); handle_popc() 412 regs->u_regs[rd] = ret; handle_popc() 414 unsigned long fp = regs->u_regs[UREG_FP]; handle_popc() 426 advance(regs); handle_popc() 430 extern void do_fpother(struct pt_regs *regs); 431 extern void do_privact(struct pt_regs *regs); 432 extern void sun4v_data_access_exception(struct pt_regs *regs, 436 int handle_ldf_stq(u32 insn, struct pt_regs *regs) handle_ldf_stq() argument 438 unsigned long addr = compute_effective_address(regs, insn, 0); handle_ldf_stq() 441 int asi = decode_asi(insn, regs); handle_ldf_stq() 444 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0); handle_ldf_stq() 450 do_fpother(regs); handle_ldf_stq() 458 first = *(u64 *)&f->regs[freg]; handle_ldf_stq() 459 second = *(u64 *)&f->regs[freg+2]; handle_ldf_stq() 462 do_privact(regs); handle_ldf_stq() 480 sun4v_data_access_exception(regs, addr, 0); handle_ldf_stq() 482 spitfire_data_access_exception(regs, 0, addr); handle_ldf_stq() 490 sun4v_data_access_exception(regs, addr, 0); handle_ldf_stq() 492 spitfire_data_access_exception(regs, 0, addr); handle_ldf_stq() 502 do_privact(regs); handle_ldf_stq() 506 sun4v_data_access_exception(regs, addr, 0); handle_ldf_stq() 508 spitfire_data_access_exception(regs, 0, addr); handle_ldf_stq() 526 sun4v_data_access_exception(regs, addr, 0); handle_ldf_stq() 528 spitfire_data_access_exception(regs, 0, addr); handle_ldf_stq() 550 memset(f->regs, 0, 32*sizeof(u32)); handle_ldf_stq() 552 memset(f->regs+32, 0, 32*sizeof(u32)); handle_ldf_stq() 554 memcpy(f->regs + freg, data, size * 4); handle_ldf_stq() 557 advance(regs); handle_ldf_stq() 561 void handle_ld_nf(u32 insn, struct pt_regs *regs) handle_ld_nf() argument 564 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; handle_ld_nf() 567 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0); handle_ld_nf() 570 reg = fetch_reg_addr(rd, regs); handle_ld_nf() 575 } else if (!test_thread_64bit_stack(regs->u_regs[UREG_FP])) { handle_ld_nf() 584 advance(regs); handle_ld_nf() 587 void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr) handle_lddfmna() argument 590 unsigned long pc = regs->tpc; handle_lddfmna() 591 unsigned long tstate = regs->tstate; handle_lddfmna() 599 die_if_kernel("lddfmna from kernel", regs); handle_lddfmna() 600 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, sfar); handle_lddfmna() 604 int asi = decode_asi(insn, regs); handle_lddfmna() 632 memset(f->regs, 0, 32*sizeof(u32)); handle_lddfmna() 634 memset(f->regs+32, 0, 32*sizeof(u32)); handle_lddfmna() 636 *(u64 *)(f->regs + freg) = value; handle_lddfmna() 641 sun4v_data_access_exception(regs, sfar, sfsr); handle_lddfmna() 643 spitfire_data_access_exception(regs, sfsr, sfar); handle_lddfmna() 646 advance(regs); handle_lddfmna() 651 void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr) handle_stdfmna() argument 654 unsigned long pc = regs->tpc; handle_stdfmna() 655 unsigned long tstate = regs->tstate; handle_stdfmna() 663 die_if_kernel("stdfmna from kernel", regs); handle_stdfmna() 664 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, sfar); handle_stdfmna() 668 int asi = decode_asi(insn, regs); handle_stdfmna() 677 value = *(u64 *)&f->regs[freg]; handle_stdfmna() 692 sun4v_data_access_exception(regs, sfar, sfsr); handle_stdfmna() 694 spitfire_data_access_exception(regs, sfsr, sfar); handle_stdfmna() 697 advance(regs); handle_stdfmna() 202 do_int_store(int reg_num, int size, unsigned long *dst_addr, struct pt_regs *regs, int asi, int orig_asi) do_int_store() argument
|
H A D | unaligned_32.c | 92 static inline unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) fetch_reg() argument 97 return (!reg ? 0 : regs->u_regs[reg]); fetch_reg() 100 win = (struct reg_window32 *) regs->u_regs[UREG_FP]; fetch_reg() 104 static inline unsigned long safe_fetch_reg(unsigned int reg, struct pt_regs *regs) safe_fetch_reg() argument 110 return (!reg ? 0 : regs->u_regs[reg]); safe_fetch_reg() 113 win = (struct reg_window32 __user *) regs->u_regs[UREG_FP]; safe_fetch_reg() 124 static inline unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs) fetch_reg_addr() argument 129 return ®s->u_regs[reg]; fetch_reg_addr() 130 win = (struct reg_window32 *) regs->u_regs[UREG_FP]; fetch_reg_addr() 134 static unsigned long compute_effective_address(struct pt_regs *regs, compute_effective_address() argument 143 return (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); compute_effective_address() 146 return (fetch_reg(rs1, regs) + fetch_reg(rs2, regs)); compute_effective_address() 150 unsigned long safe_compute_effective_address(struct pt_regs *regs, safe_compute_effective_address() argument 159 return (safe_fetch_reg(rs1, regs) + sign_extend_imm13(insn)); safe_compute_effective_address() 162 return (safe_fetch_reg(rs1, regs) + safe_fetch_reg(rs2, regs)); safe_compute_effective_address() 179 struct pt_regs *regs) do_int_store() 185 src_val = fetch_reg_addr(reg_num, regs); do_int_store() 189 zero[1] = fetch_reg(1, regs); do_int_store() 197 static inline void advance(struct pt_regs *regs) advance() argument 199 regs->pc = regs->npc; advance() 200 regs->npc += 4; advance() 213 static void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn) kernel_mna_trap_fault() argument 215 unsigned long g2 = regs->u_regs [UREG_G2]; kernel_mna_trap_fault() 216 unsigned long fixup = search_extables_range(regs->pc, &g2); kernel_mna_trap_fault() 219 unsigned long address = compute_effective_address(regs, insn); kernel_mna_trap_fault() 231 die_if_kernel("Oops", regs); kernel_mna_trap_fault() 234 regs->pc = fixup; kernel_mna_trap_fault() 235 regs->npc = regs->pc + 4; kernel_mna_trap_fault() 236 regs->u_regs [UREG_G2] = g2; kernel_mna_trap_fault() 239 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) kernel_unaligned_trap() argument 246 regs->pc); kernel_unaligned_trap() 249 unsigned long addr = compute_effective_address(regs, insn); kernel_unaligned_trap() 252 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, addr); kernel_unaligned_trap() 256 regs), kernel_unaligned_trap() 263 (unsigned long *) addr, regs); kernel_unaligned_trap() 270 kernel_mna_trap_fault(regs, insn); kernel_unaligned_trap() 272 advance(regs); kernel_unaligned_trap() 276 static inline int ok_for_user(struct pt_regs *regs, unsigned int insn, ok_for_user() argument 283 if ((regs->pc | regs->npc) & 3) ok_for_user() 288 ((void __user *)(((unsigned long *)regs->u_regs[UREG_FP])+(regnum))) ok_for_user() 311 static void user_mna_trap_fault(struct pt_regs *regs, unsigned int insn) user_mna_trap_fault() argument 318 info.si_addr = (void __user *)safe_compute_effective_address(regs, insn); user_mna_trap_fault() 323 asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn) user_unaligned_trap() argument 331 if(!ok_for_user(regs, insn, dir)) { user_unaligned_trap() 342 addr = compute_effective_address(regs, insn); user_unaligned_trap() 343 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, addr); user_unaligned_trap() 347 regs), user_unaligned_trap() 354 (unsigned long *) addr, regs); user_unaligned_trap() 373 advance(regs); user_unaligned_trap() 378 user_mna_trap_fault(regs, insn); user_unaligned_trap() 178 do_int_store(int reg_num, int size, unsigned long *dst_addr, struct pt_regs *regs) do_int_store() argument
|
H A D | kernel.h | 32 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); 33 int handle_popc(u32 insn, struct pt_regs *regs); 34 void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr); 35 void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr); 38 void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs); 39 void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs); 40 void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *regs); 41 void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs); 42 void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs); 45 void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs); 51 void do_sigreturn32(struct pt_regs *regs); 52 asmlinkage void do_rt_sigreturn32(struct pt_regs *regs); 53 void do_signal32(struct pt_regs * regs); 74 void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, 81 void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); 96 void smp4m_percpu_timer_interrupt(struct pt_regs *regs); 117 void smp4d_percpu_timer_interrupt(struct pt_regs *regs); 151 struct pt_regs *regs, 155 asmlinkage void do_sigreturn(struct pt_regs *regs); 156 asmlinkage void do_rt_sigreturn(struct pt_regs *regs); 157 void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, 164 asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p); 167 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); 168 asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn); 171 void try_to_clear_window_buffer(struct pt_regs *regs, int who); 179 void pcic_nmi(unsigned int pend, struct pt_regs *regs);
|
/linux-4.1.27/arch/arm/probes/kprobes/ |
H A D | actions-common.c | 23 struct pt_regs *regs) simulate_ldm1stm1() 30 long *addr = (long *)regs->uregs[rn]; simulate_ldm1stm1() 50 regs->uregs[reg] = *addr++; simulate_ldm1stm1() 52 *addr++ = regs->uregs[reg]; simulate_ldm1stm1() 59 regs->uregs[rn] = (long)addr; simulate_ldm1stm1() 65 struct pt_regs *regs) simulate_stm1_pc() 67 unsigned long addr = regs->ARM_pc - 4; simulate_stm1_pc() 69 regs->ARM_pc = (long)addr + str_pc_offset; simulate_stm1_pc() 70 simulate_ldm1stm1(insn, asi, regs); simulate_stm1_pc() 71 regs->ARM_pc = (long)addr + 4; simulate_stm1_pc() 76 struct pt_regs *regs) simulate_ldm1_pc() 78 simulate_ldm1stm1(insn, asi, regs); simulate_ldm1_pc() 79 load_write_pc(regs->ARM_pc, regs); simulate_ldm1_pc() 84 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_generic_r0_12_noflags() 86 register void *rregs asm("r1") = regs; emulate_generic_r0_12_noflags() 90 "stmdb sp!, {%[regs], r11} \n\t" emulate_generic_r0_12_noflags() 91 "ldmia %[regs], {r0-r12} \n\t" emulate_generic_r0_12_noflags() 100 "ldr lr, [sp], #4 \n\t" /* lr = regs */ emulate_generic_r0_12_noflags() 103 : [regs] "=r" (rregs), [fn] "=r" (rfn) emulate_generic_r0_12_noflags() 112 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_generic_r2_14_noflags() 115 (struct pt_regs *)(regs->uregs+2)); emulate_generic_r2_14_noflags() 120 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldm_r3_15() 123 (struct pt_regs *)(regs->uregs+3)); emulate_ldm_r3_15() 124 load_write_pc(regs->ARM_pc, regs); emulate_ldm_r3_15() 21 simulate_ldm1stm1(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) simulate_ldm1stm1() argument 63 simulate_stm1_pc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) simulate_stm1_pc() argument 74 simulate_ldm1_pc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) simulate_ldm1_pc() argument 83 emulate_generic_r0_12_noflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_generic_r0_12_noflags() argument 111 emulate_generic_r2_14_noflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_generic_r2_14_noflags() argument 119 emulate_ldm_r3_15(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldm_r3_15() argument
|
H A D | actions-thumb.c | 28 struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_table_branch() 30 unsigned long pc = regs->ARM_pc; t32_simulate_table_branch() 34 unsigned long rnv = (rn == 15) ? pc : regs->uregs[rn]; t32_simulate_table_branch() 35 unsigned long rmv = regs->uregs[rm]; t32_simulate_table_branch() 43 regs->ARM_pc = pc + 2 * halfwords; t32_simulate_table_branch() 48 struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_mrs() 52 regs->uregs[rd] = regs->ARM_cpsr & mask; t32_simulate_mrs() 57 struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_cond_branch() 59 unsigned long pc = regs->ARM_pc; t32_simulate_cond_branch() 67 regs->ARM_pc = pc + (offset * 2); t32_simulate_cond_branch() 82 struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_branch() 84 unsigned long pc = regs->ARM_pc; t32_simulate_branch() 97 regs->ARM_lr = regs->ARM_pc | 1; t32_simulate_branch() 100 regs->ARM_cpsr &= ~PSR_T_BIT; t32_simulate_branch() 105 regs->ARM_pc = pc + (offset * 2); t32_simulate_branch() 110 struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_ldr_literal() 112 unsigned long addr = regs->ARM_pc & ~3; t32_simulate_ldr_literal() 126 bx_write_pc(rtv, regs); t32_simulate_ldr_literal() 143 regs->uregs[rt] = rtv; t32_simulate_ldr_literal() 162 struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_ldrdstrd() 164 unsigned long pc = regs->ARM_pc & ~3; t32_emulate_ldrdstrd() 169 register unsigned long rt1v asm("r0") = regs->uregs[rt1]; t32_emulate_ldrdstrd() 170 register unsigned long rt2v asm("r1") = regs->uregs[rt2]; t32_emulate_ldrdstrd() 172 : regs->uregs[rn]; t32_emulate_ldrdstrd() 182 regs->uregs[rn] = rnv; /* Writeback base register */ t32_emulate_ldrdstrd() 183 regs->uregs[rt1] = rt1v; t32_emulate_ldrdstrd() 184 regs->uregs[rt2] = rt2v; t32_emulate_ldrdstrd() 189 struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_ldrstr() 195 register unsigned long rtv asm("r0") = regs->uregs[rt]; t32_emulate_ldrstr() 196 register unsigned long rnv asm("r2") = regs->uregs[rn]; t32_emulate_ldrstr() 197 register unsigned long rmv asm("r3") = regs->uregs[rm]; t32_emulate_ldrstr() 206 regs->uregs[rn] = rnv; /* Writeback base register */ t32_emulate_ldrstr() 208 bx_write_pc(rtv, regs); t32_emulate_ldrstr() 210 regs->uregs[rt] = rtv; t32_emulate_ldrstr() 215 struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8rn16rm0_rwflags() 221 register unsigned long rdv asm("r1") = regs->uregs[rd]; t32_emulate_rd8rn16rm0_rwflags() 222 register unsigned long rnv asm("r2") = regs->uregs[rn]; t32_emulate_rd8rn16rm0_rwflags() 223 register unsigned long rmv asm("r3") = regs->uregs[rm]; t32_emulate_rd8rn16rm0_rwflags() 224 unsigned long cpsr = regs->ARM_cpsr; t32_emulate_rd8rn16rm0_rwflags() 236 regs->uregs[rd] = rdv; t32_emulate_rd8rn16rm0_rwflags() 237 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); t32_emulate_rd8rn16rm0_rwflags() 242 struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8pc16_noflags() 244 unsigned long pc = regs->ARM_pc; t32_emulate_rd8pc16_noflags() 247 register unsigned long rdv asm("r1") = regs->uregs[rd]; t32_emulate_rd8pc16_noflags() 257 regs->uregs[rd] = rdv; t32_emulate_rd8pc16_noflags() 262 struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8rn16_noflags() 267 register unsigned long rdv asm("r1") = regs->uregs[rd]; t32_emulate_rd8rn16_noflags() 268 register unsigned long rnv asm("r2") = regs->uregs[rn]; t32_emulate_rd8rn16_noflags() 277 regs->uregs[rd] = rdv; t32_emulate_rd8rn16_noflags() 283 struct pt_regs *regs) t32_emulate_rdlo12rdhi8rn16rm0_noflags() 290 register unsigned long rdlov asm("r0") = regs->uregs[rdlo]; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 291 register unsigned long rdhiv asm("r1") = regs->uregs[rdhi]; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 292 register unsigned long rnv asm("r2") = regs->uregs[rn]; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 293 register unsigned long rmv asm("r3") = regs->uregs[rm]; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 303 regs->uregs[rdlo] = rdlov; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 304 regs->uregs[rdhi] = rdhiv; t32_emulate_rdlo12rdhi8rn16rm0_noflags() 310 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_bxblx() 312 unsigned long pc = regs->ARM_pc + 2; t16_simulate_bxblx() 314 unsigned long rmv = (rm == 15) ? pc : regs->uregs[rm]; t16_simulate_bxblx() 317 regs->ARM_lr = regs->ARM_pc | 1; t16_simulate_bxblx() 319 bx_write_pc(rmv, regs); t16_simulate_bxblx() 324 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_ldr_literal() 326 unsigned long *base = (unsigned long *)((regs->ARM_pc + 2) & ~3); t16_simulate_ldr_literal() 329 regs->uregs[rt] = base[index]; t16_simulate_ldr_literal() 334 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_ldrstr_sp_relative() 336 unsigned long* base = (unsigned long *)regs->ARM_sp; t16_simulate_ldrstr_sp_relative() 340 regs->uregs[rt] = base[index]; t16_simulate_ldrstr_sp_relative() 342 base[index] = regs->uregs[rt]; t16_simulate_ldrstr_sp_relative() 347 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_reladr() 349 unsigned long base = (insn & 0x800) ? regs->ARM_sp t16_simulate_reladr() 350 : ((regs->ARM_pc + 2) & ~3); t16_simulate_reladr() 353 regs->uregs[rt] = base + offset * 4; t16_simulate_reladr() 358 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_add_sp_imm() 362 regs->ARM_sp -= imm * 4; t16_simulate_add_sp_imm() 364 regs->ARM_sp += imm * 4; t16_simulate_add_sp_imm() 369 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_cbz() 372 probes_opcode_t nonzero = regs->uregs[rn] ? insn : ~insn; t16_simulate_cbz() 376 unsigned long pc = regs->ARM_pc + 2; t16_simulate_cbz() 377 regs->ARM_pc = pc + (i >> 3) + (imm5 >> 2); t16_simulate_cbz() 383 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_it() 391 unsigned long cpsr = regs->ARM_cpsr; t16_simulate_it() 395 regs->ARM_cpsr = cpsr; t16_simulate_it() 400 struct arch_probes_insn *asi, struct pt_regs *regs) t16_singlestep_it() 402 regs->ARM_pc += 2; t16_singlestep_it() 403 t16_simulate_it(insn, asi, regs); t16_singlestep_it() 416 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_cond_branch() 418 unsigned long pc = regs->ARM_pc + 2; t16_simulate_cond_branch() 421 regs->ARM_pc = pc + (offset * 2); t16_simulate_cond_branch() 436 struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_branch() 438 unsigned long pc = regs->ARM_pc + 2; t16_simulate_branch() 441 regs->ARM_pc = pc + (offset * 2); t16_simulate_branch() 446 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs() 448 unsigned long oldcpsr = regs->ARM_cpsr; t16_emulate_loregs() 453 "ldmia %[regs], {r0-r7} \n\t" t16_emulate_loregs() 455 "stmia %[regs], {r0-r7} \n\t" t16_emulate_loregs() 458 : [oldcpsr] "r" (oldcpsr), [regs] "r" (regs), t16_emulate_loregs() 469 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs_rwflags() 471 regs->ARM_cpsr = t16_emulate_loregs(insn, asi, regs); t16_emulate_loregs_rwflags() 476 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs_noitrwflags() 478 unsigned long cpsr = t16_emulate_loregs(insn, asi, regs); t16_emulate_loregs_noitrwflags() 480 regs->ARM_cpsr = cpsr; t16_emulate_loregs_noitrwflags() 485 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_hiregs() 487 unsigned long pc = regs->ARM_pc + 2; t16_emulate_hiregs() 493 unsigned long cpsr = regs->ARM_cpsr; t16_emulate_hiregs() 495 rdnv = (rdn == 15) ? pc : regs->uregs[rdn]; t16_emulate_hiregs() 496 rmv = (rm == 15) ? pc : regs->uregs[rm]; t16_emulate_hiregs() 510 regs->uregs[rdn] = rdnv; t16_emulate_hiregs() 511 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); t16_emulate_hiregs() 527 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_push() 530 "ldr r9, [%[regs], #13*4] \n\t" t16_emulate_push() 531 "ldr r8, [%[regs], #14*4] \n\t" t16_emulate_push() 532 "ldmia %[regs], {r0-r7} \n\t" t16_emulate_push() 534 "str r9, [%[regs], #13*4] \n\t" t16_emulate_push() 536 : [regs] "r" (regs), [fn] "r" (asi->insn_fn) t16_emulate_push() 561 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_pop_nopc() 564 "ldr r9, [%[regs], #13*4] \n\t" t16_emulate_pop_nopc() 565 "ldmia %[regs], {r0-r7} \n\t" t16_emulate_pop_nopc() 567 "stmia %[regs], {r0-r7} \n\t" t16_emulate_pop_nopc() 568 "str r9, [%[regs], #13*4] \n\t" t16_emulate_pop_nopc() 570 : [regs] "r" (regs), [fn] "r" (asi->insn_fn) t16_emulate_pop_nopc() 578 struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_pop_pc() 583 "ldr r9, [%[regs], #13*4] \n\t" t16_emulate_pop_pc() 584 "ldmia %[regs], {r0-r7} \n\t" t16_emulate_pop_pc() 586 "stmia %[regs], {r0-r7} \n\t" t16_emulate_pop_pc() 587 "str r9, [%[regs], #13*4] \n\t" t16_emulate_pop_pc() 589 : [regs] "r" (regs), [fn] "r" (asi->insn_fn) t16_emulate_pop_pc() 594 bx_write_pc(pc, regs); t16_emulate_pop_pc() 27 t32_simulate_table_branch(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_table_branch() argument 47 t32_simulate_mrs(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_mrs() argument 56 t32_simulate_cond_branch(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_cond_branch() argument 81 t32_simulate_branch(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_branch() argument 109 t32_simulate_ldr_literal(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_simulate_ldr_literal() argument 161 t32_emulate_ldrdstrd(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_ldrdstrd() argument 188 t32_emulate_ldrstr(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_ldrstr() argument 214 t32_emulate_rd8rn16rm0_rwflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8rn16rm0_rwflags() argument 241 t32_emulate_rd8pc16_noflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8pc16_noflags() argument 261 t32_emulate_rd8rn16_noflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rd8rn16_noflags() argument 281 t32_emulate_rdlo12rdhi8rn16rm0_noflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t32_emulate_rdlo12rdhi8rn16rm0_noflags() argument 309 t16_simulate_bxblx(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_bxblx() argument 323 t16_simulate_ldr_literal(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_ldr_literal() argument 333 t16_simulate_ldrstr_sp_relative(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_ldrstr_sp_relative() argument 346 t16_simulate_reladr(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_reladr() argument 357 t16_simulate_add_sp_imm(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_add_sp_imm() argument 368 t16_simulate_cbz(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_cbz() argument 382 t16_simulate_it(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_it() argument 399 t16_singlestep_it(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_singlestep_it() argument 415 t16_simulate_cond_branch(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_cond_branch() argument 435 t16_simulate_branch(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_simulate_branch() argument 445 t16_emulate_loregs(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs() argument 468 t16_emulate_loregs_rwflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs_rwflags() argument 475 t16_emulate_loregs_noitrwflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_loregs_noitrwflags() argument 484 t16_emulate_hiregs(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_hiregs() argument 526 t16_emulate_push(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_push() argument 560 t16_emulate_pop_nopc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_pop_nopc() argument 577 t16_emulate_pop_pc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) t16_emulate_pop_pc() argument
|
H A D | actions-arm.c | 78 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldrdstrd() 80 unsigned long pc = regs->ARM_pc + 4; emulate_ldrdstrd() 85 register unsigned long rtv asm("r0") = regs->uregs[rt]; emulate_ldrdstrd() 86 register unsigned long rt2v asm("r1") = regs->uregs[rt+1]; emulate_ldrdstrd() 88 : regs->uregs[rn]; emulate_ldrdstrd() 89 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_ldrdstrd() 99 regs->uregs[rt] = rtv; emulate_ldrdstrd() 100 regs->uregs[rt+1] = rt2v; emulate_ldrdstrd() 102 regs->uregs[rn] = rnv; emulate_ldrdstrd() 107 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldr() 109 unsigned long pc = regs->ARM_pc + 4; emulate_ldr() 116 : regs->uregs[rn]; emulate_ldr() 117 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_ldr() 127 load_write_pc(rtv, regs); emulate_ldr() 129 regs->uregs[rt] = rtv; emulate_ldr() 132 regs->uregs[rn] = rnv; emulate_ldr() 137 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_str() 139 unsigned long rtpc = regs->ARM_pc - 4 + str_pc_offset; emulate_str() 140 unsigned long rnpc = regs->ARM_pc + 4; emulate_str() 146 : regs->uregs[rt]; emulate_str() 148 : regs->uregs[rn]; emulate_str() 149 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_str() 159 regs->uregs[rn] = rnv; emulate_str() 164 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rn16rm0rs8_rwflags() 166 unsigned long pc = regs->ARM_pc + 4; emulate_rd12rn16rm0rs8_rwflags() 172 register unsigned long rdv asm("r0") = regs->uregs[rd]; emulate_rd12rn16rm0rs8_rwflags() 174 : regs->uregs[rn]; emulate_rd12rn16rm0rs8_rwflags() 176 : regs->uregs[rm]; emulate_rd12rn16rm0rs8_rwflags() 177 register unsigned long rsv asm("r1") = regs->uregs[rs]; emulate_rd12rn16rm0rs8_rwflags() 178 unsigned long cpsr = regs->ARM_cpsr; emulate_rd12rn16rm0rs8_rwflags() 191 alu_write_pc(rdv, regs); emulate_rd12rn16rm0rs8_rwflags() 193 regs->uregs[rd] = rdv; emulate_rd12rn16rm0rs8_rwflags() 194 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); emulate_rd12rn16rm0rs8_rwflags() 199 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rn16rm0_rwflags_nopc() 205 register unsigned long rdv asm("r0") = regs->uregs[rd]; emulate_rd12rn16rm0_rwflags_nopc() 206 register unsigned long rnv asm("r2") = regs->uregs[rn]; emulate_rd12rn16rm0_rwflags_nopc() 207 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_rd12rn16rm0_rwflags_nopc() 208 unsigned long cpsr = regs->ARM_cpsr; emulate_rd12rn16rm0_rwflags_nopc() 220 regs->uregs[rd] = rdv; emulate_rd12rn16rm0_rwflags_nopc() 221 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); emulate_rd12rn16rm0_rwflags_nopc() 227 struct pt_regs *regs) emulate_rd16rn12rm0rs8_rwflags_nopc() 234 register unsigned long rdv asm("r2") = regs->uregs[rd]; emulate_rd16rn12rm0rs8_rwflags_nopc() 235 register unsigned long rnv asm("r0") = regs->uregs[rn]; emulate_rd16rn12rm0rs8_rwflags_nopc() 236 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_rd16rn12rm0rs8_rwflags_nopc() 237 register unsigned long rsv asm("r1") = regs->uregs[rs]; emulate_rd16rn12rm0rs8_rwflags_nopc() 238 unsigned long cpsr = regs->ARM_cpsr; emulate_rd16rn12rm0rs8_rwflags_nopc() 250 regs->uregs[rd] = rdv; emulate_rd16rn12rm0rs8_rwflags_nopc() 251 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); emulate_rd16rn12rm0rs8_rwflags_nopc() 256 struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rm0_noflags_nopc() 261 register unsigned long rdv asm("r0") = regs->uregs[rd]; emulate_rd12rm0_noflags_nopc() 262 register unsigned long rmv asm("r3") = regs->uregs[rm]; emulate_rd12rm0_noflags_nopc() 271 regs->uregs[rd] = rdv; emulate_rd12rm0_noflags_nopc() 277 struct pt_regs *regs) emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 284 register unsigned long rdlov asm("r0") = regs->uregs[rdlo]; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 285 register unsigned long rdhiv asm("r2") = regs->uregs[rdhi]; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 286 register unsigned long rnv asm("r3") = regs->uregs[rn]; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 287 register unsigned long rmv asm("r1") = regs->uregs[rm]; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 288 unsigned long cpsr = regs->ARM_cpsr; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 300 regs->uregs[rdlo] = rdlov; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 301 regs->uregs[rdhi] = rdhiv; emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 302 regs->ARM_cpsr = (regs->ARM_cpsr & ~APSR_MASK) | (cpsr & APSR_MASK); emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() 77 emulate_ldrdstrd(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldrdstrd() argument 106 emulate_ldr(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_ldr() argument 136 emulate_str(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_str() argument 163 emulate_rd12rn16rm0rs8_rwflags(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rn16rm0rs8_rwflags() argument 198 emulate_rd12rn16rm0_rwflags_nopc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rn16rm0_rwflags_nopc() argument 225 emulate_rd16rn12rm0rs8_rwflags_nopc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd16rn12rm0rs8_rwflags_nopc() argument 255 emulate_rd12rm0_noflags_nopc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rd12rm0_noflags_nopc() argument 275 emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(probes_opcode_t insn, struct arch_probes_insn *asi, struct pt_regs *regs) emulate_rdlo12rdhi16rn0rm8_rwflags_nopc() argument
|
/linux-4.1.27/arch/s390/include/asm/ |
H A D | syscall.h | 29 struct pt_regs *regs) syscall_get_nr() 31 return test_pt_regs_flag(regs, PIF_SYSCALL) ? syscall_get_nr() 32 (regs->int_code & 0xffff) : -1; syscall_get_nr() 36 struct pt_regs *regs) syscall_rollback() 38 regs->gprs[2] = regs->orig_gpr2; syscall_rollback() 42 struct pt_regs *regs) syscall_get_error() 44 return IS_ERR_VALUE(regs->gprs[2]) ? regs->gprs[2] : 0; syscall_get_error() 48 struct pt_regs *regs) syscall_get_return_value() 50 return regs->gprs[2]; syscall_get_return_value() 54 struct pt_regs *regs, syscall_set_return_value() 57 regs->gprs[2] = error ? error : val; syscall_set_return_value() 61 struct pt_regs *regs, syscall_get_arguments() 74 args[n] = regs->gprs[2 + i + n] & mask; syscall_get_arguments() 76 args[0] = regs->orig_gpr2 & mask; syscall_get_arguments() 80 struct pt_regs *regs, syscall_set_arguments() 87 regs->gprs[2 + i + n] = args[n]; syscall_set_arguments() 89 regs->orig_gpr2 = args[0]; syscall_set_arguments() 28 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 35 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 41 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 47 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 53 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 60 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 79 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/alpha/kernel/ |
H A D | signal.c | 147 restore_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) restore_sigcontext() argument 150 struct switch_stack *sw = (struct switch_stack *)regs - 1; restore_sigcontext() 151 long i, err = __get_user(regs->pc, &sc->sc_pc); restore_sigcontext() 157 err |= __get_user(regs->r0, sc->sc_regs+0); restore_sigcontext() 158 err |= __get_user(regs->r1, sc->sc_regs+1); restore_sigcontext() 159 err |= __get_user(regs->r2, sc->sc_regs+2); restore_sigcontext() 160 err |= __get_user(regs->r3, sc->sc_regs+3); restore_sigcontext() 161 err |= __get_user(regs->r4, sc->sc_regs+4); restore_sigcontext() 162 err |= __get_user(regs->r5, sc->sc_regs+5); restore_sigcontext() 163 err |= __get_user(regs->r6, sc->sc_regs+6); restore_sigcontext() 164 err |= __get_user(regs->r7, sc->sc_regs+7); restore_sigcontext() 165 err |= __get_user(regs->r8, sc->sc_regs+8); restore_sigcontext() 173 err |= __get_user(regs->r16, sc->sc_regs+16); restore_sigcontext() 174 err |= __get_user(regs->r17, sc->sc_regs+17); restore_sigcontext() 175 err |= __get_user(regs->r18, sc->sc_regs+18); restore_sigcontext() 176 err |= __get_user(regs->r19, sc->sc_regs+19); restore_sigcontext() 177 err |= __get_user(regs->r20, sc->sc_regs+20); restore_sigcontext() 178 err |= __get_user(regs->r21, sc->sc_regs+21); restore_sigcontext() 179 err |= __get_user(regs->r22, sc->sc_regs+22); restore_sigcontext() 180 err |= __get_user(regs->r23, sc->sc_regs+23); restore_sigcontext() 181 err |= __get_user(regs->r24, sc->sc_regs+24); restore_sigcontext() 182 err |= __get_user(regs->r25, sc->sc_regs+25); restore_sigcontext() 183 err |= __get_user(regs->r26, sc->sc_regs+26); restore_sigcontext() 184 err |= __get_user(regs->r27, sc->sc_regs+27); restore_sigcontext() 185 err |= __get_user(regs->r28, sc->sc_regs+28); restore_sigcontext() 186 err |= __get_user(regs->gp, sc->sc_regs+29); restore_sigcontext() 204 struct pt_regs *regs = current_pt_regs(); do_sigreturn() local 215 if (restore_sigcontext(sc, regs)) do_sigreturn() 225 info.si_addr = (void __user *) regs->pc; do_sigreturn() 238 struct pt_regs *regs = current_pt_regs(); do_rt_sigreturn() local 249 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) do_rt_sigreturn() 259 info.si_addr = (void __user *) regs->pc; do_rt_sigreturn() 281 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, setup_sigcontext() argument 284 struct switch_stack *sw = (struct switch_stack *)regs - 1; setup_sigcontext() 289 err |= __put_user(regs->pc, &sc->sc_pc); setup_sigcontext() 292 err |= __put_user(regs->r0 , sc->sc_regs+0); setup_sigcontext() 293 err |= __put_user(regs->r1 , sc->sc_regs+1); setup_sigcontext() 294 err |= __put_user(regs->r2 , sc->sc_regs+2); setup_sigcontext() 295 err |= __put_user(regs->r3 , sc->sc_regs+3); setup_sigcontext() 296 err |= __put_user(regs->r4 , sc->sc_regs+4); setup_sigcontext() 297 err |= __put_user(regs->r5 , sc->sc_regs+5); setup_sigcontext() 298 err |= __put_user(regs->r6 , sc->sc_regs+6); setup_sigcontext() 299 err |= __put_user(regs->r7 , sc->sc_regs+7); setup_sigcontext() 300 err |= __put_user(regs->r8 , sc->sc_regs+8); setup_sigcontext() 308 err |= __put_user(regs->r16, sc->sc_regs+16); setup_sigcontext() 309 err |= __put_user(regs->r17, sc->sc_regs+17); setup_sigcontext() 310 err |= __put_user(regs->r18, sc->sc_regs+18); setup_sigcontext() 311 err |= __put_user(regs->r19, sc->sc_regs+19); setup_sigcontext() 312 err |= __put_user(regs->r20, sc->sc_regs+20); setup_sigcontext() 313 err |= __put_user(regs->r21, sc->sc_regs+21); setup_sigcontext() 314 err |= __put_user(regs->r22, sc->sc_regs+22); setup_sigcontext() 315 err |= __put_user(regs->r23, sc->sc_regs+23); setup_sigcontext() 316 err |= __put_user(regs->r24, sc->sc_regs+24); setup_sigcontext() 317 err |= __put_user(regs->r25, sc->sc_regs+25); setup_sigcontext() 318 err |= __put_user(regs->r26, sc->sc_regs+26); setup_sigcontext() 319 err |= __put_user(regs->r27, sc->sc_regs+27); setup_sigcontext() 320 err |= __put_user(regs->r28, sc->sc_regs+28); setup_sigcontext() 321 err |= __put_user(regs->gp , sc->sc_regs+29); setup_sigcontext() 330 err |= __put_user(regs->trap_a0, &sc->sc_traparg_a0); setup_sigcontext() 331 err |= __put_user(regs->trap_a1, &sc->sc_traparg_a1); setup_sigcontext() 332 err |= __put_user(regs->trap_a2, &sc->sc_traparg_a2); setup_sigcontext() 338 setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_frame() argument 348 err |= setup_sigcontext(&frame->sc, regs, set->sig[0], oldsp); setup_frame() 368 regs->r26 = r26; setup_frame() 369 regs->r27 = regs->pc = (unsigned long) ksig->ka.sa.sa_handler; setup_frame() 370 regs->r16 = ksig->sig; /* a0: signal number */ setup_frame() 371 regs->r17 = 0; /* a1: exception code */ setup_frame() 372 regs->r18 = (unsigned long) &frame->sc; /* a2: sigcontext pointer */ setup_frame() 377 current->comm, current->pid, frame, regs->pc, regs->r26); setup_frame() 383 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument 400 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, setup_rt_frame() 422 regs->r26 = r26; setup_rt_frame() 423 regs->r27 = regs->pc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 424 regs->r16 = ksig->sig; /* a0: signal number */ setup_rt_frame() 425 regs->r17 = (unsigned long) &frame->info; /* a1: siginfo pointer */ setup_rt_frame() 426 regs->r18 = (unsigned long) &frame->uc; /* a2: ucontext pointer */ setup_rt_frame() 431 current->comm, current->pid, frame, regs->pc, regs->r26); setup_rt_frame() 442 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 448 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 450 ret = setup_frame(ksig, oldset, regs); handle_signal() 457 struct pt_regs *regs, struct k_sigaction *ka) syscall_restart() 459 switch (regs->r0) { syscall_restart() 463 regs->r0 = EINTR; syscall_restart() 468 regs->r0 = r0; /* reset v0 and a3 and replay syscall */ syscall_restart() 469 regs->r19 = r19; syscall_restart() 470 regs->pc -= 4; syscall_restart() 473 regs->r0 = EINTR; syscall_restart() 493 do_signal(struct pt_regs *regs, unsigned long r0, unsigned long r19) do_signal() argument 504 syscall_restart(r0, r19, regs, &ksig.ka); do_signal() 505 handle_signal(&ksig, regs); do_signal() 509 switch (regs->r0) { do_signal() 514 regs->r0 = r0; do_signal() 515 regs->r19 = r19; do_signal() 516 regs->pc -= 4; do_signal() 520 regs->r0 = __NR_restart_syscall; do_signal() 521 regs->pc -= 4; do_signal() 532 do_work_pending(struct pt_regs *regs, unsigned long thread_flags, do_work_pending() argument 541 do_signal(regs, r0, r19); do_work_pending() 545 tracehook_notify_resume(regs); do_work_pending() 456 syscall_restart(unsigned long r0, unsigned long r19, struct pt_regs *regs, struct k_sigaction *ka) syscall_restart() argument
|
/linux-4.1.27/arch/x86/um/os-Linux/ |
H A D | mcontext.c | 6 void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc) get_regs_from_mc() argument 9 #define COPY2(X,Y) regs->gp[X] = mc->gregs[REG_##Y] get_regs_from_mc() 10 #define COPY(X) regs->gp[X] = mc->gregs[REG_##X] get_regs_from_mc() 11 #define COPY_SEG(X) regs->gp[X] = mc->gregs[REG_##X] & 0xffff; get_regs_from_mc() 12 #define COPY_SEG_CPL3(X) regs->gp[X] = (mc->gregs[REG_##X] & 0xffff) | 3; get_regs_from_mc() 19 #define COPY2(X,Y) regs->gp[X/sizeof(unsigned long)] = mc->gregs[REG_##Y] get_regs_from_mc() 20 #define COPY(X) regs->gp[X/sizeof(unsigned long)] = mc->gregs[REG_##X] get_regs_from_mc() 28 regs->gp[CS / sizeof(unsigned long)] &= 0xffff; get_regs_from_mc() 29 regs->gp[CS / sizeof(unsigned long)] |= 3; get_regs_from_mc()
|
/linux-4.1.27/arch/metag/include/asm/ |
H A D | ptrace.h | 18 #define user_mode(regs) (((regs)->ctx.SaveMask & TBICTX_PRIV_BIT) > 0) 20 #define instruction_pointer(regs) ((unsigned long)(regs)->ctx.CurrPC) 21 #define profile_pc(regs) instruction_pointer(regs) 31 int syscall_trace_enter(struct pt_regs *regs); 32 void syscall_trace_leave(struct pt_regs *regs); 35 int metag_gp_regs_copyout(const struct pt_regs *regs, 39 int metag_gp_regs_copyin(struct pt_regs *regs, 43 int metag_cb_regs_copyout(const struct pt_regs *regs, 47 int metag_cb_regs_copyin(struct pt_regs *regs, 51 int metag_rp_state_copyout(const struct pt_regs *regs, 55 int metag_rp_state_copyin(struct pt_regs *regs,
|
H A D | syscall.h | 23 struct pt_regs *regs) syscall_get_nr() 32 if (get_user(insn, (unsigned long *)(regs->ctx.CurrPC - 4))) syscall_get_nr() 36 return regs->ctx.DX[0].U1; syscall_get_nr() 42 struct pt_regs *regs) syscall_rollback() 48 struct pt_regs *regs) syscall_get_error() 50 unsigned long error = regs->ctx.DX[0].U0; syscall_get_error() 55 struct pt_regs *regs) syscall_get_return_value() 57 return regs->ctx.DX[0].U0; syscall_get_return_value() 61 struct pt_regs *regs, syscall_set_return_value() 64 regs->ctx.DX[0].U0 = (long) error ?: val; syscall_set_return_value() 68 struct pt_regs *regs, syscall_get_arguments() 77 args[j] = regs->ctx.DX[(reg + 1) / 2].U0; syscall_get_arguments() 79 args[j] = regs->ctx.DX[reg / 2].U1; syscall_get_arguments() 84 struct pt_regs *regs, syscall_set_arguments() 93 regs->ctx.DX[(reg + 1) / 2].U0 = args[i]; syscall_set_arguments() 95 regs->ctx.DX[reg / 2].U1 = args[i]; syscall_set_arguments() 22 syscall_get_nr(struct task_struct *task, struct pt_regs *regs) syscall_get_nr() argument 41 syscall_rollback(struct task_struct *task, struct pt_regs *regs) syscall_rollback() argument 47 syscall_get_error(struct task_struct *task, struct pt_regs *regs) syscall_get_error() argument 54 syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) syscall_get_return_value() argument 60 syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) syscall_set_return_value() argument 67 syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, unsigned long *args) syscall_get_arguments() argument 83 syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, unsigned int i, unsigned int n, const unsigned long *args) syscall_set_arguments() argument
|
/linux-4.1.27/arch/tile/kernel/ |
H A D | signal.c | 45 int restore_sigcontext(struct pt_regs *regs, restore_sigcontext() argument 59 err = __copy_from_user(regs, sc, sizeof(*regs)); restore_sigcontext() 62 regs->ex1 = PL_ICS_EX1(USER_PL, EX1_ICS(regs->ex1)); restore_sigcontext() 64 regs->faultnum = INT_SWINT_1_SIGRETURN; restore_sigcontext() 69 void signal_fault(const char *type, struct pt_regs *regs, signal_fault() argument 72 trace_unhandled_signal(type, regs, (unsigned long)frame, SIGSEGV); signal_fault() 79 struct pt_regs *regs = current_pt_regs(); SYSCALL_DEFINE0() local 81 (struct rt_sigframe __user *)(regs->sp); SYSCALL_DEFINE0() 91 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) SYSCALL_DEFINE0() 100 signal_fault("bad sigreturn frame", regs, frame, 0); SYSCALL_DEFINE0() 108 int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) setup_sigcontext() argument 110 return __copy_to_user(sc, regs, sizeof(*regs)); setup_sigcontext() 117 struct pt_regs *regs, get_sigframe() 123 sp = regs->sp; get_sigframe() 149 struct pt_regs *regs) setup_rt_frame() 155 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame)); setup_rt_frame() 164 regs->flags |= PT_FLAGS_RESTORE_REGS; setup_rt_frame() 173 err |= __save_altstack(&frame->uc.uc_stack, regs->sp); setup_rt_frame() 174 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs); setup_rt_frame() 190 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 191 regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ setup_rt_frame() 192 regs->sp = (unsigned long) frame; setup_rt_frame() 193 regs->lr = restorer; setup_rt_frame() 194 regs->regs[0] = (unsigned long) sig; setup_rt_frame() 195 regs->regs[1] = (unsigned long) &frame->info; setup_rt_frame() 196 regs->regs[2] = (unsigned long) &frame->uc; setup_rt_frame() 197 regs->flags |= PT_FLAGS_CALLER_SAVES; setup_rt_frame() 201 trace_unhandled_signal("bad sigreturn frame", regs, setup_rt_frame() 210 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 216 if (regs->faultnum == INT_SWINT_1) { handle_signal() 218 switch (regs->regs[0]) { handle_signal() 221 regs->regs[0] = -EINTR; handle_signal() 226 regs->regs[0] = -EINTR; handle_signal() 232 regs->flags |= PT_FLAGS_CALLER_SAVES; handle_signal() 233 regs->regs[0] = regs->orig_r0; handle_signal() 234 regs->pc -= 8; handle_signal() 241 ret = compat_setup_rt_frame(ksig, oldset, regs); handle_signal() 244 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 254 void do_signal(struct pt_regs *regs) do_signal() argument 262 * helpful, we can reinstate the check on "!user_mode(regs)". do_signal() 267 handle_signal(&ksig, regs); do_signal() 272 if (regs->faultnum == INT_SWINT_1) { do_signal() 274 switch (regs->regs[0]) { do_signal() 278 regs->flags |= PT_FLAGS_CALLER_SAVES; do_signal() 279 regs->regs[0] = regs->orig_r0; do_signal() 280 regs->pc -= 8; do_signal() 284 regs->flags |= PT_FLAGS_CALLER_SAVES; do_signal() 285 regs->regs[TREG_SYSCALL_NR] = __NR_restart_syscall; do_signal() 286 regs->pc -= 8; do_signal() 296 regs->faultnum = INT_SWINT_1_SIGRETURN; do_signal() 364 void trace_unhandled_signal(const char *type, struct pt_regs *regs, trace_unhandled_signal() argument 386 tsk->comm, task_pid_nr(tsk), type, address, regs->pc, sig); trace_unhandled_signal() 388 print_vma_addr(KERN_CONT " in ", regs->pc); trace_unhandled_signal() 399 sig, regs->faultnum, address); trace_unhandled_signal() 400 show_regs(regs); trace_unhandled_signal() 405 sig, regs->faultnum); trace_unhandled_signal() 116 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) get_sigframe() argument 148 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
H A D | kgdb.c | 29 { "r0", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[0])}, 30 { "r1", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[1])}, 31 { "r2", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[2])}, 32 { "r3", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[3])}, 33 { "r4", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[4])}, 34 { "r5", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[5])}, 35 { "r6", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[6])}, 36 { "r7", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[7])}, 37 { "r8", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[8])}, 38 { "r9", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[9])}, 39 { "r10", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[10])}, 40 { "r11", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[11])}, 41 { "r12", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[12])}, 42 { "r13", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[13])}, 43 { "r14", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[14])}, 44 { "r15", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[15])}, 45 { "r16", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[16])}, 46 { "r17", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[17])}, 47 { "r18", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[18])}, 48 { "r19", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[19])}, 49 { "r20", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[20])}, 50 { "r21", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[21])}, 51 { "r22", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[22])}, 52 { "r23", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[23])}, 53 { "r24", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[24])}, 54 { "r25", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[25])}, 55 { "r26", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[26])}, 56 { "r27", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[27])}, 57 { "r28", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[28])}, 58 { "r29", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[29])}, 59 { "r30", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[30])}, 60 { "r31", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[31])}, 61 { "r32", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[32])}, 62 { "r33", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[33])}, 63 { "r34", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[34])}, 64 { "r35", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[35])}, 65 { "r36", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[36])}, 66 { "r37", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[37])}, 67 { "r38", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[38])}, 68 { "r39", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[39])}, 69 { "r40", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[40])}, 70 { "r41", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[41])}, 71 { "r42", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[42])}, 72 { "r43", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[43])}, 73 { "r44", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[44])}, 74 { "r45", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[45])}, 75 { "r46", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[46])}, 76 { "r47", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[47])}, 77 { "r48", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[48])}, 78 { "r49", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[49])}, 79 { "r50", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[50])}, 80 { "r51", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[51])}, 81 { "r52", GDB_SIZEOF_REG, offsetof(struct pt_regs, regs[52])}, 97 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) dbg_get_reg() argument 103 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, dbg_get_reg() 110 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) dbg_set_reg() argument 116 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, dbg_set_reg() 142 void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) kgdb_arch_set_pc() argument 144 regs->pc = pc; kgdb_arch_set_pc() 179 static unsigned long get_step_address(struct pt_regs *regs) get_step_address() argument 189 addr = regs->pc + TILEGX_BUNDLE_SIZE_IN_BYTES; get_step_address() 190 bundle = *(unsigned long *)instruction_pointer(regs); get_step_address() 205 dbg_get_reg(src_reg, &addr, regs); get_step_address() 220 dbg_get_reg(src_reg, &addr, regs); get_step_address() 231 addr = regs->pc + get_step_address() 284 addr = regs->pc + get_step_address() 296 static void do_single_step(struct pt_regs *regs) do_single_step() argument 301 stepped_addr = get_step_address(regs); do_single_step() 312 static void undo_single_step(struct pt_regs *regs) undo_single_step() argument 337 struct pt_regs *regs = args->regs; kgdb_notify() local 354 kgdb_handle_exception(0, SIGTRAP, 0, regs); kgdb_notify() 359 if (user_mode(regs)) kgdb_notify() 364 ret = kgdb_handle_exception(args->trapnr, args->signr, args->err, regs); kgdb_notify() 383 * @regs: The &struct pt_regs of the current process. 394 struct pt_regs *regs) kgdb_arch_handle_exception() 400 undo_single_step(regs); kgdb_arch_handle_exception() 415 regs->pc = address; kgdb_arch_handle_exception() 416 else if (*(unsigned long *)regs->pc == compiled_bpt) kgdb_arch_handle_exception() 417 regs->pc += BREAK_INSTR_SIZE; kgdb_arch_handle_exception() 420 do_single_step(regs); kgdb_arch_handle_exception() 392 kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *regs) kgdb_arch_handle_exception() argument
|
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb/ |
H A D | tp.c | 3 #include "regs.h" 31 writel(val, ap->regs + A_TP_IN_CONFIG); tp_init() 35 F_TP_OUT_ESPI_GENERATE_TCP_CSUM, ap->regs + A_TP_OUT_CONFIG); tp_init() 39 V_SYN_COOKIE_PARAMETER(29), ap->regs + A_TP_GLOBAL_CONFIG); tp_init() 49 ap->regs + A_TP_TX_DROP_CONFIG); tp_init() 72 u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_enable() 78 tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); t1_tp_intr_enable() 80 tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_enable() 85 writel(0, tp->adapter->regs + A_TP_INT_ENABLE); t1_tp_intr_enable() 87 tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_enable() 93 u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_disable() 98 writel(0, tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); t1_tp_intr_disable() 100 tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_disable() 104 writel(0, tp->adapter->regs + A_TP_INT_ENABLE); t1_tp_intr_disable() 106 tp->adapter->regs + A_PL_ENABLE); t1_tp_intr_disable() 115 tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_CAUSE); t1_tp_intr_clear() 116 writel(FPGA_PCIX_INTERRUPT_TP, tp->adapter->regs + A_PL_CAUSE); t1_tp_intr_clear() 120 writel(0xffffffff, tp->adapter->regs + A_TP_INT_CAUSE); t1_tp_intr_clear() 121 writel(F_PL_INTR_TP, tp->adapter->regs + A_PL_CAUSE); t1_tp_intr_clear() 134 cause = readl(tp->adapter->regs + A_TP_INT_CAUSE); t1_tp_intr_handler() 135 writel(cause, tp->adapter->regs + A_TP_INT_CAUSE); t1_tp_intr_handler() 141 u32 val = readl(tp->adapter->regs + A_TP_GLOBAL_CONFIG); set_csum_offload() 147 writel(val, tp->adapter->regs + A_TP_GLOBAL_CONFIG); set_csum_offload() 169 writel(F_TP_RESET, adapter->regs + A_TP_RESET); t1_tp_reset()
|
H A D | espi.c | 40 #include "regs.h" 70 adapter->regs + A_ESPI_CMD_ADDR); tricn_write() 71 writel(0, adapter->regs + A_ESPI_GOSTAT); tricn_write() 74 busy = readl(adapter->regs + A_ESPI_GOSTAT) & F_ESPI_CMD_BUSY; tricn_write() 87 if (!(readl(adapter->regs + A_ESPI_RX_RESET) & F_RX_CLK_STATUS)) { tricn_init() 92 writel(F_ESPI_RX_CORE_RST, adapter->regs + A_ESPI_RX_RESET); tricn_init() 112 adapter->regs + A_ESPI_RX_RESET); tricn_init() 119 u32 enable, pl_intr = readl(espi->adapter->regs + A_PL_ENABLE); t1_espi_intr_enable() 129 writel(enable, espi->adapter->regs + A_ESPI_INTR_ENABLE); t1_espi_intr_enable() 130 writel(pl_intr | F_PL_INTR_ESPI, espi->adapter->regs + A_PL_ENABLE); t1_espi_intr_enable() 135 readl(espi->adapter->regs + A_ESPI_DIP2_ERR_COUNT); t1_espi_intr_clear() 136 writel(0xffffffff, espi->adapter->regs + A_ESPI_INTR_STATUS); t1_espi_intr_clear() 137 writel(F_PL_INTR_ESPI, espi->adapter->regs + A_PL_CAUSE); t1_espi_intr_clear() 142 u32 pl_intr = readl(espi->adapter->regs + A_PL_ENABLE); t1_espi_intr_disable() 144 writel(0, espi->adapter->regs + A_ESPI_INTR_ENABLE); t1_espi_intr_disable() 145 writel(pl_intr & ~F_PL_INTR_ESPI, espi->adapter->regs + A_PL_ENABLE); t1_espi_intr_disable() 150 u32 status = readl(espi->adapter->regs + A_ESPI_INTR_STATUS); t1_espi_intr_handler() 169 readl(espi->adapter->regs + A_ESPI_DIP2_ERR_COUNT); t1_espi_intr_handler() 178 writel(status, espi->adapter->regs + A_ESPI_INTR_STATUS); t1_espi_intr_handler() 191 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN0); espi_setup_for_pm3393() 192 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN1); espi_setup_for_pm3393() 193 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN2); espi_setup_for_pm3393() 194 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN3); espi_setup_for_pm3393() 195 writel(0x100, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK); espi_setup_for_pm3393() 196 writel(wmark, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK); espi_setup_for_pm3393() 197 writel(3, adapter->regs + A_ESPI_CALENDAR_LENGTH); espi_setup_for_pm3393() 198 writel(0x08000008, adapter->regs + A_ESPI_TRAIN); espi_setup_for_pm3393() 199 writel(V_RX_NPORTS(1) | V_TX_NPORTS(1), adapter->regs + A_PORT_CONFIG); espi_setup_for_pm3393() 204 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN0); espi_setup_for_vsc7321() 205 writel(0x1f401f4, adapter->regs + A_ESPI_SCH_TOKEN1); espi_setup_for_vsc7321() 206 writel(0x1f4, adapter->regs + A_ESPI_SCH_TOKEN2); espi_setup_for_vsc7321() 207 writel(0xa00, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK); espi_setup_for_vsc7321() 208 writel(0x1ff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK); espi_setup_for_vsc7321() 209 writel(1, adapter->regs + A_ESPI_CALENDAR_LENGTH); espi_setup_for_vsc7321() 210 writel(V_RX_NPORTS(4) | V_TX_NPORTS(4), adapter->regs + A_PORT_CONFIG); espi_setup_for_vsc7321() 212 writel(0x08000008, adapter->regs + A_ESPI_TRAIN); espi_setup_for_vsc7321() 220 writel(1, adapter->regs + A_ESPI_CALENDAR_LENGTH); espi_setup_for_ixf1010() 223 writel(0xf00, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK); espi_setup_for_ixf1010() 224 writel(0x3c0, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK); espi_setup_for_ixf1010() 226 writel(0x7ff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK); espi_setup_for_ixf1010() 227 writel(0x1ff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK); espi_setup_for_ixf1010() 230 writel(0x1fff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK); espi_setup_for_ixf1010() 231 writel(0x7ff, adapter->regs + A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK); espi_setup_for_ixf1010() 233 writel(V_RX_NPORTS(nports) | V_TX_NPORTS(nports), adapter->regs + A_PORT_CONFIG); espi_setup_for_ixf1010() 243 writel(0, adapter->regs + A_ESPI_TRAIN); t1_espi_init() 248 V_DIP4_THRES(1), adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_init() 250 adapter->regs + A_ESPI_MAXBURST1_MAXBURST2); t1_espi_init() 252 writel(0x800100, adapter->regs + A_ESPI_MAXBURST1_MAXBURST2); t1_espi_init() 265 adapter->regs + A_ESPI_FIFO_STATUS_ENABLE); t1_espi_init() 273 espi->misc_ctrl = readl(adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_init() 278 writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_init() 309 writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL); 331 adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_get_mon() 332 sel = readl(adapter->regs + A_ESPI_SCH_TOKEN3); t1_espi_get_mon() 333 writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_get_mon() 335 sel = readl(adapter->regs + A_ESPI_SCH_TOKEN3); t1_espi_get_mon() 359 writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_get_mon_t204() 364 adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_get_mon_t204() 366 *valp = readl(adapter->regs + A_ESPI_SCH_TOKEN3); t1_espi_get_mon_t204() 369 writel(espi->misc_ctrl, adapter->regs + A_ESPI_MISC_CONTROL); t1_espi_get_mon_t204()
|
/linux-4.1.27/include/linux/ |
H A D | perf_regs.h | 6 struct pt_regs *regs; member in struct:perf_regs 11 u64 perf_reg_value(struct pt_regs *regs, int idx); 15 struct pt_regs *regs, 18 static inline u64 perf_reg_value(struct pt_regs *regs, int idx) perf_reg_value() argument 34 struct pt_regs *regs, perf_get_regs_user() 37 regs_user->regs = task_pt_regs(current); perf_get_regs_user() 33 perf_get_regs_user(struct perf_regs *regs_user, struct pt_regs *regs, struct pt_regs *regs_user_copy) perf_get_regs_user() argument
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | signal.c | 47 get_user_ex(regs->x, &sc->x); \ 57 regs->seg = GET_SEG(seg); \ 61 regs->seg = GET_SEG(seg) | 3; \ 64 int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext() argument 76 set_user_gs(regs, GET_SEG(gs)); restore_sigcontext() 107 regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); restore_sigcontext() 108 regs->orig_ax = -1; /* disable syscall checks */ restore_sigcontext() 121 struct pt_regs *regs, unsigned long mask) setup_sigcontext() 128 put_user_ex(get_user_gs(regs), (unsigned int __user *)&sc->gs); setup_sigcontext() 129 put_user_ex(regs->fs, (unsigned int __user *)&sc->fs); setup_sigcontext() 130 put_user_ex(regs->es, (unsigned int __user *)&sc->es); setup_sigcontext() 131 put_user_ex(regs->ds, (unsigned int __user *)&sc->ds); setup_sigcontext() 134 put_user_ex(regs->di, &sc->di); setup_sigcontext() 135 put_user_ex(regs->si, &sc->si); setup_sigcontext() 136 put_user_ex(regs->bp, &sc->bp); setup_sigcontext() 137 put_user_ex(regs->sp, &sc->sp); setup_sigcontext() 138 put_user_ex(regs->bx, &sc->bx); setup_sigcontext() 139 put_user_ex(regs->dx, &sc->dx); setup_sigcontext() 140 put_user_ex(regs->cx, &sc->cx); setup_sigcontext() 141 put_user_ex(regs->ax, &sc->ax); setup_sigcontext() 143 put_user_ex(regs->r8, &sc->r8); setup_sigcontext() 144 put_user_ex(regs->r9, &sc->r9); setup_sigcontext() 145 put_user_ex(regs->r10, &sc->r10); setup_sigcontext() 146 put_user_ex(regs->r11, &sc->r11); setup_sigcontext() 147 put_user_ex(regs->r12, &sc->r12); setup_sigcontext() 148 put_user_ex(regs->r13, &sc->r13); setup_sigcontext() 149 put_user_ex(regs->r14, &sc->r14); setup_sigcontext() 150 put_user_ex(regs->r15, &sc->r15); setup_sigcontext() 155 put_user_ex(regs->ip, &sc->ip); setup_sigcontext() 157 put_user_ex(regs->cs, (unsigned int __user *)&sc->cs); setup_sigcontext() 158 put_user_ex(regs->flags, &sc->flags); setup_sigcontext() 159 put_user_ex(regs->sp, &sc->sp_at_signal); setup_sigcontext() 160 put_user_ex(regs->ss, (unsigned int __user *)&sc->ss); setup_sigcontext() 162 put_user_ex(regs->flags, &sc->flags); setup_sigcontext() 163 put_user_ex(regs->cs, &sc->cs); setup_sigcontext() 200 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size, get_sigframe() argument 205 unsigned long sp = regs->sp; get_sigframe() 219 (regs->ss & 0xffff) != __USER_DS && get_sigframe() 275 struct pt_regs *regs) __setup_frame() 282 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate); __setup_frame() 290 if (setup_sigcontext(&frame->sc, fpstate, regs, set->sig[0])) __setup_frame() 323 regs->sp = (unsigned long)frame; __setup_frame() 324 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; __setup_frame() 325 regs->ax = (unsigned long)sig; __setup_frame() 326 regs->dx = 0; __setup_frame() 327 regs->cx = 0; __setup_frame() 329 regs->ds = __USER_DS; __setup_frame() 330 regs->es = __USER_DS; __setup_frame() 331 regs->ss = __USER_DS; __setup_frame() 332 regs->cs = __USER_CS; __setup_frame() 338 sigset_t *set, struct pt_regs *regs) __setup_rt_frame() 345 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate); __setup_rt_frame() 361 save_altstack_ex(&frame->uc.uc_stack, regs->sp); __setup_rt_frame() 382 regs, set->sig[0]); __setup_rt_frame() 389 regs->sp = (unsigned long)frame; __setup_rt_frame() 390 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; __setup_rt_frame() 391 regs->ax = (unsigned long)sig; __setup_rt_frame() 392 regs->dx = (unsigned long)&frame->info; __setup_rt_frame() 393 regs->cx = (unsigned long)&frame->uc; __setup_rt_frame() 395 regs->ds = __USER_DS; __setup_rt_frame() 396 regs->es = __USER_DS; __setup_rt_frame() 397 regs->ss = __USER_DS; __setup_rt_frame() 398 regs->cs = __USER_CS; __setup_rt_frame() 404 sigset_t *set, struct pt_regs *regs) __setup_rt_frame() 410 frame = get_sigframe(&ksig->ka, regs, sizeof(struct rt_sigframe), &fp); __setup_rt_frame() 427 save_altstack_ex(&frame->uc.uc_stack, regs->sp); __setup_rt_frame() 440 err |= setup_sigcontext(&frame->uc.uc_mcontext, fp, regs, set->sig[0]); __setup_rt_frame() 447 regs->di = sig; __setup_rt_frame() 449 regs->ax = 0; __setup_rt_frame() 453 regs->si = (unsigned long)&frame->info; __setup_rt_frame() 454 regs->dx = (unsigned long)&frame->uc; __setup_rt_frame() 455 regs->ip = (unsigned long) ksig->ka.sa.sa_handler; __setup_rt_frame() 457 regs->sp = (unsigned long)frame; __setup_rt_frame() 461 regs->cs = __USER_CS; __setup_rt_frame() 469 struct pt_regs *regs) x32_setup_rt_frame() 477 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate); x32_setup_rt_frame() 494 compat_save_altstack_ex(&frame->uc.uc_stack, regs->sp); x32_setup_rt_frame() 508 regs, set->sig[0]); x32_setup_rt_frame() 515 regs->sp = (unsigned long) frame; x32_setup_rt_frame() 516 regs->ip = (unsigned long) ksig->ka.sa.sa_handler; x32_setup_rt_frame() 519 regs->di = ksig->sig; x32_setup_rt_frame() 520 regs->si = (unsigned long) &frame->info; x32_setup_rt_frame() 521 regs->dx = (unsigned long) &frame->uc; x32_setup_rt_frame() 526 regs->cs = __USER_CS; x32_setup_rt_frame() 527 regs->ss = __USER_DS; x32_setup_rt_frame() 539 struct pt_regs *regs = current_pt_regs(); sys_sigreturn() local 543 frame = (struct sigframe __user *)(regs->sp - 8); sys_sigreturn() 554 if (restore_sigcontext(regs, &frame->sc)) sys_sigreturn() 556 return regs->ax; sys_sigreturn() 559 signal_fault(regs, frame, "sigreturn"); sys_sigreturn() 567 struct pt_regs *regs = current_pt_regs(); sys_rt_sigreturn() local 571 frame = (struct rt_sigframe __user *)(regs->sp - sizeof(long)); sys_rt_sigreturn() 579 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) sys_rt_sigreturn() 585 return regs->ax; sys_rt_sigreturn() 588 signal_fault(regs, frame, "rt_sigreturn"); sys_rt_sigreturn() 593 setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) setup_rt_frame() argument 602 return ia32_setup_rt_frame(usig, ksig, cset, regs); setup_rt_frame() 604 return ia32_setup_frame(usig, ksig, cset, regs); setup_rt_frame() 606 return x32_setup_rt_frame(ksig, cset, regs); setup_rt_frame() 608 return __setup_rt_frame(ksig->sig, ksig, set, regs); setup_rt_frame() 613 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 618 if (syscall_get_nr(current, regs) >= 0) { handle_signal() 620 switch (syscall_get_error(current, regs)) { handle_signal() 623 regs->ax = -EINTR; handle_signal() 628 regs->ax = -EINTR; handle_signal() 633 regs->ax = regs->orig_ax; handle_signal() 634 regs->ip -= 2; handle_signal() 648 failed = (setup_rt_frame(ksig, regs) < 0); handle_signal() 660 regs->flags &= ~(X86_EFLAGS_DF|X86_EFLAGS_RF|X86_EFLAGS_TF); handle_signal() 670 static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs) get_nr_restart_syscall() argument 676 __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT); get_nr_restart_syscall() 685 static void do_signal(struct pt_regs *regs) do_signal() argument 691 handle_signal(&ksig, regs); do_signal() 696 if (syscall_get_nr(current, regs) >= 0) { do_signal() 698 switch (syscall_get_error(current, regs)) { do_signal() 702 regs->ax = regs->orig_ax; do_signal() 703 regs->ip -= 2; do_signal() 707 regs->ax = get_nr_restart_syscall(regs); do_signal() 708 regs->ip -= 2; do_signal() 725 do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) do_notify_resume() argument 730 uprobe_notify_resume(regs); do_notify_resume() 734 do_signal(regs); do_notify_resume() 738 tracehook_notify_resume(regs); do_notify_resume() 746 void signal_fault(struct pt_regs *regs, void __user *frame, char *where) signal_fault() argument 755 regs->ip, regs->sp, regs->orig_ax); signal_fault() 756 print_vma_addr(" in ", regs->ip); signal_fault() 766 struct pt_regs *regs = current_pt_regs(); sys32_x32_rt_sigreturn() local 770 frame = (struct rt_sigframe_x32 __user *)(regs->sp - 8); sys32_x32_rt_sigreturn() 779 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) sys32_x32_rt_sigreturn() 785 return regs->ax; sys32_x32_rt_sigreturn() 788 signal_fault(regs, frame, "x32 rt_sigreturn"); sys32_x32_rt_sigreturn() 120 setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, struct pt_regs *regs, unsigned long mask) setup_sigcontext() argument 274 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) __setup_frame() argument 337 __setup_rt_frame(int sig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) __setup_rt_frame() argument 403 __setup_rt_frame(int sig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) __setup_rt_frame() argument 467 x32_setup_rt_frame(struct ksignal *ksig, compat_sigset_t *set, struct pt_regs *regs) x32_setup_rt_frame() argument
|
/linux-4.1.27/drivers/video/fbdev/msm/ |
H A D | mdp_ppp.c | 92 static void rotate_dst_addr_x(struct mdp_blit_req *req, struct mdp_regs *regs) rotate_dst_addr_x() argument 94 regs->dst0 += (req->dst_rect.w - rotate_dst_addr_x() 95 min((uint32_t)16, req->dst_rect.w)) * regs->dst_bpp; rotate_dst_addr_x() 96 regs->dst1 += (req->dst_rect.w - rotate_dst_addr_x() 97 min((uint32_t)16, req->dst_rect.w)) * regs->dst_bpp; rotate_dst_addr_x() 100 static void rotate_dst_addr_y(struct mdp_blit_req *req, struct mdp_regs *regs) rotate_dst_addr_y() argument 102 regs->dst0 += (req->dst_rect.h - rotate_dst_addr_y() 104 regs->dst_ystride; rotate_dst_addr_y() 105 regs->dst1 += (req->dst_rect.h - rotate_dst_addr_y() 107 regs->dst_ystride; rotate_dst_addr_y() 111 struct mdp_regs *regs) blit_rotate() 116 regs->op |= PPP_OP_ROT_ON; blit_rotate() 119 rotate_dst_addr_x(req, regs); blit_rotate() 121 regs->op |= PPP_OP_ROT_90; blit_rotate() 123 regs->op |= PPP_OP_FLIP_UD; blit_rotate() 124 rotate_dst_addr_y(req, regs); blit_rotate() 127 regs->op |= PPP_OP_FLIP_LR; blit_rotate() 130 static void blit_convert(struct mdp_blit_req *req, struct mdp_regs *regs) blit_convert() argument 135 regs->op |= PPP_OP_CONVERT_RGB2YCBCR | PPP_OP_CONVERT_ON; blit_convert() 137 regs->op |= PPP_OP_CONVERT_YCBCR2RGB | PPP_OP_CONVERT_ON; blit_convert() 139 regs->op |= PPP_OP_CONVERT_MATRIX_SECONDARY; blit_convert() 169 static void blit_blend(struct mdp_blit_req *req, struct mdp_regs *regs) blit_blend() argument 179 regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON | blit_blend() 186 regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON | blit_blend() 194 regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON | blit_blend() 198 regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON | blit_blend() 203 regs->op |= bg_op_chroma[req->dst.format]; blit_blend() 336 static int get_edge_cond(struct mdp_blit_req *req, struct mdp_regs *regs) get_edge_cond() argument 350 regs->edge = 0; get_edge_cond() 360 if (regs->op & (PPP_OP_SCALE_Y_ON | PPP_OP_SCALE_X_ON)) { get_edge_cond() 424 regs->edge |= (chroma_repeat[IMG_LEFT] & 3) << MDP_LEFT_CHROMA; get_edge_cond() 425 regs->edge |= (chroma_repeat[IMG_RIGHT] & 3) << MDP_RIGHT_CHROMA; get_edge_cond() 426 regs->edge |= (chroma_repeat[IMG_TOP] & 3) << MDP_TOP_CHROMA; get_edge_cond() 427 regs->edge |= (chroma_repeat[IMG_BOTTOM] & 3) << MDP_BOTTOM_CHROMA; get_edge_cond() 428 regs->edge |= (luma_repeat[IMG_LEFT] & 3) << MDP_LEFT_LUMA; get_edge_cond() 429 regs->edge |= (luma_repeat[IMG_RIGHT] & 3) << MDP_RIGHT_LUMA; get_edge_cond() 430 regs->edge |= (luma_repeat[IMG_TOP] & 3) << MDP_TOP_LUMA; get_edge_cond() 431 regs->edge |= (luma_repeat[IMG_BOTTOM] & 3) << MDP_BOTTOM_LUMA; get_edge_cond() 436 struct mdp_regs *regs) blit_scale() 452 regs->phasex_init = 0; blit_scale() 453 regs->phasey_init = 0; blit_scale() 454 regs->phasex_step = 0; blit_scale() 455 regs->phasey_step = 0; blit_scale() 494 regs->phasex_init = phase_init_x; blit_scale() 495 regs->phasey_init = phase_init_y; blit_scale() 496 regs->phasex_step = phase_step_x; blit_scale() 497 regs->phasey_step = phase_step_y; blit_scale() 498 regs->op |= (PPP_OP_SCALE_Y_ON | PPP_OP_SCALE_X_ON); blit_scale() 504 struct mdp_regs *regs) blit_blur() 516 regs->op |= (PPP_OP_SCALE_Y_ON | PPP_OP_SCALE_X_ON); blit_blur() 538 struct mdp_blit_req *req, struct mdp_regs *regs) valid_src_dst() 545 get_len(&req->src, &req->src_rect, regs->src_bpp, &src0_len, valid_src_dst() 547 get_len(&req->dst, &req->dst_rect, regs->dst_bpp, &dst0_len, valid_src_dst() 550 if (regs->src0 < src_min_ok || regs->src0 > src_max_ok || valid_src_dst() 551 regs->src0 + src0_len > src_max_ok) { valid_src_dst() 552 DLOG("invalid_src %x %x %lx %lx\n", regs->src0, valid_src_dst() 556 if (regs->src_cfg & PPP_SRC_PLANE_PSEUDOPLNR) { valid_src_dst() 557 if (regs->src1 < src_min_ok || regs->src1 > src_max_ok || valid_src_dst() 558 regs->src1 + src1_len > src_max_ok) { valid_src_dst() 563 if (regs->dst0 < dst_min_ok || regs->dst0 > dst_max_ok || valid_src_dst() 564 regs->dst0 + dst0_len > dst_max_ok) { valid_src_dst() 568 if (regs->dst_cfg & PPP_SRC_PLANE_PSEUDOPLNR) { valid_src_dst() 569 if (regs->dst1 < dst_min_ok || regs->dst1 > dst_max_ok || valid_src_dst() 570 regs->dst1 + dst1_len > dst_max_ok) { valid_src_dst() 579 static void flush_imgs(struct mdp_blit_req *req, struct mdp_regs *regs, flush_imgs() argument 605 struct mdp_regs *regs, struct file *src_file, send_blit() 609 mdp_writel(mdp, regs->src_rect, PPP_ADDR_SRC_ROI); send_blit() 610 mdp_writel(mdp, regs->src0, PPP_ADDR_SRC0); send_blit() 611 mdp_writel(mdp, regs->src1, PPP_ADDR_SRC1); send_blit() 612 mdp_writel(mdp, regs->src_ystride, PPP_ADDR_SRC_YSTRIDE); send_blit() 613 mdp_writel(mdp, regs->src_cfg, PPP_ADDR_SRC_CFG); send_blit() 614 mdp_writel(mdp, regs->src_pack, PPP_ADDR_SRC_PACK_PATTERN); send_blit() 616 mdp_writel(mdp, regs->op, PPP_ADDR_OPERATION); send_blit() 617 mdp_writel(mdp, regs->phasex_init, PPP_ADDR_PHASEX_INIT); send_blit() 618 mdp_writel(mdp, regs->phasey_init, PPP_ADDR_PHASEY_INIT); send_blit() 619 mdp_writel(mdp, regs->phasex_step, PPP_ADDR_PHASEX_STEP); send_blit() 620 mdp_writel(mdp, regs->phasey_step, PPP_ADDR_PHASEY_STEP); send_blit() 625 mdp_writel(mdp, regs->dst_cfg, PPP_ADDR_DST_CFG); send_blit() 626 mdp_writel(mdp, regs->dst_pack, PPP_ADDR_DST_PACK_PATTERN); send_blit() 627 mdp_writel(mdp, regs->dst_rect, PPP_ADDR_DST_ROI); send_blit() 628 mdp_writel(mdp, regs->dst0, PPP_ADDR_DST0); send_blit() 629 mdp_writel(mdp, regs->dst1, PPP_ADDR_DST1); send_blit() 630 mdp_writel(mdp, regs->dst_ystride, PPP_ADDR_DST_YSTRIDE); send_blit() 632 mdp_writel(mdp, regs->edge, PPP_ADDR_EDGE); send_blit() 633 if (regs->op & PPP_OP_BLEND_ON) { send_blit() 634 mdp_writel(mdp, regs->dst0, PPP_ADDR_BG0); send_blit() 635 mdp_writel(mdp, regs->dst1, PPP_ADDR_BG1); send_blit() 636 mdp_writel(mdp, regs->dst_ystride, PPP_ADDR_BG_YSTRIDE); send_blit() 641 flush_imgs(req, regs, src_file, dst_file); send_blit() 650 struct mdp_regs regs = {0}; mdp_ppp_blit() local 667 regs.src_cfg = src_img_cfg[req->src.format]; mdp_ppp_blit() 668 regs.src_cfg |= (req->src_rect.x & 0x1) ? PPP_SRC_BPP_ROI_ODD_X : 0; mdp_ppp_blit() 669 regs.src_cfg |= (req->src_rect.y & 0x1) ? PPP_SRC_BPP_ROI_ODD_Y : 0; mdp_ppp_blit() 670 regs.src_rect = (req->src_rect.h << 16) | req->src_rect.w; mdp_ppp_blit() 671 regs.src_pack = pack_pattern[req->src.format]; mdp_ppp_blit() 674 regs.dst_cfg = dst_img_cfg[req->dst.format] | PPP_DST_OUT_SEL_AXI; mdp_ppp_blit() 675 regs.dst_rect = (req->dst_rect.h << 16) | req->dst_rect.w; mdp_ppp_blit() 676 regs.dst_pack = pack_pattern[req->dst.format]; mdp_ppp_blit() 679 regs.src_bpp = bytes_per_pixel[req->src.format]; mdp_ppp_blit() 680 regs.src0 = src_start + req->src.offset; mdp_ppp_blit() 681 regs.src_ystride = req->src.width * regs.src_bpp; mdp_ppp_blit() 682 get_chroma_addr(&req->src, &req->src_rect, regs.src0, regs.src_bpp, mdp_ppp_blit() 683 regs.src_cfg, ®s.src1, ®s.src_ystride); mdp_ppp_blit() 684 regs.src0 += (req->src_rect.x + (req->src_rect.y * req->src.width)) * mdp_ppp_blit() 685 regs.src_bpp; mdp_ppp_blit() 688 regs.dst_bpp = bytes_per_pixel[req->dst.format]; mdp_ppp_blit() 689 regs.dst0 = dst_start + req->dst.offset; mdp_ppp_blit() 690 regs.dst_ystride = req->dst.width * regs.dst_bpp; mdp_ppp_blit() 691 get_chroma_addr(&req->dst, &req->dst_rect, regs.dst0, regs.dst_bpp, mdp_ppp_blit() 692 regs.dst_cfg, ®s.dst1, ®s.dst_ystride); mdp_ppp_blit() 693 regs.dst0 += (req->dst_rect.x + (req->dst_rect.y * req->dst.width)) * mdp_ppp_blit() 694 regs.dst_bpp; mdp_ppp_blit() 697 ®s)) { mdp_ppp_blit() 705 regs.op = 0; mdp_ppp_blit() 706 blit_rotate(req, ®s); mdp_ppp_blit() 707 blit_convert(req, ®s); mdp_ppp_blit() 709 regs.op |= PPP_OP_DITHER_EN; mdp_ppp_blit() 710 blit_blend(req, ®s); mdp_ppp_blit() 711 if (blit_scale(mdp, req, ®s)) { mdp_ppp_blit() 715 blit_blur(mdp, req, ®s); mdp_ppp_blit() 716 regs.op |= dst_op_chroma[req->dst.format] | mdp_ppp_blit() 726 if (get_edge_cond(req, ®s)) mdp_ppp_blit() 729 send_blit(mdp, req, ®s, src_file, dst_file); mdp_ppp_blit() 110 blit_rotate(struct mdp_blit_req *req, struct mdp_regs *regs) blit_rotate() argument 435 blit_scale(const struct mdp_info *mdp, struct mdp_blit_req *req, struct mdp_regs *regs) blit_scale() argument 503 blit_blur(const struct mdp_info *mdp, struct mdp_blit_req *req, struct mdp_regs *regs) blit_blur() argument 536 valid_src_dst(unsigned long src_start, unsigned long src_len, unsigned long dst_start, unsigned long dst_len, struct mdp_blit_req *req, struct mdp_regs *regs) valid_src_dst() argument 604 send_blit(const struct mdp_info *mdp, struct mdp_blit_req *req, struct mdp_regs *regs, struct file *src_file, struct file *dst_file) send_blit() argument
|
/linux-4.1.27/arch/arm/plat-samsung/ |
H A D | pm-debug.c | 30 static inline void s3c_pm_arch_update_uart(void __iomem *regs, s3c_pm_arch_update_uart() argument 68 void __iomem *regs = s3c_pm_uart_base(); s3c_pm_save_uarts() local 71 save->ulcon = __raw_readl(regs + S3C2410_ULCON); s3c_pm_save_uarts() 72 save->ucon = __raw_readl(regs + S3C2410_UCON); s3c_pm_save_uarts() 73 save->ufcon = __raw_readl(regs + S3C2410_UFCON); s3c_pm_save_uarts() 74 save->umcon = __raw_readl(regs + S3C2410_UMCON); s3c_pm_save_uarts() 75 save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); s3c_pm_save_uarts() 78 save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT); s3c_pm_save_uarts() 81 regs, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); s3c_pm_save_uarts() 86 void __iomem *regs = s3c_pm_uart_base(); s3c_pm_restore_uarts() local 89 s3c_pm_arch_update_uart(regs, save); s3c_pm_restore_uarts() 91 __raw_writel(save->ulcon, regs + S3C2410_ULCON); s3c_pm_restore_uarts() 92 __raw_writel(save->ucon, regs + S3C2410_UCON); s3c_pm_restore_uarts() 93 __raw_writel(save->ufcon, regs + S3C2410_UFCON); s3c_pm_restore_uarts() 94 __raw_writel(save->umcon, regs + S3C2410_UMCON); s3c_pm_restore_uarts() 95 __raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV); s3c_pm_restore_uarts() 98 __raw_writel(save->udivslot, regs + S3C2443_DIVSLOT); s3c_pm_restore_uarts()
|
/linux-4.1.27/arch/xtensa/kernel/ |
H A D | ptrace.c | 54 struct pt_regs *regs = task_pt_regs(child); ptrace_getregs() local 56 unsigned long wb = regs->windowbase; ptrace_getregs() 62 __put_user(regs->pc, &gregset->pc); ptrace_getregs() 63 __put_user(regs->ps & ~(1 << PS_EXCM_BIT), &gregset->ps); ptrace_getregs() 64 __put_user(regs->lbeg, &gregset->lbeg); ptrace_getregs() 65 __put_user(regs->lend, &gregset->lend); ptrace_getregs() 66 __put_user(regs->lcount, &gregset->lcount); ptrace_getregs() 67 __put_user(regs->windowstart, &gregset->windowstart); ptrace_getregs() 68 __put_user(regs->windowbase, &gregset->windowbase); ptrace_getregs() 69 __put_user(regs->threadptr, &gregset->threadptr); ptrace_getregs() 72 __put_user(regs->areg[i], ptrace_getregs() 80 struct pt_regs *regs = task_pt_regs(child); ptrace_setregs() local 89 __get_user(regs->pc, &gregset->pc); ptrace_setregs() 91 __get_user(regs->lbeg, &gregset->lbeg); ptrace_setregs() 92 __get_user(regs->lend, &gregset->lend); ptrace_setregs() 93 __get_user(regs->lcount, &gregset->lcount); ptrace_setregs() 96 __get_user(regs->threadptr, &gregset->threadptr); ptrace_setregs() 98 regs->ps = (regs->ps & ~ps_mask) | (ps & ps_mask) | (1 << PS_EXCM_BIT); ptrace_setregs() 103 if (wb != regs->windowbase || ws != regs->windowstart) { ptrace_setregs() 110 regs->windowbase = wb; ptrace_setregs() 111 regs->windowstart = ws; ptrace_setregs() 112 regs->wmask = wmask; ptrace_setregs() 115 if (wb != 0 && __copy_from_user(regs->areg + XCHAL_NUM_AREGS - wb * 4, ptrace_setregs() 119 if (__copy_from_user(regs->areg, gregset->a + wb * 4, ptrace_setregs() 129 struct pt_regs *regs = task_pt_regs(child); ptrace_getxregs() local 143 ret |= __copy_to_user(&xtregs->opt, ®s->xtregs_opt, ptrace_getxregs() 154 struct pt_regs *regs = task_pt_regs(child); ptrace_setxregs() local 169 ret |= __copy_from_user(®s->xtregs_opt, &xtregs->opt, ptrace_setxregs() 179 struct pt_regs *regs; ptrace_peekusr() local 182 regs = task_pt_regs(child); ptrace_peekusr() 188 tmp = regs->areg[regno - REG_AR_BASE]; ptrace_peekusr() 192 tmp = regs->areg[regno - REG_A_BASE]; ptrace_peekusr() 196 tmp = regs->pc; ptrace_peekusr() 201 * its being set in regs is for exception handling ptrace_peekusr() 203 tmp = (regs->ps & ~(1 << PS_EXCM_BIT)); ptrace_peekusr() 211 unsigned long wb = regs->windowbase; ptrace_peekusr() 212 unsigned long ws = regs->windowstart; ptrace_peekusr() 217 tmp = regs->lbeg; ptrace_peekusr() 221 tmp = regs->lend; ptrace_peekusr() 225 tmp = regs->lcount; ptrace_peekusr() 229 tmp = regs->sar; ptrace_peekusr() 233 tmp = regs->syscall; ptrace_peekusr() 244 struct pt_regs *regs; ptrace_pokeusr() local 245 regs = task_pt_regs(child); ptrace_pokeusr() 249 regs->areg[regno - REG_AR_BASE] = val; ptrace_pokeusr() 253 regs->areg[regno - REG_A_BASE] = val; ptrace_pokeusr() 257 regs->pc = val; ptrace_pokeusr() 261 regs->syscall = val; ptrace_pokeusr() 338 void do_syscall_trace_enter(struct pt_regs *regs) do_syscall_trace_enter() argument 349 void do_syscall_trace_leave(struct pt_regs *regs) do_syscall_trace_leave() argument
|
/linux-4.1.27/arch/avr32/kernel/ |
H A D | traps.c | 27 void die(const char *str, struct pt_regs *regs, long err) die() argument 61 show_regs_log_lvl(regs, KERN_EMERG); die() 62 show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG); die() 76 void _exception(long signr, struct pt_regs *regs, int code, _exception() argument 81 if (!user_mode(regs)) { _exception() 85 fixup = search_exception_tables(regs->pc); _exception() 87 regs->pc = fixup->fixup; _exception() 90 die("Unhandled exception in kernel mode", regs, signr); _exception() 100 asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) do_nmi() argument 106 ret = notify_die(DIE_NMI, "NMI", regs, 0, ecr, SIGINT); do_nmi() 112 die("Fatal Non-Maskable Interrupt", regs, SIGINT); do_nmi() 121 asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) do_critical_exception() argument 123 die("Critical exception", regs, SIGKILL); do_critical_exception() 126 asmlinkage void do_address_exception(unsigned long ecr, struct pt_regs *regs) do_address_exception() argument 128 _exception(SIGBUS, regs, BUS_ADRALN, regs->pc); do_address_exception() 186 asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) do_illegal_opcode() argument 194 if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) { do_illegal_opcode() 197 type = report_bug(regs->pc, regs); do_illegal_opcode() 202 regs->pc += 2; do_illegal_opcode() 205 die("Kernel BUG", regs, SIGKILL); do_illegal_opcode() 212 if (user_mode(regs)) { do_illegal_opcode() 213 pc = (void __user *)instruction_pointer(regs); do_illegal_opcode() 223 if (hook->fn(regs, insn) == 0) { do_illegal_opcode() 244 _exception(SIGILL, regs, code, regs->pc); do_illegal_opcode() 248 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->pc); do_illegal_opcode() 251 asmlinkage void do_fpe(unsigned long ecr, struct pt_regs *regs) do_fpe() argument 254 _exception(SIGILL, regs, ILL_COPROC, regs->pc); do_fpe()
|
H A D | process.c | 119 struct pt_regs *regs, const char *log_lvl) show_trace_log_lvl() 124 if (regs) show_trace_log_lvl() 125 fp = regs->r7; show_trace_log_lvl() 158 struct pt_regs *regs, const char *log_lvl) show_trace_log_lvl() 180 struct pt_regs *regs, const char *log_lvl) show_stack_log_lvl() 198 show_trace_log_lvl(tsk, (unsigned long *)sp, regs, log_lvl); show_stack_log_lvl() 212 void show_regs_log_lvl(struct pt_regs *regs, const char *log_lvl) show_regs_log_lvl() argument 214 unsigned long sp = regs->sp; show_regs_log_lvl() 215 unsigned long lr = regs->lr; show_regs_log_lvl() 216 unsigned long mode = (regs->sr & MODE_MASK) >> MODE_SHIFT; show_regs_log_lvl() 220 if (!user_mode(regs)) { show_regs_log_lvl() 221 sp = (unsigned long)regs + FRAME_SIZE_FULL; show_regs_log_lvl() 224 print_symbol("PC is at %s\n", instruction_pointer(regs)); show_regs_log_lvl() 231 log_lvl, instruction_pointer(regs), lr, print_tainted(), show_regs_log_lvl() 232 log_lvl, sp, regs->r12, regs->r11); show_regs_log_lvl() 234 log_lvl, regs->r10, regs->r9, regs->r8); show_regs_log_lvl() 236 log_lvl, regs->r7, regs->r6, regs->r5, regs->r4); show_regs_log_lvl() 238 log_lvl, regs->r3, regs->r2, regs->r1, regs->r0); show_regs_log_lvl() 240 regs->sr & SR_Q ? 'Q' : 'q', show_regs_log_lvl() 241 regs->sr & SR_V ? 'V' : 'v', show_regs_log_lvl() 242 regs->sr & SR_N ? 'N' : 'n', show_regs_log_lvl() 243 regs->sr & SR_Z ? 'Z' : 'z', show_regs_log_lvl() 244 regs->sr & SR_C ? 'C' : 'c'); show_regs_log_lvl() 246 regs->sr & SR_H ? 'H' : 'h', show_regs_log_lvl() 247 regs->sr & SR_J ? 'J' : 'j', show_regs_log_lvl() 248 regs->sr & SR_DM ? 'M' : 'm', show_regs_log_lvl() 249 regs->sr & SR_D ? 'D' : 'd', show_regs_log_lvl() 250 regs->sr & SR_EM ? 'E' : 'e', show_regs_log_lvl() 251 regs->sr & SR_I3M ? '3' : '.', show_regs_log_lvl() 252 regs->sr & SR_I2M ? '2' : '.', show_regs_log_lvl() 253 regs->sr & SR_I1M ? '1' : '.', show_regs_log_lvl() 254 regs->sr & SR_I0M ? '0' : '.', show_regs_log_lvl() 255 regs->sr & SR_GM ? 'G' : 'g'); show_regs_log_lvl() 259 void show_regs(struct pt_regs *regs) show_regs() argument 261 unsigned long sp = regs->sp; show_regs() 263 if (!user_mode(regs)) show_regs() 264 sp = (unsigned long)regs + FRAME_SIZE_FULL; show_regs() 266 show_regs_log_lvl(regs, ""); show_regs() 267 show_trace_log_lvl(current, (unsigned long *)sp, regs, ""); show_regs() 272 int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) dump_fpu() argument 118 show_trace_log_lvl(struct task_struct *tsk, unsigned long *sp, struct pt_regs *regs, const char *log_lvl) show_trace_log_lvl() argument 157 show_trace_log_lvl(struct task_struct *tsk, unsigned long *sp, struct pt_regs *regs, const char *log_lvl) show_trace_log_lvl() argument 179 show_stack_log_lvl(struct task_struct *tsk, unsigned long sp, struct pt_regs *regs, const char *log_lvl) show_stack_log_lvl() argument
|
H A D | signal.c | 32 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) restore_sigcontext() argument 36 #define COPY(x) err |= __get_user(regs->x, &sc->x) restore_sigcontext() 60 err |= !valid_user_regs(regs); restore_sigcontext() 66 asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) sys_rt_sigreturn() argument 74 frame = (struct rt_sigframe __user *)regs->sp; sys_rt_sigreturn() 85 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) sys_rt_sigreturn() 92 regs->pc, regs->lr, regs->sp); sys_rt_sigreturn() 94 return regs->r12; sys_rt_sigreturn() 102 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) setup_sigcontext() argument 106 #define COPY(x) err |= __put_user(regs->x, &sc->x) setup_sigcontext() 130 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize) get_sigframe() argument 132 unsigned long sp = sigsp(regs->sp, ksig); get_sigframe() 138 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument 143 frame = get_sigframe(ksig, regs, sizeof(*frame)); setup_rt_frame() 168 err |= __save_altstack(&frame->uc.uc_stack, regs->sp); setup_rt_frame() 169 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs); setup_rt_frame() 175 regs->r12 = ksig->sig; setup_rt_frame() 176 regs->r11 = (unsigned long) &frame->info; setup_rt_frame() 177 regs->r10 = (unsigned long) &frame->uc; setup_rt_frame() 178 regs->sp = (unsigned long) frame; setup_rt_frame() 180 regs->lr = (unsigned long)ksig->ka.sa.sa_restorer; setup_rt_frame() 184 regs->lr = (unsigned long) &frame->retcode; setup_rt_frame() 188 current->comm, current->pid, ksig->sig, regs->sp, setup_rt_frame() 189 regs->pc, ksig->ka.sa.sa_handler, regs->lr); setup_rt_frame() 191 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; setup_rt_frame() 197 static inline void setup_syscall_restart(struct pt_regs *regs) setup_syscall_restart() argument 199 if (regs->r12 == -ERESTART_RESTARTBLOCK) setup_syscall_restart() 200 regs->r8 = __NR_restart_syscall; setup_syscall_restart() 202 regs->r12 = regs->r12_orig; setup_syscall_restart() 203 regs->pc -= 2; setup_syscall_restart() 207 handle_signal(struct ksignal *ksig, struct pt_regs *regs, int syscall) handle_signal() argument 214 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); handle_signal() 219 ret |= !valid_user_regs(regs); handle_signal() 232 static void do_signal(struct pt_regs *regs, int syscall) do_signal() argument 241 if (!user_mode(regs)) do_signal() 246 switch (regs->r12) { do_signal() 250 regs->r12 = -EINTR; do_signal() 256 regs->r12 = -EINTR; do_signal() 261 setup_syscall_restart(regs); do_signal() 271 handle_signal(&ksig, regs, syscall); do_signal() 274 asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) do_notify_resume() argument 282 do_signal(regs, syscall); do_notify_resume() 286 tracehook_notify_resume(regs); do_notify_resume()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | traps.c | 66 int (*__debugger)(struct pt_regs *regs) __read_mostly; 67 int (*__debugger_ipi)(struct pt_regs *regs) __read_mostly; 68 int (*__debugger_bpt)(struct pt_regs *regs) __read_mostly; 69 int (*__debugger_sstep)(struct pt_regs *regs) __read_mostly; 70 int (*__debugger_iabr_match)(struct pt_regs *regs) __read_mostly; 71 int (*__debugger_break_match)(struct pt_regs *regs) __read_mostly; 72 int (*__debugger_fault_handler)(struct pt_regs *regs) __read_mostly; 117 static unsigned __kprobes long oops_begin(struct pt_regs *regs) oops_begin() argument 122 if (debugger(regs)) oops_begin() 145 static void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, oops_end() argument 159 crash_fadump(regs, "die oops"); oops_end() 165 if (kexec_should_crash(current) || (TRAP(regs) == 0x100)) { oops_end() 166 crash_kexec(regs); oops_end() 173 crash_kexec_secondary(regs); oops_end() 197 static int __kprobes __die(const char *str, struct pt_regs *regs, long err) __die() argument 214 if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV) == NOTIFY_STOP) __die() 218 show_regs(regs); __die() 223 void die(const char *str, struct pt_regs *regs, long err) die() argument 225 unsigned long flags = oops_begin(regs); die() 227 if (__die(str, regs, err)) die() 229 oops_end(flags, regs, err); die() 233 struct pt_regs *regs, siginfo_t *info) user_single_step_siginfo() 238 info->si_addr = (void __user *)regs->nip; user_single_step_siginfo() 241 void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) _exception() argument 249 if (!user_mode(regs)) { _exception() 250 die("Exception in kernel mode", regs, signr); _exception() 255 printk_ratelimited(regs->msr & MSR_64BIT ? fmt64 : fmt32, _exception() 257 addr, regs->nip, regs->link, code); _exception() 260 if (arch_irqs_disabled() && !arch_irq_disabled_regs(regs)) _exception() 272 void system_reset_exception(struct pt_regs *regs) system_reset_exception() argument 276 if (ppc_md.system_reset_exception(regs)) system_reset_exception() 280 die("System Reset", regs, SIGABRT); system_reset_exception() 283 if (!(regs->msr & MSR_RI)) system_reset_exception() 292 * regs->nip and regs->msr contains srr0 and ssr1. 294 long machine_check_early(struct pt_regs *regs) machine_check_early() argument 301 handled = cur_cpu_spec->machine_check_early(regs); machine_check_early() 305 long hmi_exception_realmode(struct pt_regs *regs) hmi_exception_realmode() argument 310 ppc_md.hmi_exception_early(regs); hmi_exception_realmode() 327 static inline int check_io_access(struct pt_regs *regs) check_io_access() argument 330 unsigned long msr = regs->msr; check_io_access() 332 unsigned int *nip = (unsigned int *)regs->nip; check_io_access() 335 && (entry = search_exception_tables(regs->nip)) != NULL) { check_io_access() 356 regs->gpr[rb] - _IO_BASE, nip); check_io_access() 357 regs->msr |= MSR_RI; check_io_access() 358 regs->nip = entry->fixup; check_io_access() 369 #define get_reason(regs) ((regs)->dsisr) 371 #define get_mc_reason(regs) ((regs)->dsisr) 373 #define get_mc_reason(regs) (mfspr(SPRN_MCSR)) 381 #define single_stepping(regs) (current->thread.debug.dbcr0 & DBCR0_IC) 382 #define clear_single_step(regs) (current->thread.debug.dbcr0 &= ~DBCR0_IC) 387 #define get_reason(regs) ((regs)->msr) 388 #define get_mc_reason(regs) ((regs)->msr) 395 #define single_stepping(regs) ((regs)->msr & MSR_SE) 396 #define clear_single_step(regs) ((regs)->msr &= ~MSR_SE) 400 int machine_check_4xx(struct pt_regs *regs) machine_check_4xx() argument 402 unsigned long reason = get_mc_reason(regs); machine_check_4xx() 414 int machine_check_440A(struct pt_regs *regs) machine_check_440A() argument 416 unsigned long reason = get_mc_reason(regs); machine_check_440A() 450 int machine_check_47x(struct pt_regs *regs) machine_check_47x() argument 452 unsigned long reason = get_mc_reason(regs); machine_check_47x() 490 int machine_check_e500mc(struct pt_regs *regs) machine_check_e500mc() argument 497 recoverable = fsl_rio_mcheck_exception(regs); machine_check_e500mc() 589 int machine_check_e500(struct pt_regs *regs) machine_check_e500() argument 591 unsigned long reason = get_mc_reason(regs); machine_check_e500() 594 if (fsl_rio_mcheck_exception(regs)) machine_check_e500() 596 if (fsl_pci_mcheck_exception(regs)) machine_check_e500() 631 int machine_check_generic(struct pt_regs *regs) machine_check_generic() argument 636 int machine_check_e200(struct pt_regs *regs) machine_check_e200() argument 638 unsigned long reason = get_mc_reason(regs); machine_check_e200() 661 int machine_check_generic(struct pt_regs *regs) machine_check_generic() argument 663 unsigned long reason = get_mc_reason(regs); machine_check_generic() 698 void machine_check_exception(struct pt_regs *regs) machine_check_exception() argument 712 recover = ppc_md.machine_check_exception(regs); machine_check_exception() 714 recover = cur_cpu_spec->machine_check(regs); machine_check_exception() 726 bad_page_fault(regs, regs->dar, SIGBUS); machine_check_exception() 730 if (debugger_fault_handler(regs)) machine_check_exception() 733 if (check_io_access(regs)) machine_check_exception() 736 die("Machine check", regs, SIGBUS); machine_check_exception() 739 if (!(regs->msr & MSR_RI)) machine_check_exception() 746 void SMIException(struct pt_regs *regs) SMIException() argument 748 die("System Management Interrupt", regs, SIGABRT); SMIException() 751 void handle_hmi_exception(struct pt_regs *regs) handle_hmi_exception() argument 755 old_regs = set_irq_regs(regs); handle_hmi_exception() 759 ppc_md.handle_hmi_exception(regs); handle_hmi_exception() 765 void unknown_exception(struct pt_regs *regs) unknown_exception() argument 770 regs->nip, regs->msr, regs->trap); unknown_exception() 772 _exception(SIGTRAP, regs, 0, 0); unknown_exception() 777 void instruction_breakpoint_exception(struct pt_regs *regs) instruction_breakpoint_exception() argument 781 if (notify_die(DIE_IABR_MATCH, "iabr_match", regs, 5, instruction_breakpoint_exception() 784 if (debugger_iabr_match(regs)) instruction_breakpoint_exception() 786 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); instruction_breakpoint_exception() 792 void RunModeException(struct pt_regs *regs) RunModeException() argument 794 _exception(SIGTRAP, regs, 0, 0); RunModeException() 797 void __kprobes single_step_exception(struct pt_regs *regs) single_step_exception() argument 801 clear_single_step(regs); single_step_exception() 803 if (notify_die(DIE_SSTEP, "single_step", regs, 5, single_step_exception() 806 if (debugger_sstep(regs)) single_step_exception() 809 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); single_step_exception() 821 static void emulate_single_step(struct pt_regs *regs) emulate_single_step() argument 823 if (single_stepping(regs)) emulate_single_step() 824 single_step_exception(regs); emulate_single_step() 854 static void parse_fpe(struct pt_regs *regs) parse_fpe() argument 862 _exception(SIGFPE, regs, code, regs->nip); parse_fpe() 876 static int emulate_string_inst(struct pt_regs *regs, u32 instword) emulate_string_inst() argument 890 EA = (rA == 0) ? 0 : regs->gpr[rA]; emulate_string_inst() 896 num_bytes = regs->xer & 0x7f; emulate_string_inst() 912 if ((regs->msr & MSR_64BIT) == 0) emulate_string_inst() 923 regs->gpr[rT] = 0; emulate_string_inst() 924 regs->gpr[rT] |= val << shift; emulate_string_inst() 928 val = regs->gpr[rT] >> shift; emulate_string_inst() 948 static int emulate_popcntb_inst(struct pt_regs *regs, u32 instword) emulate_popcntb_inst() argument 956 tmp = regs->gpr[rs]; emulate_popcntb_inst() 960 regs->gpr[ra] = tmp; emulate_popcntb_inst() 965 static int emulate_isel(struct pt_regs *regs, u32 instword) emulate_isel() argument 974 tmp = (rA == 0) ? 0 : regs->gpr[rA]; emulate_isel() 975 bit = (regs->ccr >> (31 - BC)) & 0x1; emulate_isel() 977 regs->gpr[rT] = bit ? tmp : regs->gpr[rB]; emulate_isel() 983 static inline bool tm_abort_check(struct pt_regs *regs, int cause) tm_abort_check() argument 990 if (MSR_TM_TRANSACTIONAL(regs->msr)) { tm_abort_check() 998 static inline bool tm_abort_check(struct pt_regs *regs, int reason) tm_abort_check() argument 1004 static int emulate_instruction(struct pt_regs *regs) emulate_instruction() argument 1009 if (!user_mode(regs)) emulate_instruction() 1011 CHECK_FULL_REGS(regs); emulate_instruction() 1013 if (get_user(instword, (u32 __user *)(regs->nip))) emulate_instruction() 1018 PPC_WARN_EMULATED(mfpvr, regs); emulate_instruction() 1020 regs->gpr[rd] = mfspr(SPRN_PVR); emulate_instruction() 1026 PPC_WARN_EMULATED(dcba, regs); emulate_instruction() 1035 PPC_WARN_EMULATED(mcrxr, regs); emulate_instruction() 1036 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk); emulate_instruction() 1037 regs->xer &= ~0xf0000000UL; emulate_instruction() 1043 if (tm_abort_check(regs, emulate_instruction() 1046 PPC_WARN_EMULATED(string, regs); emulate_instruction() 1047 return emulate_string_inst(regs, instword); emulate_instruction() 1052 PPC_WARN_EMULATED(popcntb, regs); emulate_instruction() 1053 return emulate_popcntb_inst(regs, instword); emulate_instruction() 1058 PPC_WARN_EMULATED(isel, regs); emulate_instruction() 1059 return emulate_isel(regs, instword); emulate_instruction() 1064 PPC_WARN_EMULATED(sync, regs); emulate_instruction() 1076 PPC_WARN_EMULATED(mfdscr, regs); emulate_instruction() 1078 regs->gpr[rd] = mfspr(SPRN_DSCR); emulate_instruction() 1087 PPC_WARN_EMULATED(mtdscr, regs); emulate_instruction() 1089 current->thread.dscr = regs->gpr[rd]; emulate_instruction() 1105 static int emulate_math(struct pt_regs *regs) emulate_math() argument 1108 extern int do_mathemu(struct pt_regs *regs); emulate_math() 1110 ret = do_mathemu(regs); emulate_math() 1112 PPC_WARN_EMULATED(math, regs); emulate_math() 1116 emulate_single_step(regs); emulate_math() 1121 _exception(SIGFPE, regs, code, regs->nip); emulate_math() 1125 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); emulate_math() 1132 static inline int emulate_math(struct pt_regs *regs) { return -1; } emulate_math() argument 1135 void __kprobes program_check_exception(struct pt_regs *regs) program_check_exception() argument 1138 unsigned int reason = get_reason(regs); program_check_exception() 1145 parse_fpe(regs); program_check_exception() 1151 if (debugger_bpt(regs)) program_check_exception() 1155 if (notify_die(DIE_BPT, "breakpoint", regs, 5, 5, SIGTRAP) program_check_exception() 1159 if (!(regs->msr & MSR_PR) && /* not user-mode */ program_check_exception() 1160 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) { program_check_exception() 1161 regs->nip += 4; program_check_exception() 1164 _exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip); program_check_exception() 1178 if (!user_mode(regs) && program_check_exception() 1179 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) { program_check_exception() 1180 regs->nip += 4; program_check_exception() 1189 if (user_mode(regs)) { program_check_exception() 1190 _exception(SIGILL, regs, ILL_ILLOPN, regs->nip); program_check_exception() 1194 "at %lx (msr 0x%x)\n", regs->nip, reason); program_check_exception() 1195 die("Unrecoverable exception", regs, SIGABRT); program_check_exception() 1207 if (!user_mode(regs)) program_check_exception() 1211 if (!arch_irq_disabled_regs(regs)) program_check_exception() 1222 if (!emulate_math(regs)) program_check_exception() 1227 switch (emulate_instruction(regs)) { program_check_exception() 1229 regs->nip += 4; program_check_exception() 1230 emulate_single_step(regs); program_check_exception() 1233 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); program_check_exception() 1240 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); program_check_exception() 1242 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); program_check_exception() 1252 void __kprobes emulation_assist_interrupt(struct pt_regs *regs) emulation_assist_interrupt() argument 1254 regs->msr |= REASON_ILLEGAL; emulation_assist_interrupt() 1255 program_check_exception(regs); emulation_assist_interrupt() 1258 void alignment_exception(struct pt_regs *regs) alignment_exception() argument 1264 if (!arch_irq_disabled_regs(regs)) alignment_exception() 1267 if (tm_abort_check(regs, TM_CAUSE_ALIGNMENT | TM_CAUSE_PERSISTENT)) alignment_exception() 1272 fixed = fix_alignment(regs); alignment_exception() 1275 regs->nip += 4; /* skip over emulated instruction */ alignment_exception() 1276 emulate_single_step(regs); alignment_exception() 1288 if (user_mode(regs)) alignment_exception() 1289 _exception(sig, regs, code, regs->dar); alignment_exception() 1291 bad_page_fault(regs, regs->dar, sig); alignment_exception() 1297 void StackOverflow(struct pt_regs *regs) StackOverflow() argument 1300 current, regs->gpr[1]); StackOverflow() 1301 debugger(regs); StackOverflow() 1302 show_regs(regs); StackOverflow() 1306 void nonrecoverable_exception(struct pt_regs *regs) nonrecoverable_exception() argument 1309 regs->nip, regs->msr); nonrecoverable_exception() 1310 debugger(regs); nonrecoverable_exception() 1311 die("nonrecoverable exception", regs, SIGKILL); nonrecoverable_exception() 1314 void trace_syscall(struct pt_regs *regs) trace_syscall() argument 1317 current, task_pid_nr(current), regs->nip, regs->link, regs->gpr[0], trace_syscall() 1318 regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted()); trace_syscall() 1321 void kernel_fp_unavailable_exception(struct pt_regs *regs) kernel_fp_unavailable_exception() argument 1326 "%lx at %lx\n", regs->trap, regs->nip); kernel_fp_unavailable_exception() 1327 die("Unrecoverable FP Unavailable Exception", regs, SIGABRT); kernel_fp_unavailable_exception() 1332 void altivec_unavailable_exception(struct pt_regs *regs) altivec_unavailable_exception() argument 1336 if (user_mode(regs)) { altivec_unavailable_exception() 1339 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); altivec_unavailable_exception() 1344 "%lx at %lx\n", regs->trap, regs->nip); altivec_unavailable_exception() 1345 die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); altivec_unavailable_exception() 1351 void vsx_unavailable_exception(struct pt_regs *regs) vsx_unavailable_exception() argument 1353 if (user_mode(regs)) { vsx_unavailable_exception() 1356 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); vsx_unavailable_exception() 1361 "%lx at %lx\n", regs->trap, regs->nip); vsx_unavailable_exception() 1362 die("Unrecoverable VSX Unavailable Exception", regs, SIGABRT); vsx_unavailable_exception() 1366 void facility_unavailable_exception(struct pt_regs *regs) facility_unavailable_exception() argument 1383 hv = (regs->trap == 0xf80); facility_unavailable_exception() 1405 if (!arch_irq_disabled_regs(regs)) facility_unavailable_exception() 1410 hv ? "Hypervisor " : "", facility, regs->nip, regs->msr); facility_unavailable_exception() 1412 if (user_mode(regs)) { facility_unavailable_exception() 1413 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); facility_unavailable_exception() 1417 die("Unexpected facility unavailable exception", regs, SIGABRT); facility_unavailable_exception() 1423 void fp_unavailable_tm(struct pt_regs *regs) fp_unavailable_tm() argument 1428 regs->nip, regs->msr); fp_unavailable_tm() 1431 * beginning the transaction. So, the transactional regs are just a fp_unavailable_tm() 1441 regs->msr |= (MSR_FP | current->thread.fpexc_mode); fp_unavailable_tm() 1452 if (regs->msr & MSR_VEC) { fp_unavailable_tm() 1455 regs->msr |= MSR_VSX; fp_unavailable_tm() 1459 void altivec_unavailable_tm(struct pt_regs *regs) altivec_unavailable_tm() argument 1467 regs->nip, regs->msr); altivec_unavailable_tm() 1469 regs->msr |= MSR_VEC; altivec_unavailable_tm() 1473 if (regs->msr & MSR_FP) { altivec_unavailable_tm() 1475 regs->msr |= MSR_VSX; altivec_unavailable_tm() 1479 void vsx_unavailable_tm(struct pt_regs *regs) vsx_unavailable_tm() argument 1481 unsigned long orig_msr = regs->msr; vsx_unavailable_tm() 1486 * If FP isn't in use, load FP regs. If VEC isn't in use, load VEC vsx_unavailable_tm() 1487 * regs. Either way, set MSR_VSX. vsx_unavailable_tm() 1492 regs->nip, regs->msr); vsx_unavailable_tm() 1498 regs->msr |= MSR_VSX; vsx_unavailable_tm() 1502 /* This reclaims FP and/or VR regs if they're already enabled */ vsx_unavailable_tm() 1505 regs->msr |= MSR_VEC | MSR_FP | current->thread.fpexc_mode | vsx_unavailable_tm() 1511 tm_recheckpoint(¤t->thread, regs->msr & ~orig_msr); vsx_unavailable_tm() 1520 void performance_monitor_exception(struct pt_regs *regs) performance_monitor_exception() argument 1524 perf_irq(regs); performance_monitor_exception() 1528 void SoftwareEmulation(struct pt_regs *regs) SoftwareEmulation() argument 1530 CHECK_FULL_REGS(regs); SoftwareEmulation() 1532 if (!user_mode(regs)) { SoftwareEmulation() 1533 debugger(regs); SoftwareEmulation() 1535 regs, SIGFPE); SoftwareEmulation() 1538 if (!emulate_math(regs)) SoftwareEmulation() 1541 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); SoftwareEmulation() 1546 static void handle_debug(struct pt_regs *regs, unsigned long debug_status) handle_debug() argument 1558 do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, TRAP_HWBKPT, handle_debug() 1563 do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, TRAP_HWBKPT, handle_debug() 1569 do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, TRAP_HWBKPT, handle_debug() 1574 do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, TRAP_HWBKPT, handle_debug() 1580 do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, TRAP_HWBKPT, handle_debug() 1585 do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, TRAP_HWBKPT, handle_debug() 1596 regs->msr |= MSR_DE; handle_debug() 1605 void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) DebugException() argument 1615 regs->msr &= ~MSR_DE; DebugException() 1623 if (user_mode(regs)) { DebugException() 1626 regs->msr |= MSR_DE; DebugException() 1630 if (notify_die(DIE_SSTEP, "block_step", regs, 5, DebugException() 1634 if (debugger_sstep(regs)) DebugException() 1637 regs->msr &= ~MSR_DE; DebugException() 1644 if (notify_die(DIE_SSTEP, "single_step", regs, 5, DebugException() 1649 if (debugger_sstep(regs)) DebugException() 1652 if (user_mode(regs)) { DebugException() 1656 regs->msr |= MSR_DE; DebugException() 1662 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); DebugException() 1664 handle_debug(regs, debug_status); DebugException() 1669 void TAUException(struct pt_regs *regs) TAUException() argument 1672 regs->nip, regs->msr, regs->trap, print_tainted()); TAUException() 1677 void altivec_assist_exception(struct pt_regs *regs) altivec_assist_exception() argument 1681 if (!user_mode(regs)) { altivec_assist_exception() 1683 " at %lx\n", regs->nip); altivec_assist_exception() 1684 die("Kernel VMX/Altivec assist exception", regs, SIGILL); altivec_assist_exception() 1689 PPC_WARN_EMULATED(altivec, regs); altivec_assist_exception() 1690 err = emulate_altivec(regs); altivec_assist_exception() 1692 regs->nip += 4; /* skip emulated instruction */ altivec_assist_exception() 1693 emulate_single_step(regs); altivec_assist_exception() 1699 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); altivec_assist_exception() 1704 "in %s at %lx\n", current->comm, regs->nip); altivec_assist_exception() 1711 void CacheLockingException(struct pt_regs *regs, unsigned long address, CacheLockingException() argument 1719 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); CacheLockingException() 1725 void SPEFloatingPointException(struct pt_regs *regs) SPEFloatingPointException() argument 1727 extern int do_spe_mathemu(struct pt_regs *regs); SPEFloatingPointException() 1752 err = do_spe_mathemu(regs); SPEFloatingPointException() 1754 regs->nip += 4; /* skip emulated instruction */ SPEFloatingPointException() 1755 emulate_single_step(regs); SPEFloatingPointException() 1761 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); SPEFloatingPointException() 1765 "in %s at %lx\n", current->comm, regs->nip); SPEFloatingPointException() 1767 _exception(SIGFPE, regs, code, regs->nip); SPEFloatingPointException() 1773 void SPEFloatingPointRoundException(struct pt_regs *regs) SPEFloatingPointRoundException() argument 1775 extern int speround_handler(struct pt_regs *regs); SPEFloatingPointRoundException() 1779 if (regs->msr & MSR_SPE) SPEFloatingPointRoundException() 1783 regs->nip -= 4; SPEFloatingPointRoundException() 1784 err = speround_handler(regs); SPEFloatingPointRoundException() 1786 regs->nip += 4; /* skip emulated instruction */ SPEFloatingPointRoundException() 1787 emulate_single_step(regs); SPEFloatingPointRoundException() 1793 _exception(SIGSEGV, regs, SEGV_ACCERR, regs->nip); SPEFloatingPointRoundException() 1797 "in %s at %lx\n", current->comm, regs->nip); SPEFloatingPointRoundException() 1799 _exception(SIGFPE, regs, 0, regs->nip); SPEFloatingPointRoundException() 1811 void unrecoverable_exception(struct pt_regs *regs) unrecoverable_exception() argument 1814 regs->trap, regs->nip); unrecoverable_exception() 1815 die("Unrecoverable exception", regs, SIGABRT); unrecoverable_exception() 1823 void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs) WatchdogHandler() argument 1830 void WatchdogException(struct pt_regs *regs) WatchdogException() argument 1833 WatchdogHandler(regs); WatchdogException() 1841 void kernel_bad_stack(struct pt_regs *regs) kernel_bad_stack() argument 1844 regs->gpr[1], regs->nip); kernel_bad_stack() 1845 die("Bad kernel stack pointer", regs, SIGABRT); kernel_bad_stack() 232 user_single_step_siginfo(struct task_struct *tsk, struct pt_regs *regs, siginfo_t *info) user_single_step_siginfo() argument
|
/linux-4.1.27/arch/x86/mm/kmemcheck/ |
H A D | error.h | 9 unsigned long address, unsigned int size, struct pt_regs *regs); 11 void kmemcheck_error_save_bug(struct pt_regs *regs);
|
/linux-4.1.27/arch/arm64/include/asm/xen/ |
H A D | events.h | 14 static inline int xen_irqs_disabled(struct pt_regs *regs) xen_irqs_disabled() argument 16 return raw_irqs_disabled_flags((unsigned long) regs->pstate); xen_irqs_disabled()
|
/linux-4.1.27/arch/cris/include/asm/ |
H A D | ptrace.h | 11 #define profile_pc(regs) instruction_pointer(regs)
|
/linux-4.1.27/arch/cris/kernel/ |
H A D | ptrace.c | 30 extern int do_signal(int canrestart, struct pt_regs *regs); 33 void do_notify_resume(int canrestart, struct pt_regs *regs, do_notify_resume() argument 38 do_signal(canrestart,regs); do_notify_resume() 42 tracehook_notify_resume(regs); do_notify_resume() 46 void do_work_pending(int syscall, struct pt_regs *regs, do_work_pending() argument 53 if (unlikely(!user_mode(regs))) do_work_pending() 57 do_signal(syscall, regs); do_work_pending() 61 tracehook_notify_resume(regs); do_work_pending()
|
/linux-4.1.27/drivers/usb/host/ |
H A D | xhci-rcar.c | 63 if (hcd->regs != NULL) { xhci_rcar_start() 65 temp = readl(hcd->regs + RCAR_USB3_INT_ENA); xhci_rcar_start() 67 writel(temp, hcd->regs + RCAR_USB3_INT_ENA); xhci_rcar_start() 69 writel(RCAR_USB3_LCLK_ENA_VAL, hcd->regs + RCAR_USB3_LCLK); xhci_rcar_start() 71 writel(RCAR_USB3_CONF1_VAL, hcd->regs + RCAR_USB3_CONF1); xhci_rcar_start() 72 writel(RCAR_USB3_CONF2_VAL, hcd->regs + RCAR_USB3_CONF2); xhci_rcar_start() 73 writel(RCAR_USB3_CONF3_VAL, hcd->regs + RCAR_USB3_CONF3); xhci_rcar_start() 75 writel(RCAR_USB3_RX_POL_VAL, hcd->regs + RCAR_USB3_RX_POL); xhci_rcar_start() 76 writel(RCAR_USB3_TX_POL_VAL, hcd->regs + RCAR_USB3_TX_POL); xhci_rcar_start() 80 static int xhci_rcar_download_firmware(struct device *dev, void __iomem *regs) xhci_rcar_download_firmware() argument 93 temp = readl(regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 95 writel(temp, regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 103 writel(data, regs + RCAR_USB3_FW_DATA0); xhci_rcar_download_firmware() 104 temp = readl(regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 106 writel(temp, regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 109 val = readl(regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 120 temp = readl(regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 122 writel(temp, regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 125 val = readl(regs + RCAR_USB3_DL_CTRL); xhci_rcar_download_firmware() 143 /* If hcd->regs is NULL, we don't just call the following function */ xhci_rcar_init_quirk() 144 if (!hcd->regs) xhci_rcar_init_quirk() 147 return xhci_rcar_download_firmware(hcd->self.controller, hcd->regs); xhci_rcar_init_quirk()
|
/linux-4.1.27/drivers/media/platform/s3c-camif/ |
H A D | Makefile | 3 s3c-camif-objs := camif-core.o camif-capture.o camif-regs.o
|
/linux-4.1.27/arch/arm/kernel/ |
H A D | perf_regs.c | 9 u64 perf_reg_value(struct pt_regs *regs, int idx) perf_reg_value() argument 14 return regs->uregs[idx]; perf_reg_value() 33 struct pt_regs *regs, perf_get_regs_user() 36 regs_user->regs = task_pt_regs(current); perf_get_regs_user() 32 perf_get_regs_user(struct perf_regs *regs_user, struct pt_regs *regs, struct pt_regs *regs_user_copy) perf_get_regs_user() argument
|
/linux-4.1.27/arch/c6x/kernel/ |
H A D | traps.c | 20 int (*c6x_nmi_handler)(struct pt_regs *regs); 31 void show_regs(struct pt_regs *regs) show_regs() argument 35 pr_err("PC: %08lx SP: %08lx\n", regs->pc, regs->sp); show_regs() 36 pr_err("Status: %08lx ORIG_A4: %08lx\n", regs->csr, regs->orig_a4); show_regs() 37 pr_err("A0: %08lx B0: %08lx\n", regs->a0, regs->b0); show_regs() 38 pr_err("A1: %08lx B1: %08lx\n", regs->a1, regs->b1); show_regs() 39 pr_err("A2: %08lx B2: %08lx\n", regs->a2, regs->b2); show_regs() 40 pr_err("A3: %08lx B3: %08lx\n", regs->a3, regs->b3); show_regs() 41 pr_err("A4: %08lx B4: %08lx\n", regs->a4, regs->b4); show_regs() 42 pr_err("A5: %08lx B5: %08lx\n", regs->a5, regs->b5); show_regs() 43 pr_err("A6: %08lx B6: %08lx\n", regs->a6, regs->b6); show_regs() 44 pr_err("A7: %08lx B7: %08lx\n", regs->a7, regs->b7); show_regs() 45 pr_err("A8: %08lx B8: %08lx\n", regs->a8, regs->b8); show_regs() 46 pr_err("A9: %08lx B9: %08lx\n", regs->a9, regs->b9); show_regs() 47 pr_err("A10: %08lx B10: %08lx\n", regs->a10, regs->b10); show_regs() 48 pr_err("A11: %08lx B11: %08lx\n", regs->a11, regs->b11); show_regs() 49 pr_err("A12: %08lx B12: %08lx\n", regs->a12, regs->b12); show_regs() 50 pr_err("A13: %08lx B13: %08lx\n", regs->a13, regs->b13); show_regs() 51 pr_err("A14: %08lx B14: %08lx\n", regs->a14, regs->dp); show_regs() 52 pr_err("A15: %08lx B15: %08lx\n", regs->a15, regs->sp); show_regs() 53 pr_err("A16: %08lx B16: %08lx\n", regs->a16, regs->b16); show_regs() 54 pr_err("A17: %08lx B17: %08lx\n", regs->a17, regs->b17); show_regs() 55 pr_err("A18: %08lx B18: %08lx\n", regs->a18, regs->b18); show_regs() 56 pr_err("A19: %08lx B19: %08lx\n", regs->a19, regs->b19); show_regs() 57 pr_err("A20: %08lx B20: %08lx\n", regs->a20, regs->b20); show_regs() 58 pr_err("A21: %08lx B21: %08lx\n", regs->a21, regs->b21); show_regs() 59 pr_err("A22: %08lx B22: %08lx\n", regs->a22, regs->b22); show_regs() 60 pr_err("A23: %08lx B23: %08lx\n", regs->a23, regs->b23); show_regs() 61 pr_err("A24: %08lx B24: %08lx\n", regs->a24, regs->b24); show_regs() 62 pr_err("A25: %08lx B25: %08lx\n", regs->a25, regs->b25); show_regs() 63 pr_err("A26: %08lx B26: %08lx\n", regs->a26, regs->b26); show_regs() 64 pr_err("A27: %08lx B27: %08lx\n", regs->a27, regs->b27); show_regs() 65 pr_err("A28: %08lx B28: %08lx\n", regs->a28, regs->b28); show_regs() 66 pr_err("A29: %08lx B29: %08lx\n", regs->a29, regs->b29); show_regs() 67 pr_err("A30: %08lx B30: %08lx\n", regs->a30, regs->b30); show_regs() 68 pr_err("A31: %08lx B31: %08lx\n", regs->a31, regs->b31); show_regs() 244 static void do_trap(struct exception_info *except_info, struct pt_regs *regs) do_trap() argument 246 unsigned long addr = instruction_pointer(regs); do_trap() 251 except_info->kernel_str, regs->pc, do_trap() 254 die_if_kernel(except_info->kernel_str, regs, addr); do_trap() 267 static int process_iexcept(struct pt_regs *regs) process_iexcept() argument 274 pr_err("IEXCEPT: PC[0x%lx]\n", regs->pc); process_iexcept() 280 if (*(unsigned int *)regs->pc == BKPT_OPCODE) { process_iexcept() 286 do_trap(&bkpt_exception, regs); process_iexcept() 292 do_trap(&iexcept_table[iexcept_num], regs); process_iexcept() 300 static void process_eexcept(struct pt_regs *regs) process_eexcept() argument 304 pr_err("EEXCEPT: PC[0x%lx]\n", regs->pc); process_eexcept() 307 do_trap(&eexcept_table[evt], regs); process_eexcept() 315 asmlinkage int process_exception(struct pt_regs *regs) process_exception() argument 328 (c6x_nmi_handler)(regs); process_exception() 334 if (process_iexcept(regs)) process_exception() 339 process_eexcept(regs); process_exception() 346 do_trap(&iexcept_table[ie_num], regs); process_exception()
|
/linux-4.1.27/drivers/media/dvb-frontends/ |
H A D | stv6110x.c | 108 ret = stv6110x_write_regs(stv6110x, 0, stv6110x->regs, stv6110x_init() 109 ARRAY_SIZE(stv6110x->regs)); stv6110x_init() 125 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_K, (REFCLOCK_MHz - 16)); stv6110x_set_frequency() 128 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_DIV4SEL, 1); stv6110x_set_frequency() 129 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_PRESC32_ON, 0); stv6110x_set_frequency() 132 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_DIV4SEL, 1); stv6110x_set_frequency() 133 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_PRESC32_ON, 1); stv6110x_set_frequency() 136 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_DIV4SEL, 0); stv6110x_set_frequency() 137 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_PRESC32_ON, 0); stv6110x_set_frequency() 140 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_DIV4SEL, 0); stv6110x_set_frequency() 141 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_PRESC32_ON, 1); stv6110x_set_frequency() 157 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_R_DIV, rDivOpt); stv6110x_set_frequency() 158 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG1], TNG1_N_DIV_11_8, MSB(divider)); stv6110x_set_frequency() 159 STV6110x_SETFIELD(stv6110x->regs[STV6110x_TNG0], TNG0_N_DIV_7_0, LSB(divider)); stv6110x_set_frequency() 162 STV6110x_SETFIELD(stv6110x->regs[STV6110x_STAT1], STAT1_CALVCO_STRT, 1); stv6110x_set_frequency() 164 stv6110x_write_reg(stv6110x, STV6110x_CTRL1, stv6110x->regs[STV6110x_CTRL1]); stv6110x_set_frequency() 165 stv6110x_write_reg(stv6110x, STV6110x_TNG1, stv6110x->regs[STV6110x_TNG1]); stv6110x_set_frequency() 166 stv6110x_write_reg(stv6110x, STV6110x_TNG0, stv6110x->regs[STV6110x_TNG0]); stv6110x_set_frequency() 167 stv6110x_write_reg(stv6110x, STV6110x_STAT1, stv6110x->regs[STV6110x_STAT1]); stv6110x_set_frequency() 170 stv6110x_read_reg(stv6110x, STV6110x_STAT1, &stv6110x->regs[STV6110x_STAT1]); stv6110x_set_frequency() 171 if (!STV6110x_GETFIELD(STAT1_CALVCO_STRT, stv6110x->regs[STV6110x_STAT1])) stv6110x_set_frequency() 183 stv6110x_read_reg(stv6110x, STV6110x_TNG1, &stv6110x->regs[STV6110x_TNG1]); stv6110x_get_frequency() 184 stv6110x_read_reg(stv6110x, STV6110x_TNG0, &stv6110x->regs[STV6110x_TNG0]); stv6110x_get_frequency() 186 *frequency = (MAKEWORD16(STV6110x_GETFIELD(TNG1_N_DIV_11_8, stv6110x->regs[STV6110x_TNG1]), stv6110x_get_frequency() 187 STV6110x_GETFIELD(TNG0_N_DIV_7_0, stv6110x->regs[STV6110x_TNG0]))) * REFCLOCK_kHz; stv6110x_get_frequency() 189 *frequency /= (1 << (STV6110x_GETFIELD(TNG1_R_DIV, stv6110x->regs[STV6110x_TNG1]) + stv6110x_get_frequency() 190 STV6110x_GETFIELD(TNG1_DIV4SEL, stv6110x->regs[STV6110x_TNG1]))); stv6110x_get_frequency() 206 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL3], CTRL3_CF, 31); /* LPF */ stv6110x_set_bandwidth() 208 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL3], CTRL3_CF, 0); /* LPF */ stv6110x_set_bandwidth() 210 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL3], CTRL3_CF, ((halfbw / 1000000) - 5)); /* LPF */ stv6110x_set_bandwidth() 213 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL3], CTRL3_RCCLK_OFF, 0x0); /* cal. clk activated */ stv6110x_set_bandwidth() 214 STV6110x_SETFIELD(stv6110x->regs[STV6110x_STAT1], STAT1_CALRC_STRT, 0x1); /* LPF auto cal */ stv6110x_set_bandwidth() 216 stv6110x_write_reg(stv6110x, STV6110x_CTRL3, stv6110x->regs[STV6110x_CTRL3]); stv6110x_set_bandwidth() 217 stv6110x_write_reg(stv6110x, STV6110x_STAT1, stv6110x->regs[STV6110x_STAT1]); stv6110x_set_bandwidth() 220 stv6110x_read_reg(stv6110x, STV6110x_STAT1, &stv6110x->regs[STV6110x_STAT1]); stv6110x_set_bandwidth() 221 if (!STV6110x_GETFIELD(STAT1_CALRC_STRT, stv6110x->regs[STV6110x_STAT1])) stv6110x_set_bandwidth() 225 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL3], CTRL3_RCCLK_OFF, 0x1); /* cal. done */ stv6110x_set_bandwidth() 226 stv6110x_write_reg(stv6110x, STV6110x_CTRL3, stv6110x->regs[STV6110x_CTRL3]); stv6110x_set_bandwidth() 235 stv6110x_read_reg(stv6110x, STV6110x_CTRL3, &stv6110x->regs[STV6110x_CTRL3]); stv6110x_get_bandwidth() 236 *bandwidth = (STV6110x_GETFIELD(CTRL3_CF, stv6110x->regs[STV6110x_CTRL3]) + 5) * 2000000; stv6110x_get_bandwidth() 249 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 0); stv6110x_set_refclock() 252 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 1); stv6110x_set_refclock() 255 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 2); stv6110x_set_refclock() 259 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 3); stv6110x_set_refclock() 262 stv6110x_write_reg(stv6110x, STV6110x_CTRL2, stv6110x->regs[STV6110x_CTRL2]); stv6110x_set_refclock() 271 stv6110x_read_reg(stv6110x, STV6110x_CTRL2, &stv6110x->regs[STV6110x_CTRL2]); stv6110x_get_bbgain() 272 *gain = 2 * STV6110x_GETFIELD(CTRL2_BBGAIN, stv6110x->regs[STV6110x_CTRL2]); stv6110x_get_bbgain() 281 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_BBGAIN, gain / 2); stv6110x_set_bbgain() 282 stv6110x_write_reg(stv6110x, STV6110x_CTRL2, stv6110x->regs[STV6110x_CTRL2]); stv6110x_set_bbgain() 294 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_SYN, 0); stv6110x_set_mode() 295 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_RX, 0); stv6110x_set_mode() 296 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_LPT, 0); stv6110x_set_mode() 300 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_SYN, 1); stv6110x_set_mode() 301 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_RX, 1); stv6110x_set_mode() 302 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL1], CTRL1_LPT, 1); stv6110x_set_mode() 306 ret = stv6110x_write_reg(stv6110x, STV6110x_CTRL1, stv6110x->regs[STV6110x_CTRL1]); stv6110x_set_mode() 327 stv6110x_read_reg(stv6110x, STV6110x_STAT1, &stv6110x->regs[STV6110x_STAT1]); stv6110x_get_status() 329 if (STV6110x_GETFIELD(STAT1_LOCK, stv6110x->regs[STV6110x_STAT1])) stv6110x_get_status() 386 memcpy(stv6110x->regs, default_regs, 8); stv6110x_attach() 392 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 0); stv6110x_attach() 395 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 1); stv6110x_attach() 398 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 2); stv6110x_attach() 402 STV6110x_SETFIELD(stv6110x->regs[STV6110x_CTRL2], CTRL2_CO_DIV, 3); stv6110x_attach()
|
/linux-4.1.27/drivers/media/platform/exynos4-is/ |
H A D | fimc-lite-reg.c | 28 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_reset() 30 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_reset() 33 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_reset() 40 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_reset() 45 u32 cfg = readl(dev->regs + FLITE_REG_CISTATUS); flite_hw_clear_pending_irq() 47 writel(cfg, dev->regs + FLITE_REG_CISTATUS); flite_hw_clear_pending_irq() 52 u32 intsrc = readl(dev->regs + FLITE_REG_CISTATUS); flite_hw_get_interrupt_source() 59 u32 cfg = readl(dev->regs + FLITE_REG_CISTATUS2); flite_hw_clear_last_capture_end() 61 writel(cfg, dev->regs + FLITE_REG_CISTATUS2); flite_hw_clear_last_capture_end() 80 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_interrupt_mask() 83 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_interrupt_mask() 88 u32 cfg = readl(dev->regs + FLITE_REG_CIIMGCPT); flite_hw_capture_start() 90 writel(cfg, dev->regs + FLITE_REG_CIIMGCPT); flite_hw_capture_start() 95 u32 cfg = readl(dev->regs + FLITE_REG_CIIMGCPT); flite_hw_capture_stop() 97 writel(cfg, dev->regs + FLITE_REG_CIIMGCPT); flite_hw_capture_stop() 106 u32 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_test_pattern() 111 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_test_pattern() 147 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_source_format() 150 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_source_format() 152 cfg = readl(dev->regs + FLITE_REG_CISRCSIZE); flite_hw_set_source_format() 157 writel(cfg, dev->regs + FLITE_REG_CISRCSIZE); flite_hw_set_source_format() 166 cfg = readl(dev->regs + FLITE_REG_CIWDOFST); flite_hw_set_window_offset() 170 writel(cfg, dev->regs + FLITE_REG_CIWDOFST); flite_hw_set_window_offset() 176 writel(cfg, dev->regs + FLITE_REG_CIWDOFST2); flite_hw_set_window_offset() 182 u32 cfg = readl(dev->regs + FLITE_REG_CIGENERAL); flite_hw_set_camera_port() 187 writel(cfg, dev->regs + FLITE_REG_CIGENERAL); flite_hw_set_camera_port() 194 u32 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_camera_bus() 215 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_camera_bus() 222 u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); flite_hw_set_pack12() 229 writel(cfg, dev->regs + FLITE_REG_CIODMAFMT); flite_hw_set_pack12() 240 u32 cfg = readl(dev->regs + FLITE_REG_CIODMAFMT); flite_hw_set_out_order() 247 writel(cfg | pixcode[i][1], dev->regs + FLITE_REG_CIODMAFMT); flite_hw_set_out_order() 255 cfg = readl(dev->regs + FLITE_REG_CIOCAN); flite_hw_set_dma_window() 258 writel(cfg, dev->regs + FLITE_REG_CIOCAN); flite_hw_set_dma_window() 261 cfg = readl(dev->regs + FLITE_REG_CIOOFF); flite_hw_set_dma_window() 264 writel(cfg, dev->regs + FLITE_REG_CIOOFF); flite_hw_set_dma_window() 278 writel(buf->paddr, dev->regs + FLITE_REG_CIOSA); flite_hw_set_dma_buffer() 280 writel(buf->paddr, dev->regs + FLITE_REG_CIOSAN(index - 1)); flite_hw_set_dma_buffer() 282 cfg = readl(dev->regs + FLITE_REG_CIFCNTSEQ); flite_hw_set_dma_buffer() 284 writel(cfg, dev->regs + FLITE_REG_CIFCNTSEQ); flite_hw_set_dma_buffer() 294 cfg = readl(dev->regs + FLITE_REG_CIFCNTSEQ); flite_hw_mask_dma_buffer() 296 writel(cfg, dev->regs + FLITE_REG_CIFCNTSEQ); flite_hw_mask_dma_buffer() 303 u32 cfg = readl(dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_output_dma() 307 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_output_dma() 312 writel(cfg, dev->regs + FLITE_REG_CIGCTRL); flite_hw_set_output_dma() 345 u32 cfg = readl(dev->regs + registers[i].offset); flite_hw_dump_regs()
|
/linux-4.1.27/arch/metag/kernel/ |
H A D | ptrace.c | 27 int metag_gp_regs_copyout(const struct pt_regs *regs, metag_gp_regs_copyout() argument 37 regs->ctx.DX, 0, 4*16); metag_gp_regs_copyout() 42 regs->ctx.AX, 4*16, 4*20); metag_gp_regs_copyout() 46 if (regs->ctx.SaveMask & TBICTX_XEXT_BIT) metag_gp_regs_copyout() 47 ptr = regs->ctx.Ext.Ctx.pExt; metag_gp_regs_copyout() 49 ptr = ®s->ctx.Ext.AX2; metag_gp_regs_copyout() 56 ®s->ctx.AX3, 4*22, 4*24); metag_gp_regs_copyout() 61 ®s->ctx.CurrPC, 4*24, 4*25); metag_gp_regs_copyout() 65 data = (unsigned long)regs->ctx.Flags; metag_gp_regs_copyout() 66 if (regs->ctx.SaveMask & TBICTX_CBUF_BIT) metag_gp_regs_copyout() 74 ®s->ctx.CurrRPT, 4*26, 4*29); metag_gp_regs_copyout() 84 int metag_gp_regs_copyin(struct pt_regs *regs, metag_gp_regs_copyin() argument 94 regs->ctx.DX, 0, 4*16); metag_gp_regs_copyin() 99 regs->ctx.AX, 4*16, 4*20); metag_gp_regs_copyin() 103 if (regs->ctx.SaveMask & TBICTX_XEXT_BIT) metag_gp_regs_copyin() 104 ptr = regs->ctx.Ext.Ctx.pExt; metag_gp_regs_copyin() 106 ptr = ®s->ctx.Ext.AX2; metag_gp_regs_copyin() 113 ®s->ctx.AX3, 4*22, 4*24); metag_gp_regs_copyin() 118 ®s->ctx.CurrPC, 4*24, 4*25); metag_gp_regs_copyin() 126 regs->ctx.Flags = data & 0xffff; metag_gp_regs_copyin() 128 regs->ctx.SaveMask |= TBICTX_XCBF_BIT | TBICTX_CBUF_BIT; metag_gp_regs_copyin() 130 regs->ctx.SaveMask &= ~TBICTX_CBUF_BIT; metag_gp_regs_copyin() 133 ®s->ctx.CurrRPT, 4*26, 4*29); metag_gp_regs_copyin() 143 const struct pt_regs *regs = task_pt_regs(target); metag_gp_regs_get() local 144 return metag_gp_regs_copyout(regs, pos, count, kbuf, ubuf); metag_gp_regs_get() 152 struct pt_regs *regs = task_pt_regs(target); metag_gp_regs_set() local 153 return metag_gp_regs_copyin(regs, pos, count, kbuf, ubuf); metag_gp_regs_set() 156 int metag_cb_regs_copyout(const struct pt_regs *regs, metag_cb_regs_copyout() argument 163 if (regs->ctx.SaveMask & TBICTX_XCBF_BIT) metag_cb_regs_copyout() 165 regs->extcb0, 0, 4*4); metag_cb_regs_copyout() 172 int metag_cb_regs_copyin(struct pt_regs *regs, metag_cb_regs_copyin() argument 180 regs->extcb0, 0, 4*4); metag_cb_regs_copyin() 189 const struct pt_regs *regs = task_pt_regs(target); metag_cb_regs_get() local 190 return metag_cb_regs_copyout(regs, pos, count, kbuf, ubuf); metag_cb_regs_get() 198 struct pt_regs *regs = task_pt_regs(target); metag_cb_regs_set() local 199 return metag_cb_regs_copyin(regs, pos, count, kbuf, ubuf); metag_cb_regs_set() 202 int metag_rp_state_copyout(const struct pt_regs *regs, metag_rp_state_copyout() argument 211 if (!(regs->ctx.SaveMask & TBICTX_CBRP_BIT)) { metag_rp_state_copyout() 217 mask = (regs->ctx.CurrDIVTIME & TXDIVTIME_RPMASK_BITS) >> metag_rp_state_copyout() 221 ptr = (void *)®s->extcb0[1]; metag_rp_state_copyout() 239 int metag_rp_state_copyin(struct pt_regs *regs, metag_rp_state_copyin() argument 254 ptr = (void *)®s->extcb0[1]; metag_rp_state_copyin() 260 regs->ctx.CurrDIVTIME &= ~TXDIVTIME_RPMASK_BITS; metag_rp_state_copyin() 261 regs->ctx.CurrDIVTIME |= (rp.mask << TXDIVTIME_RPMASK_S) metag_rp_state_copyin() 266 regs->ctx.SaveMask |= TBICTX_XCBF_BIT | TBICTX_CBRP_BIT; metag_rp_state_copyin() 268 regs->ctx.SaveMask &= ~TBICTX_CBRP_BIT; metag_rp_state_copyin() 278 const struct pt_regs *regs = task_pt_regs(target); metag_rp_state_get() local 279 return metag_rp_state_copyout(regs, pos, count, kbuf, ubuf); metag_rp_state_get() 287 struct pt_regs *regs = task_pt_regs(target); metag_rp_state_set() local 288 return metag_rp_state_copyin(regs, pos, count, kbuf, ubuf); metag_rp_state_set() 394 int syscall_trace_enter(struct pt_regs *regs) syscall_trace_enter() argument 399 ret = tracehook_report_syscall_entry(regs); syscall_trace_enter() 402 trace_sys_enter(regs, regs->ctx.DX[0].U1); syscall_trace_enter() 404 return ret ? -1 : regs->ctx.DX[0].U1; syscall_trace_enter() 407 void syscall_trace_leave(struct pt_regs *regs) syscall_trace_leave() argument 410 trace_sys_exit(regs, regs->ctx.DX[0].U1); syscall_trace_leave() 413 tracehook_report_syscall_exit(regs, 0); syscall_trace_leave()
|
H A D | signal.c | 45 static int restore_sigcontext(struct pt_regs *regs, restore_sigcontext() argument 53 err = metag_gp_regs_copyin(regs, 0, sizeof(struct user_gp_regs), NULL, restore_sigcontext() 54 &sc->regs); restore_sigcontext() 56 err = metag_cb_regs_copyin(regs, 0, restore_sigcontext() 60 err = metag_rp_state_copyin(regs, 0, restore_sigcontext() 65 regs->REG_FLAGS |= TBICTX_PRIV_BIT; restore_sigcontext() 73 struct pt_regs *regs = current_pt_regs(); sys_rt_sigreturn() local 77 frame = (__force struct rt_sigframe __user *)(regs->REG_SP - sys_rt_sigreturn() 88 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) sys_rt_sigreturn() 94 return regs->REG_RETVAL; sys_rt_sigreturn() 102 static int setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, setup_sigcontext() argument 107 err = metag_gp_regs_copyout(regs, 0, sizeof(struct user_gp_regs), NULL, setup_sigcontext() 108 &sc->regs); setup_sigcontext() 111 err = metag_cb_regs_copyout(regs, 0, setup_sigcontext() 115 err = metag_rp_state_copyout(regs, 0, setup_sigcontext() 127 regs->REG_FLAGS &= ~(TBICTX_XCBF_BIT | TBICTX_CBUF_BIT | setup_sigcontext() 133 regs->ctx.Flags &= ~TXSTATUS_LSM_STEP_BITS; setup_sigcontext() 152 struct pt_regs *regs) setup_rt_frame() 158 frame = get_sigframe(ksig, regs->REG_SP); setup_rt_frame() 167 err |= __save_altstack(&frame->uc.uc_stack, regs->REG_SP); setup_rt_frame() 169 regs, set->sig[0]); setup_rt_frame() 189 regs->REG_RTP = (unsigned long) frame->retcode; setup_rt_frame() 190 regs->REG_SP = (unsigned long) frame + sizeof(*frame); setup_rt_frame() 191 regs->REG_ARG1 = ksig->sig; setup_rt_frame() 192 regs->REG_ARG2 = (unsigned long) &frame->info; setup_rt_frame() 193 regs->REG_ARG3 = (unsigned long) &frame->uc; setup_rt_frame() 194 regs->REG_PC = (unsigned long) ksig->ka.sa.sa_handler; setup_rt_frame() 197 current->comm, current->pid, frame, regs->REG_PC, setup_rt_frame() 198 regs->REG_RTP); setup_rt_frame() 203 flush_cache_sigtramp(regs->REG_RTP, sizeof(frame->retcode)); setup_rt_frame() 208 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 214 ret = setup_rt_frame(ksig, oldset, regs); handle_signal() 226 static int do_signal(struct pt_regs *regs, int syscall) do_signal() argument 243 continue_addr = regs->REG_PC; do_signal() 245 retval = regs->REG_RETVAL; do_signal() 258 regs->REG_PC = restart_addr; do_signal() 274 if (regs->REG_PC != restart_addr) do_signal() 282 regs->REG_RETVAL = -EINTR; do_signal() 283 regs->REG_PC = continue_addr; do_signal() 288 handle_signal(&ksig, regs); do_signal() 294 regs->REG_SYSCALL = __NR_restart_syscall; do_signal() 304 int do_work_pending(struct pt_regs *regs, unsigned int thread_flags, do_work_pending() argument 311 if (unlikely(!user_mode(regs))) do_work_pending() 315 int restart = do_signal(regs, syscall); do_work_pending() 327 tracehook_notify_resume(regs); do_work_pending() 151 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument
|
/linux-4.1.27/arch/um/include/shared/ |
H A D | registers.h | 16 extern int save_registers(int pid, struct uml_pt_regs *regs); 17 extern int restore_registers(int pid, struct uml_pt_regs *regs); 19 extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs); 21 extern int get_fp_registers(int pid, unsigned long *regs); 22 extern int put_fp_registers(int pid, unsigned long *regs);
|
/linux-4.1.27/arch/arc/kernel/ |
H A D | signal.c | 26 * -In stash_usr_regs( ) and restore_usr_regs( ), save/restore of user regs 66 stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs, stash_usr_regs() argument 70 err = __copy_to_user(&(sf->uc.uc_mcontext.regs.scratch), regs, stash_usr_regs() 71 sizeof(sf->uc.uc_mcontext.regs.scratch)); stash_usr_regs() 77 static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf) restore_usr_regs() argument 86 err |= __copy_from_user(regs, &(sf->uc.uc_mcontext.regs.scratch), restore_usr_regs() 87 sizeof(sf->uc.uc_mcontext.regs.scratch)); restore_usr_regs() 104 struct pt_regs *regs = current_pt_regs(); SYSCALL_DEFINE0() local 113 if (regs->sp & 3) SYSCALL_DEFINE0() 116 sf = (struct rt_sigframe __force __user *)(regs->sp); SYSCALL_DEFINE0() 128 if (restore_usr_regs(regs, sf)) SYSCALL_DEFINE0() 132 syscall_wont_restart(regs); SYSCALL_DEFINE0() 136 * regs saved on user stack got fudged between save and sigreturn) SYSCALL_DEFINE0() 141 regs->status32 |= STATUS_U_MASK; SYSCALL_DEFINE0() 143 return regs->r0; SYSCALL_DEFINE0() 154 struct pt_regs *regs, get_sigframe() 157 unsigned long sp = sigsp(regs->sp, ksig); get_sigframe() 175 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) setup_rt_frame() argument 181 sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); setup_rt_frame() 192 err |= stash_usr_regs(sf, regs, set); setup_rt_frame() 204 err |= __save_altstack(&sf->uc.uc_stack, regs->sp); setup_rt_frame() 207 regs->r1 = (unsigned long)&sf->info; setup_rt_frame() 208 regs->r2 = (unsigned long)&sf->uc; setup_rt_frame() 222 regs->r0 = ksig->sig; setup_rt_frame() 225 regs->ret = (unsigned long)ksig->ka.sa.sa_handler; setup_rt_frame() 234 regs->blink = (unsigned long)ksig->ka.sa.sa_restorer; setup_rt_frame() 237 regs->sp = (unsigned long)sf; setup_rt_frame() 243 regs->status32 &= ~STATUS_DE_MASK; setup_rt_frame() 244 regs->status32 |= STATUS_L_MASK; setup_rt_frame() 249 static void arc_restart_syscall(struct k_sigaction *ka, struct pt_regs *regs) arc_restart_syscall() argument 251 switch (regs->r0) { arc_restart_syscall() 260 regs->r0 = -EINTR; /* ERESTART_xxx is internal */ arc_restart_syscall() 270 regs->r0 = -EINTR; arc_restart_syscall() 286 regs->r0 = regs->orig_r0; arc_restart_syscall() 287 regs->ret -= 4; arc_restart_syscall() 296 handle_signal(struct ksignal *ksig, struct pt_regs *regs) handle_signal() argument 302 failed = setup_rt_frame(ksig, oldset, regs); handle_signal() 307 void do_signal(struct pt_regs *regs) do_signal() argument 312 restart_scall = in_syscall(regs) && syscall_restartable(regs); do_signal() 316 arc_restart_syscall(&ksig.ka, regs); do_signal() 317 syscall_wont_restart(regs); /* No more restarts */ do_signal() 319 handle_signal(&ksig, regs); do_signal() 325 if (regs->r0 == -ERESTARTNOHAND || do_signal() 326 regs->r0 == -ERESTARTSYS || regs->r0 == -ERESTARTNOINTR) { do_signal() 327 regs->r0 = regs->orig_r0; do_signal() 328 regs->ret -= 4; do_signal() 329 } else if (regs->r0 == -ERESTART_RESTARTBLOCK) { do_signal() 330 regs->r8 = __NR_restart_syscall; do_signal() 331 regs->ret -= 4; do_signal() 333 syscall_wont_restart(regs); /* No more restarts */ do_signal() 340 void do_notify_resume(struct pt_regs *regs) do_notify_resume() argument 347 tracehook_notify_resume(regs); do_notify_resume() 153 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesize) get_sigframe() argument
|
/linux-4.1.27/tools/perf/arch/arm/tests/ |
H A D | dwarf-unwind.c | 12 struct thread *thread, u64 *regs) sample_ustack() 25 sp = (unsigned long) regs[PERF_REG_ARM_SP]; sample_ustack() 46 struct regs_dump *regs = &sample->user_regs; test__arch_unwind_sample() local 56 regs->abi = PERF_SAMPLE_REGS_ABI; test__arch_unwind_sample() 57 regs->regs = buf; test__arch_unwind_sample() 58 regs->mask = PERF_REGS_MASK; test__arch_unwind_sample() 11 sample_ustack(struct perf_sample *sample, struct thread *thread, u64 *regs) sample_ustack() argument
|
/linux-4.1.27/tools/perf/arch/x86/tests/ |
H A D | dwarf-unwind.c | 12 struct thread *thread, u64 *regs) sample_ustack() 25 sp = (unsigned long) regs[PERF_REG_X86_SP]; sample_ustack() 46 struct regs_dump *regs = &sample->user_regs; test__arch_unwind_sample() local 56 regs->abi = PERF_SAMPLE_REGS_ABI; test__arch_unwind_sample() 57 regs->regs = buf; test__arch_unwind_sample() 58 regs->mask = PERF_REGS_MASK; test__arch_unwind_sample() 11 sample_ustack(struct perf_sample *sample, struct thread *thread, u64 *regs) sample_ustack() argument
|
/linux-4.1.27/arch/x86/kernel/kprobes/ |
H A D | ftrace.c | 29 int __skip_singlestep(struct kprobe *p, struct pt_regs *regs, __skip_singlestep() argument 33 * Emulate singlestep (and also recover regs->ip) __skip_singlestep() 36 regs->ip = (unsigned long)p->addr + MCOUNT_INSN_SIZE; __skip_singlestep() 39 p->post_handler(p, regs, 0); __skip_singlestep() 43 regs->ip = orig_ip; __skip_singlestep() 47 int skip_singlestep(struct kprobe *p, struct pt_regs *regs, skip_singlestep() argument 51 return __skip_singlestep(p, regs, kcb, 0); skip_singlestep() 59 struct ftrace_ops *ops, struct pt_regs *regs) kprobe_ftrace_handler() 76 unsigned long orig_ip = regs->ip; kprobe_ftrace_handler() 77 /* Kprobe handler expects regs->ip = ip + 1 as breakpoint hit */ kprobe_ftrace_handler() 78 regs->ip = ip + sizeof(kprobe_opcode_t); kprobe_ftrace_handler() 82 if (!p->pre_handler || !p->pre_handler(p, regs)) kprobe_ftrace_handler() 83 __skip_singlestep(p, regs, kcb, orig_ip); kprobe_ftrace_handler() 85 * If pre_handler returns !0, it sets regs->ip and kprobe_ftrace_handler() 58 kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *ops, struct pt_regs *regs) kprobe_ftrace_handler() argument
|
/linux-4.1.27/drivers/net/hippi/ |
H A D | rrunner.c | 148 * Remap the MMIO regs into kernel space. rr_init_one() 150 rrpriv->regs = pci_iomap(pdev, 0, 0x1000); rr_init_one() 151 if (!rrpriv->regs) { rr_init_one() 189 writel(readl(&rrpriv->regs->HostCtrl) | NO_SWAP, rr_init_one() 190 &rrpriv->regs->HostCtrl); rr_init_one() 213 if (rrpriv->regs) rr_init_one() 214 pci_iounmap(pdev, rrpriv->regs); rr_init_one() 228 if (!(readl(&rr->regs->HostCtrl) & NIC_HALTED)) { rr_remove_one() 231 writel(HALT_NIC, &rr->regs->HostCtrl); rr_remove_one() 241 pci_iounmap(pdev, rr->regs); rr_remove_one() 254 struct rr_regs __iomem *regs; rr_issue_cmd() local 257 regs = rrpriv->regs; rr_issue_cmd() 262 if (readl(®s->HostCtrl) & NIC_HALTED){ rr_issue_cmd() 264 "HostCtrl %08x\n", cmd->code, readl(®s->HostCtrl)); rr_issue_cmd() 265 if (readl(®s->Mode) & FATAL_ERR) rr_issue_cmd() 267 readl(®s->Fail1), readl(®s->Fail2)); rr_issue_cmd() 272 writel(*(u32*)(cmd), ®s->CmdRing[idx]); rr_issue_cmd() 279 if (readl(®s->Mode) & FATAL_ERR) rr_issue_cmd() 280 printk("error code %02x\n", readl(®s->Fail1)); rr_issue_cmd() 291 struct rr_regs __iomem *regs; rr_reset() local 296 regs = rrpriv->regs; rr_reset() 300 writel(0x01000000, ®s->TX_state); rr_reset() 301 writel(0xff800000, ®s->RX_state); rr_reset() 302 writel(0, ®s->AssistState); rr_reset() 303 writel(CLEAR_INTA, ®s->LocalCtrl); rr_reset() 304 writel(0x01, ®s->BrkPt); rr_reset() 305 writel(0, ®s->Timer); rr_reset() 306 writel(0, ®s->TimerRef); rr_reset() 307 writel(RESET_DMA, ®s->DmaReadState); rr_reset() 308 writel(RESET_DMA, ®s->DmaWriteState); rr_reset() 309 writel(0, ®s->DmaWriteHostHi); rr_reset() 310 writel(0, ®s->DmaWriteHostLo); rr_reset() 311 writel(0, ®s->DmaReadHostHi); rr_reset() 312 writel(0, ®s->DmaReadHostLo); rr_reset() 313 writel(0, ®s->DmaReadLen); rr_reset() 314 writel(0, ®s->DmaWriteLen); rr_reset() 315 writel(0, ®s->DmaWriteLcl); rr_reset() 316 writel(0, ®s->DmaWriteIPchecksum); rr_reset() 317 writel(0, ®s->DmaReadLcl); rr_reset() 318 writel(0, ®s->DmaReadIPchecksum); rr_reset() 319 writel(0, ®s->PciState); rr_reset() 321 writel(SWAP_DATA | PTR64BIT | PTR_WD_SWAP, ®s->Mode); rr_reset() 323 writel(SWAP_DATA | PTR64BIT | PTR_WD_NOSWAP, ®s->Mode); rr_reset() 325 writel(SWAP_DATA | PTR32BIT | PTR_WD_NOSWAP, ®s->Mode); rr_reset() 332 writel(0xdf000, ®s->RxBase); rr_reset() 333 writel(0xdf000, ®s->RxPrd); rr_reset() 334 writel(0xdf000, ®s->RxCon); rr_reset() 335 writel(0xce000, ®s->TxBase); rr_reset() 336 writel(0xce000, ®s->TxPrd); rr_reset() 337 writel(0xce000, ®s->TxCon); rr_reset() 338 writel(0, ®s->RxIndPro); rr_reset() 339 writel(0, ®s->RxIndCon); rr_reset() 340 writel(0, ®s->RxIndRef); rr_reset() 341 writel(0, ®s->TxIndPro); rr_reset() 342 writel(0, ®s->TxIndCon); rr_reset() 343 writel(0, ®s->TxIndRef); rr_reset() 344 writel(0xcc000, ®s->pad10[0]); rr_reset() 345 writel(0, ®s->DrCmndPro); rr_reset() 346 writel(0, ®s->DrCmndCon); rr_reset() 347 writel(0, ®s->DwCmndPro); rr_reset() 348 writel(0, ®s->DwCmndCon); rr_reset() 349 writel(0, ®s->DwCmndRef); rr_reset() 350 writel(0, ®s->DrDataPro); rr_reset() 351 writel(0, ®s->DrDataCon); rr_reset() 352 writel(0, ®s->DrDataRef); rr_reset() 353 writel(0, ®s->DwDataPro); rr_reset() 354 writel(0, ®s->DwDataCon); rr_reset() 355 writel(0, ®s->DwDataRef); rr_reset() 358 writel(0xffffffff, ®s->MbEvent); rr_reset() 359 writel(0, ®s->Event); rr_reset() 361 writel(0, ®s->TxPi); rr_reset() 362 writel(0, ®s->IpRxPi); rr_reset() 364 writel(0, ®s->EvtCon); rr_reset() 365 writel(0, ®s->EvtPrd); rr_reset() 370 writel(0, ®s->CmdRing[i]); rr_reset() 375 writel(RBURST_64|WBURST_64, ®s->PciState); rr_reset() 386 writel(start_pc + 0x800, ®s->Pc); rr_reset() 390 writel(start_pc, ®s->Pc); rr_reset() 405 struct rr_regs __iomem *regs = rrpriv->regs; rr_read_eeprom() local 408 io = readl(®s->ExtIo); rr_read_eeprom() 409 writel(0, ®s->ExtIo); rr_read_eeprom() 410 misc = readl(®s->LocalCtrl); rr_read_eeprom() 411 writel(0, ®s->LocalCtrl); rr_read_eeprom() 412 host = readl(®s->HostCtrl); rr_read_eeprom() 413 writel(host | HALT_NIC, ®s->HostCtrl); rr_read_eeprom() 417 writel((EEPROM_BASE + ((offset+i) << 3)), ®s->WinBase); rr_read_eeprom() 419 buf[i] = (readl(®s->WinData) >> 24) & 0xff; rr_read_eeprom() 423 writel(host, ®s->HostCtrl); rr_read_eeprom() 424 writel(misc, ®s->LocalCtrl); rr_read_eeprom() 425 writel(io, ®s->ExtIo); rr_read_eeprom() 457 struct rr_regs __iomem *regs = rrpriv->regs; write_eeprom() local 460 io = readl(®s->ExtIo); write_eeprom() 461 writel(0, ®s->ExtIo); write_eeprom() 462 misc = readl(®s->LocalCtrl); write_eeprom() 463 writel(ENABLE_EEPROM_WRITE, ®s->LocalCtrl); write_eeprom() 467 writel((EEPROM_BASE + ((offset+i) << 3)), ®s->WinBase); write_eeprom() 474 if ((readl(®s->WinData) & 0xff000000) != data){ write_eeprom() 475 writel(data, ®s->WinData); write_eeprom() 481 if ((readl(®s->WinData) & 0xff000000) == write_eeprom() 488 readl(®s->WinData)); write_eeprom() 496 writel(misc, ®s->LocalCtrl); write_eeprom() 497 writel(io, ®s->ExtIo); write_eeprom() 507 struct rr_regs __iomem *regs; rr_init() local 511 regs = rrpriv->regs; rr_init() 513 rev = readl(®s->FwRev); rr_init() 529 printk(" Maximum receive rings %i\n", readl(®s->MaxRxRng)); rr_init() 558 struct rr_regs __iomem *regs; rr_init1() local 566 regs = rrpriv->regs; rr_init1() 570 hostctrl = readl(®s->HostCtrl); rr_init1() 571 writel(hostctrl | HALT_NIC | RR_CLEAR_INT, ®s->HostCtrl); rr_init1() 582 set_rxaddr(regs, rrpriv->rx_ctrl_dma); rr_init1() 583 set_infoaddr(regs, rrpriv->info_dma); rr_init1() 597 writel(0, ®s->CmdRing[i]); rr_init1() 624 writel(0x5000, ®s->ConRetry); rr_init1() 625 writel(0x100, ®s->ConRetryTmr); rr_init1() 626 writel(0x500000, ®s->ConTmout); rr_init1() 627 writel(0x60, ®s->IntrTmr); rr_init1() 628 writel(0x500000, ®s->TxDataMvTimeout); rr_init1() 629 writel(0x200000, ®s->RxDataMvTimeout); rr_init1() 630 writel(0x80, ®s->WriteDmaThresh); rr_init1() 631 writel(0x80, ®s->ReadDmaThresh); rr_init1() 637 writel(hostctrl, ®s->HostCtrl); rr_init1() 728 struct rr_regs __iomem *regs; rr_handle_event() local 732 regs = rrpriv->regs; rr_handle_event() 737 tmp = readl(®s->FwRev); rr_handle_event() 742 writel(RX_RING_ENTRIES - 1, ®s->IpRxPi); rr_handle_event() 762 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 763 ®s->HostCtrl); rr_handle_event() 769 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 770 ®s->HostCtrl); rr_handle_event() 793 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 794 ®s->HostCtrl); rr_handle_event() 805 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 806 ®s->HostCtrl); rr_handle_event() 812 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 813 ®s->HostCtrl); rr_handle_event() 819 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 820 ®s->HostCtrl); rr_handle_event() 826 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 827 ®s->HostCtrl); rr_handle_event() 880 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 881 ®s->HostCtrl); rr_handle_event() 887 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 888 ®s->HostCtrl); rr_handle_event() 894 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_handle_event() 895 ®s->HostCtrl); rr_handle_event() 931 struct rr_regs __iomem *regs = rrpriv->regs; rx_int() local 1011 writel(index, ®s->IpRxPi); rx_int() 1024 struct rr_regs __iomem *regs; rr_interrupt() local 1029 regs = rrpriv->regs; rr_interrupt() 1031 if (!(readl(®s->HostCtrl) & RR_INT)) rr_interrupt() 1036 prodidx = readl(®s->EvtPrd); rr_interrupt() 1099 writel(eidx, ®s->EvtCon); rr_interrupt() 1153 struct rr_regs __iomem *regs = rrpriv->regs; rr_timer() local 1156 if (readl(®s->HostCtrl) & NIC_HALTED){ rr_timer() 1167 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, rr_timer() 1168 ®s->HostCtrl); rr_timer() 1181 struct rr_regs __iomem *regs; rr_open() local 1186 regs = rrpriv->regs; rr_open() 1216 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, ®s->HostCtrl); rr_open() 1217 readl(®s->HostCtrl); rr_open() 1244 writel(readl(®s->HostCtrl)|HALT_NIC|RR_CLEAR_INT, ®s->HostCtrl); rr_open() 1267 struct rr_regs __iomem *regs; rr_dump() local 1273 regs = rrpriv->regs; rr_dump() 1278 readl(®s->RxPrd), readl(®s->TxPrd), rr_dump() 1279 readl(®s->EvtPrd), readl(®s->TxPi), rr_dump() 1282 printk("Error code 0x%x\n", readl(®s->Fail1)); rr_dump() 1284 index = (((readl(®s->EvtPrd) >> 8) & 0xff) - 1) % TX_RING_ENTRIES; rr_dump() 1330 struct rr_regs __iomem *regs = rrpriv->regs; rr_close() local 1345 tmp = readl(®s->HostCtrl); rr_close() 1351 writel(tmp, ®s->HostCtrl); rr_close() 1352 readl(®s->HostCtrl); rr_close() 1359 writel(0, ®s->TxPi); rr_close() 1360 writel(0, ®s->IpRxPi); rr_close() 1362 writel(0, ®s->EvtCon); rr_close() 1363 writel(0, ®s->EvtPrd); rr_close() 1366 writel(0, ®s->CmdRing[i]); rr_close() 1395 struct rr_regs __iomem *regs = rrpriv->regs; rr_start_xmit() local 1403 if (readl(®s->Mode) & FATAL_ERR) rr_start_xmit() 1405 readl(®s->Fail1), readl(®s->Fail2)); rr_start_xmit() 1447 writel(txctrl->pi, ®s->TxPi); rr_start_xmit() 1470 struct rr_regs __iomem *regs; rr_load_firmware() local 1477 regs = rrpriv->regs; rr_load_firmware() 1482 if (!(readl(®s->HostCtrl) & NIC_HALTED)){ rr_load_firmware() 1488 localctrl = readl(®s->LocalCtrl); rr_load_firmware() 1489 writel(0, ®s->LocalCtrl); rr_load_firmware() 1491 writel(0, ®s->EvtPrd); rr_load_firmware() 1492 writel(0, ®s->RxPrd); rr_load_firmware() 1493 writel(0, ®s->TxPrd); rr_load_firmware() 1500 io = readl(®s->ExtIo); rr_load_firmware() 1501 writel(0, ®s->ExtIo); rr_load_firmware() 1505 writel(i * 4, ®s->WinBase); rr_load_firmware() 1507 writel(0, ®s->WinData); rr_load_firmware() 1510 writel(io, ®s->ExtIo); rr_load_firmware() 1556 writel(sptr, ®s->WinBase); rr_load_firmware() 1558 writel(tmp, ®s->WinData); rr_load_firmware() 1566 writel(localctrl, ®s->LocalCtrl); rr_load_firmware()
|
/linux-4.1.27/drivers/gpu/drm/gma500/ |
H A D | oaktrail_device.c | 192 struct psb_save_area *regs = &dev_priv->regs; oaktrail_save_display_registers() local 193 struct psb_pipe *p = ®s->pipe[0]; oaktrail_save_display_registers() 198 regs->psb.saveDSPARB = PSB_RVDC32(DSPARB); oaktrail_save_display_registers() 199 regs->psb.saveDSPFW1 = PSB_RVDC32(DSPFW1); oaktrail_save_display_registers() 200 regs->psb.saveDSPFW2 = PSB_RVDC32(DSPFW2); oaktrail_save_display_registers() 201 regs->psb.saveDSPFW3 = PSB_RVDC32(DSPFW3); oaktrail_save_display_registers() 202 regs->psb.saveDSPFW4 = PSB_RVDC32(DSPFW4); oaktrail_save_display_registers() 203 regs->psb.saveDSPFW5 = PSB_RVDC32(DSPFW5); oaktrail_save_display_registers() 204 regs->psb.saveDSPFW6 = PSB_RVDC32(DSPFW6); oaktrail_save_display_registers() 205 regs->psb.saveCHICKENBIT = PSB_RVDC32(DSPCHICKENBIT); oaktrail_save_display_registers() 219 regs->psb.saveBCLRPAT_A = PSB_RVDC32(BCLRPAT_A); oaktrail_save_display_registers() 227 /* Save cursor regs */ oaktrail_save_display_registers() 228 regs->psb.saveDSPACURSOR_CTRL = PSB_RVDC32(CURACNTR); oaktrail_save_display_registers() 229 regs->psb.saveDSPACURSOR_BASE = PSB_RVDC32(CURABASE); oaktrail_save_display_registers() 230 regs->psb.saveDSPACURSOR_POS = PSB_RVDC32(CURAPOS); oaktrail_save_display_registers() 240 regs->psb.savePERF_MODE = PSB_RVDC32(MRST_PERF_MODE); oaktrail_save_display_registers() 243 regs->psb.savePP_CONTROL = PSB_RVDC32(PP_CONTROL); oaktrail_save_display_registers() 244 regs->psb.savePFIT_PGM_RATIOS = PSB_RVDC32(PFIT_PGM_RATIOS); oaktrail_save_display_registers() 245 regs->psb.savePFIT_AUTO_RATIOS = PSB_RVDC32(PFIT_AUTO_RATIOS); oaktrail_save_display_registers() 246 regs->saveBLC_PWM_CTL = PSB_RVDC32(BLC_PWM_CTL); oaktrail_save_display_registers() 247 regs->saveBLC_PWM_CTL2 = PSB_RVDC32(BLC_PWM_CTL2); oaktrail_save_display_registers() 248 regs->psb.saveLVDS = PSB_RVDC32(LVDS); oaktrail_save_display_registers() 249 regs->psb.savePFIT_CONTROL = PSB_RVDC32(PFIT_CONTROL); oaktrail_save_display_registers() 250 regs->psb.savePP_ON_DELAYS = PSB_RVDC32(LVDSPP_ON); oaktrail_save_display_registers() 251 regs->psb.savePP_OFF_DELAYS = PSB_RVDC32(LVDSPP_OFF); oaktrail_save_display_registers() 252 regs->psb.savePP_DIVISOR = PSB_RVDC32(PP_CYCLE); oaktrail_save_display_registers() 255 regs->psb.saveOV_OVADD = PSB_RVDC32(OV_OVADD); oaktrail_save_display_registers() 256 regs->psb.saveOV_OGAMC0 = PSB_RVDC32(OV_OGAMC0); oaktrail_save_display_registers() 257 regs->psb.saveOV_OGAMC1 = PSB_RVDC32(OV_OGAMC1); oaktrail_save_display_registers() 258 regs->psb.saveOV_OGAMC2 = PSB_RVDC32(OV_OGAMC2); oaktrail_save_display_registers() 259 regs->psb.saveOV_OGAMC3 = PSB_RVDC32(OV_OGAMC3); oaktrail_save_display_registers() 260 regs->psb.saveOV_OGAMC4 = PSB_RVDC32(OV_OGAMC4); oaktrail_save_display_registers() 261 regs->psb.saveOV_OGAMC5 = PSB_RVDC32(OV_OGAMC5); oaktrail_save_display_registers() 264 regs->psb.saveHISTOGRAM_INT_CONTROL_REG = oaktrail_save_display_registers() 266 regs->psb.saveHISTOGRAM_LOGIC_CONTROL_REG = oaktrail_save_display_registers() 268 regs->psb.savePWM_CONTROL_LOGIC = PSB_RVDC32(PWM_CONTROL_LOGIC); oaktrail_save_display_registers() 306 struct psb_save_area *regs = &dev_priv->regs; oaktrail_restore_display_registers() local 307 struct psb_pipe *p = ®s->pipe[0]; oaktrail_restore_display_registers() 312 PSB_WVDC32(regs->psb.saveDSPARB, DSPARB); oaktrail_restore_display_registers() 313 PSB_WVDC32(regs->psb.saveDSPFW1, DSPFW1); oaktrail_restore_display_registers() 314 PSB_WVDC32(regs->psb.saveDSPFW2, DSPFW2); oaktrail_restore_display_registers() 315 PSB_WVDC32(regs->psb.saveDSPFW3, DSPFW3); oaktrail_restore_display_registers() 316 PSB_WVDC32(regs->psb.saveDSPFW4, DSPFW4); oaktrail_restore_display_registers() 317 PSB_WVDC32(regs->psb.saveDSPFW5, DSPFW5); oaktrail_restore_display_registers() 318 PSB_WVDC32(regs->psb.saveDSPFW6, DSPFW6); oaktrail_restore_display_registers() 319 PSB_WVDC32(regs->psb.saveCHICKENBIT, DSPCHICKENBIT); oaktrail_restore_display_registers() 340 PSB_WVDC32(regs->psb.saveBCLRPAT_A, BCLRPAT_A); oaktrail_restore_display_registers() 343 PSB_WVDC32(regs->psb.savePERF_MODE, MRST_PERF_MODE); oaktrail_restore_display_registers() 359 PSB_WVDC32(regs->psb.saveDSPACURSOR_CTRL, CURACNTR); oaktrail_restore_display_registers() 360 PSB_WVDC32(regs->psb.saveDSPACURSOR_POS, CURAPOS); oaktrail_restore_display_registers() 361 PSB_WVDC32(regs->psb.saveDSPACURSOR_BASE, CURABASE); oaktrail_restore_display_registers() 371 PSB_WVDC32(regs->saveBLC_PWM_CTL2, BLC_PWM_CTL2); oaktrail_restore_display_registers() 372 PSB_WVDC32(regs->psb.saveLVDS, LVDS); /*port 61180h*/ oaktrail_restore_display_registers() 373 PSB_WVDC32(regs->psb.savePFIT_CONTROL, PFIT_CONTROL); oaktrail_restore_display_registers() 374 PSB_WVDC32(regs->psb.savePFIT_PGM_RATIOS, PFIT_PGM_RATIOS); oaktrail_restore_display_registers() 375 PSB_WVDC32(regs->psb.savePFIT_AUTO_RATIOS, PFIT_AUTO_RATIOS); oaktrail_restore_display_registers() 376 PSB_WVDC32(regs->saveBLC_PWM_CTL, BLC_PWM_CTL); oaktrail_restore_display_registers() 377 PSB_WVDC32(regs->psb.savePP_ON_DELAYS, LVDSPP_ON); oaktrail_restore_display_registers() 378 PSB_WVDC32(regs->psb.savePP_OFF_DELAYS, LVDSPP_OFF); oaktrail_restore_display_registers() 379 PSB_WVDC32(regs->psb.savePP_DIVISOR, PP_CYCLE); oaktrail_restore_display_registers() 380 PSB_WVDC32(regs->psb.savePP_CONTROL, PP_CONTROL); oaktrail_restore_display_registers() 394 PSB_WVDC32(regs->psb.saveOV_OVADD, OV_OVADD); oaktrail_restore_display_registers() 395 PSB_WVDC32(regs->psb.saveOV_OGAMC0, OV_OGAMC0); oaktrail_restore_display_registers() 396 PSB_WVDC32(regs->psb.saveOV_OGAMC1, OV_OGAMC1); oaktrail_restore_display_registers() 397 PSB_WVDC32(regs->psb.saveOV_OGAMC2, OV_OGAMC2); oaktrail_restore_display_registers() 398 PSB_WVDC32(regs->psb.saveOV_OGAMC3, OV_OGAMC3); oaktrail_restore_display_registers() 399 PSB_WVDC32(regs->psb.saveOV_OGAMC4, OV_OGAMC4); oaktrail_restore_display_registers() 400 PSB_WVDC32(regs->psb.saveOV_OGAMC5, OV_OGAMC5); oaktrail_restore_display_registers() 403 PSB_WVDC32(regs->psb.saveHISTOGRAM_INT_CONTROL_REG, oaktrail_restore_display_registers() 405 PSB_WVDC32(regs->psb.saveHISTOGRAM_LOGIC_CONTROL_REG, oaktrail_restore_display_registers() 407 PSB_WVDC32(regs->psb.savePWM_CONTROL_LOGIC, PWM_CONTROL_LOGIC); oaktrail_restore_display_registers()
|