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..
85 /* Re-enable interrupts. */ in arch_cpu_idle()
112 rw = compat_ptr((unsigned int)regs->u_regs[14]); in show_regwindow32()
136 if ((regs->tstate & TSTATE_PRIV) || !(test_thread_flag(TIF_32BIT))) { in show_regwindow()
139 (regs->u_regs[14] + STACK_BIAS); in show_regwindow()
141 (regs->u_regs[14] + STACK_BIAS); in show_regwindow()
142 if (!(regs->tstate & TSTATE_PRIV)) { in show_regwindow()
153 rwk->locals[0], rwk->locals[1], rwk->locals[2], rwk->locals[3]); in show_regwindow()
155 rwk->locals[4], rwk->locals[5], rwk->locals[6], rwk->locals[7]); in show_regwindow()
157 rwk->ins[0], rwk->ins[1], rwk->ins[2], rwk->ins[3]); in show_regwindow()
159 rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]); in show_regwindow()
160 if (regs->tstate & TSTATE_PRIV) in show_regwindow()
161 printk("I7: <%pS>\n", (void *) rwk->ins[7]); in show_regwindow()
168 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, in show_regs()
169 regs->tpc, regs->tnpc, regs->y, print_tainted()); in show_regs()
170 printk("TPC: <%pS>\n", (void *) regs->tpc); in show_regs()
172 regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], in show_regs()
173 regs->u_regs[3]); in show_regs()
175 regs->u_regs[4], regs->u_regs[5], regs->u_regs[6], in show_regs()
176 regs->u_regs[7]); in show_regs()
178 regs->u_regs[8], regs->u_regs[9], regs->u_regs[10], in show_regs()
179 regs->u_regs[11]); in show_regs()
181 regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], in show_regs()
182 regs->u_regs[15]); in show_regs()
183 printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); in show_regs()
185 show_stack(current, (unsigned long *)regs->u_regs[UREG_FP], KERN_DEFAULT); in show_regs()
194 struct global_reg_snapshot *rp; in __global_reg_self() local
198 rp = &global_cpu_snapshot[this_cpu].reg; in __global_reg_self()
200 rp->tstate = regs->tstate; in __global_reg_self()
201 rp->tpc = regs->tpc; in __global_reg_self()
202 rp->tnpc = regs->tnpc; in __global_reg_self()
203 rp->o7 = regs->u_regs[UREG_I7]; in __global_reg_self()
205 if (regs->tstate & TSTATE_PRIV) { in __global_reg_self()
209 (regs->u_regs[UREG_FP] + STACK_BIAS); in __global_reg_self()
211 rp->i7 = rw->ins[7]; in __global_reg_self()
213 (rw->ins[6] + STACK_BIAS); in __global_reg_self()
215 rp->rpc = rw->ins[7]; in __global_reg_self()
218 rp->i7 = 0; in __global_reg_self()
219 rp->rpc = 0; in __global_reg_self()
221 rp->thread = tp; in __global_reg_self()
227 * non-NULL.
233 while (!gp->thread && ++limit < 100) { in __global_reg_poll()
247 regs = tp->kregs; in arch_trigger_cpumask_backtrace()
270 tp = gp->thread; in arch_trigger_cpumask_backtrace()
273 gp->tstate, gp->tpc, gp->tnpc, in arch_trigger_cpumask_backtrace()
274 ((tp && tp->task) ? tp->task->comm : "NULL"), in arch_trigger_cpumask_backtrace()
275 ((tp && tp->task) ? tp->task->pid : -1)); in arch_trigger_cpumask_backtrace()
277 if (gp->tstate & TSTATE_PRIV) { in arch_trigger_cpumask_backtrace()
279 (void *) gp->tpc, in arch_trigger_cpumask_backtrace()
280 (void *) gp->o7, in arch_trigger_cpumask_backtrace()
281 (void *) gp->i7, in arch_trigger_cpumask_backtrace()
282 (void *) gp->rpc); in arch_trigger_cpumask_backtrace()
285 gp->tpc, gp->o7, gp->i7, gp->rpc); in arch_trigger_cpumask_backtrace()
305 .help_msg = "global-regs(y)",
325 pp->pcr[i] = pcr_ops->read_pcr(i); in __global_pmu_self()
326 pp->pic[i] = pcr_ops->read_pic(i); in __global_pmu_self()
334 while (!pp->pcr[0] && ++limit < 100) { in __global_pmu_poll()
362 pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], in pmu_snapshot_all_cpus()
363 pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); in pmu_snapshot_all_cpus()
380 .help_msg = "global-pmu(x)",
386 int ret = register_sysrq_key('y', &sparc_globalreg_op); in sparc_sysrq_init()
402 if (t->utraps) { in exit_thread()
403 if (t->utraps[0] < 2) in exit_thread()
404 kfree (t->utraps); in exit_thread()
406 t->utraps[0]--; in exit_thread()
415 mm = t->task->mm; in flush_thread()
422 t->fpsaved[0] = 0; in flush_thread()
425 /* It's a bit more tricky when 64-bit tasks are involved... */
434 __get_user(fp, &(((struct reg_window __user *)psp)->ins[6])); in clone_stackframe()
439 __get_user(fp, &(((struct reg_window32 __user *)psp)->ins[6])); in clone_stackframe()
447 distance = fp - psp; in clone_stackframe()
448 rval = (csp - distance); in clone_stackframe()
453 &(((struct reg_window32 __user *)rval)->ins[6]))) in clone_stackframe()
456 if (put_user(((u64)csp - STACK_BIAS), in clone_stackframe()
457 &(((struct reg_window __user *)rval)->ins[6]))) in clone_stackframe()
460 rval = rval - STACK_BIAS; in clone_stackframe()
473 t->rwbuf_stkptrs[i] = t->rwbuf_stkptrs[i+1]; in shift_window_buffer()
474 memcpy(&t->reg_window[i], &t->reg_window[i+1], in shift_window_buffer()
486 window -= 1; in synchronize_user_stack()
488 struct reg_window *rwin = &t->reg_window[window]; in synchronize_user_stack()
492 sp = t->rwbuf_stkptrs[window]; in synchronize_user_stack()
500 shift_window_buffer(window, get_thread_wsaved() - 1, t); in synchronize_user_stack()
501 set_thread_wsaved(get_thread_wsaved() - 1); in synchronize_user_stack()
503 } while (window--); in synchronize_user_stack()
526 window -= 1; in fault_in_user_windows()
528 struct reg_window *rwin = &t->reg_window[window]; in fault_in_user_windows()
532 orig_sp = sp = t->rwbuf_stkptrs[window]; in fault_in_user_windows()
547 current->comm, current->pid, in fault_in_user_windows()
549 regs->tpc, in fault_in_user_windows()
550 regs->u_regs[UREG_I7]); in fault_in_user_windows()
553 } while (window--); in fault_in_user_windows()
565 * Parent --> %o0 == childs pid, %o1 == 0
566 * Child --> %o0 == parents pid, %o1 == 1
570 unsigned long clone_flags = args->flags; in copy_thread()
571 unsigned long sp = args->stack; in copy_thread()
572 unsigned long tls = args->tls; in copy_thread()
582 (THREAD_SIZE - child_stack_sz)); in copy_thread()
584 t->new_child = 1; in copy_thread()
585 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; in copy_thread()
586 t->kregs = (struct pt_regs *) (child_trap_frame + in copy_thread()
588 t->fpsaved[0] = 0; in copy_thread()
590 if (unlikely(args->fn)) { in copy_thread()
593 (current_pt_regs()->tstate + 1) & TSTATE_CWP; in copy_thread()
594 t->kregs->u_regs[UREG_G1] = (unsigned long) args->fn; in copy_thread()
595 t->kregs->u_regs[UREG_G2] = (unsigned long) args->fn_arg; in copy_thread()
599 parent_sf = ((struct sparc_stackf *) regs) - 1; in copy_thread()
601 if (t->flags & _TIF_32BIT) { in copy_thread()
603 regs->u_regs[UREG_FP] &= 0x00000000ffffffffUL; in copy_thread()
605 t->kregs->u_regs[UREG_FP] = sp; in copy_thread()
607 (regs->tstate + 1) & TSTATE_CWP; in copy_thread()
608 if (sp != regs->u_regs[UREG_FP]) { in copy_thread()
611 csp = clone_stackframe(sp, regs->u_regs[UREG_FP]); in copy_thread()
613 return -EFAULT; in copy_thread()
614 t->kregs->u_regs[UREG_FP] = csp; in copy_thread()
616 if (t->utraps) in copy_thread()
617 t->utraps[0]++; in copy_thread()
620 t->kregs->u_regs[UREG_I0] = current->pid; in copy_thread()
621 t->kregs->u_regs[UREG_I1] = 1; in copy_thread()
624 regs->u_regs[UREG_I1] = 0; in copy_thread()
627 t->kregs->u_regs[UREG_G7] = tls; in copy_thread()
667 fp = task_thread_info(task)->ksp + bias; in __get_wchan()
673 pc = rw->ins[7]; in __get_wchan()
678 fp = rw->ins[6] + bias; in __get_wchan()