Lines Matching +full:y +full:- +full:rp

1 // SPDX-License-Identifier: GPL-2.0
10 * This file handles the architecture-dependent parts of process handling..
86 /* Re-enable interrupts. */ in arch_cpu_idle()
112 rw = compat_ptr((unsigned int)regs->u_regs[14]); in show_regwindow32()
141 if ((regs->tstate & TSTATE_PRIV) || !(test_thread_flag(TIF_32BIT))) { in show_regwindow()
144 (regs->u_regs[14] + STACK_BIAS); in show_regwindow()
146 (regs->u_regs[14] + STACK_BIAS); in show_regwindow()
147 if (!(regs->tstate & TSTATE_PRIV)) { in show_regwindow()
162 rwk->locals[0], rwk->locals[1], rwk->locals[2], rwk->locals[3]); in show_regwindow()
164 rwk->locals[4], rwk->locals[5], rwk->locals[6], rwk->locals[7]); in show_regwindow()
166 rwk->ins[0], rwk->ins[1], rwk->ins[2], rwk->ins[3]); in show_regwindow()
168 rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]); in show_regwindow()
169 if (regs->tstate & TSTATE_PRIV) in show_regwindow()
170 printk("I7: <%pS>\n", (void *) rwk->ins[7]); in show_regwindow()
177 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, in show_regs()
178 regs->tpc, regs->tnpc, regs->y, print_tainted()); in show_regs()
179 printk("TPC: <%pS>\n", (void *) regs->tpc); in show_regs()
181 regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], in show_regs()
182 regs->u_regs[3]); in show_regs()
184 regs->u_regs[4], regs->u_regs[5], regs->u_regs[6], in show_regs()
185 regs->u_regs[7]); in show_regs()
187 regs->u_regs[8], regs->u_regs[9], regs->u_regs[10], in show_regs()
188 regs->u_regs[11]); in show_regs()
190 regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], in show_regs()
191 regs->u_regs[15]); in show_regs()
192 printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); in show_regs()
194 show_stack(current, (unsigned long *)regs->u_regs[UREG_FP], KERN_DEFAULT); in show_regs()
203 struct global_reg_snapshot *rp; in __global_reg_self() local
207 rp = &global_cpu_snapshot[this_cpu].reg; in __global_reg_self()
209 rp->tstate = regs->tstate; in __global_reg_self()
210 rp->tpc = regs->tpc; in __global_reg_self()
211 rp->tnpc = regs->tnpc; in __global_reg_self()
212 rp->o7 = regs->u_regs[UREG_I7]; in __global_reg_self()
214 if (regs->tstate & TSTATE_PRIV) { in __global_reg_self()
218 (regs->u_regs[UREG_FP] + STACK_BIAS); in __global_reg_self()
220 rp->i7 = rw->ins[7]; in __global_reg_self()
222 (rw->ins[6] + STACK_BIAS); in __global_reg_self()
224 rp->rpc = rw->ins[7]; in __global_reg_self()
227 rp->i7 = 0; in __global_reg_self()
228 rp->rpc = 0; in __global_reg_self()
230 rp->thread = tp; in __global_reg_self()
236 * non-NULL.
242 while (!gp->thread && ++limit < 100) { in __global_reg_poll()
256 regs = tp->kregs; in arch_trigger_cpumask_backtrace()
279 tp = gp->thread; in arch_trigger_cpumask_backtrace()
282 gp->tstate, gp->tpc, gp->tnpc, in arch_trigger_cpumask_backtrace()
283 ((tp && tp->task) ? tp->task->comm : "NULL"), in arch_trigger_cpumask_backtrace()
284 ((tp && tp->task) ? tp->task->pid : -1)); in arch_trigger_cpumask_backtrace()
286 if (gp->tstate & TSTATE_PRIV) { in arch_trigger_cpumask_backtrace()
288 (void *) gp->tpc, in arch_trigger_cpumask_backtrace()
289 (void *) gp->o7, in arch_trigger_cpumask_backtrace()
290 (void *) gp->i7, in arch_trigger_cpumask_backtrace()
291 (void *) gp->rpc); in arch_trigger_cpumask_backtrace()
294 gp->tpc, gp->o7, gp->i7, gp->rpc); in arch_trigger_cpumask_backtrace()
314 .help_msg = "global-regs(y)",
334 pp->pcr[i] = pcr_ops->read_pcr(i); in __global_pmu_self()
335 pp->pic[i] = pcr_ops->read_pic(i); in __global_pmu_self()
343 while (!pp->pcr[0] && ++limit < 100) { in __global_pmu_poll()
371 pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], in pmu_snapshot_all_cpus()
372 pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); in pmu_snapshot_all_cpus()
389 .help_msg = "global-pmu(x)",
395 int ret = register_sysrq_key('y', &sparc_globalreg_op); in sparc_sysrq_init()
411 if (t->utraps) { in exit_thread()
412 if (t->utraps[0] < 2) in exit_thread()
413 kfree (t->utraps); in exit_thread()
415 t->utraps[0]--; in exit_thread()
424 mm = t->task->mm; in flush_thread()
431 t->fpsaved[0] = 0; in flush_thread()
434 /* It's a bit more tricky when 64-bit tasks are involved... */
443 __get_user(fp, &(((struct reg_window __user *)psp)->ins[6])); in clone_stackframe()
448 __get_user(fp, &(((struct reg_window32 __user *)psp)->ins[6])); in clone_stackframe()
456 distance = fp - psp; in clone_stackframe()
457 rval = (csp - distance); in clone_stackframe()
462 &(((struct reg_window32 __user *)rval)->ins[6]))) in clone_stackframe()
465 if (put_user(((u64)csp - STACK_BIAS), in clone_stackframe()
466 &(((struct reg_window __user *)rval)->ins[6]))) in clone_stackframe()
469 rval = rval - STACK_BIAS; in clone_stackframe()
482 t->rwbuf_stkptrs[i] = t->rwbuf_stkptrs[i+1]; in shift_window_buffer()
483 memcpy(&t->reg_window[i], &t->reg_window[i+1], in shift_window_buffer()
495 window -= 1; in synchronize_user_stack()
497 struct reg_window *rwin = &t->reg_window[window]; in synchronize_user_stack()
501 sp = t->rwbuf_stkptrs[window]; in synchronize_user_stack()
509 shift_window_buffer(window, get_thread_wsaved() - 1, t); in synchronize_user_stack()
510 set_thread_wsaved(get_thread_wsaved() - 1); in synchronize_user_stack()
512 } while (window--); in synchronize_user_stack()
535 window -= 1; in fault_in_user_windows()
537 struct reg_window *rwin = &t->reg_window[window]; in fault_in_user_windows()
541 orig_sp = sp = t->rwbuf_stkptrs[window]; in fault_in_user_windows()
556 current->comm, current->pid, in fault_in_user_windows()
558 regs->tpc, in fault_in_user_windows()
559 regs->u_regs[UREG_I7]); in fault_in_user_windows()
562 } while (window--); in fault_in_user_windows()
574 * Parent --> %o0 == childs pid, %o1 == 0
575 * Child --> %o0 == parents pid, %o1 == 1
589 (THREAD_SIZE - child_stack_sz)); in copy_thread()
591 t->new_child = 1; in copy_thread()
592 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; in copy_thread()
593 t->kregs = (struct pt_regs *) (child_trap_frame + in copy_thread()
595 t->fpsaved[0] = 0; in copy_thread()
597 if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { in copy_thread()
600 (current_pt_regs()->tstate + 1) & TSTATE_CWP; in copy_thread()
601 t->current_ds = ASI_P; in copy_thread()
602 t->kregs->u_regs[UREG_G1] = sp; /* function */ in copy_thread()
603 t->kregs->u_regs[UREG_G2] = arg; in copy_thread()
607 parent_sf = ((struct sparc_stackf *) regs) - 1; in copy_thread()
609 if (t->flags & _TIF_32BIT) { in copy_thread()
611 regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; in copy_thread()
613 t->kregs->u_regs[UREG_FP] = sp; in copy_thread()
615 (regs->tstate + 1) & TSTATE_CWP; in copy_thread()
616 t->current_ds = ASI_AIUS; in copy_thread()
617 if (sp != regs->u_regs[UREG_FP]) { in copy_thread()
620 csp = clone_stackframe(sp, regs->u_regs[UREG_FP]); in copy_thread()
622 return -EFAULT; in copy_thread()
623 t->kregs->u_regs[UREG_FP] = csp; in copy_thread()
625 if (t->utraps) in copy_thread()
626 t->utraps[0]++; in copy_thread()
629 t->kregs->u_regs[UREG_I0] = current->pid; in copy_thread()
630 t->kregs->u_regs[UREG_I1] = 1; in copy_thread()
633 regs->u_regs[UREG_I1] = 0; in copy_thread()
636 t->kregs->u_regs[UREG_G7] = tls; in copy_thread()
679 fp = task_thread_info(task)->ksp + bias; in get_wchan()
685 pc = rw->ins[7]; in get_wchan()
690 fp = rw->ins[6] + bias; in get_wchan()