/kernel/linux/linux-5.10/arch/microblaze/kernel/ |
D | process.c | 59 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 65 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 67 ti->cpu_context.r1 = (unsigned long)childregs; in copy_thread() 70 childregs->pt_mode = 1; in copy_thread() 71 local_save_flags(childregs->msr); in copy_thread() 73 ti->cpu_context.msr = childregs->msr & ~MSR_IE; in copy_thread() 78 *childregs = *current_pt_regs(); in copy_thread() 80 childregs->r1 = usp; in copy_thread() 83 ti->cpu_context.r1 = (unsigned long)childregs; in copy_thread() 85 ti->cpu_context.msr = (unsigned long)childregs->msr; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/xtensa/kernel/ |
D | process.c | 208 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 215 SPILL_SLOT(childregs, 1) = (unsigned long)childregs; in copy_thread() 216 SPILL_SLOT(childregs, 0) = 0; in copy_thread() 218 p->thread.sp = (unsigned long)childregs; in copy_thread() 232 *childregs = *regs; in copy_thread() 233 childregs->areg[1] = usp; in copy_thread() 234 childregs->areg[2] = 0; in copy_thread() 251 int len = childregs->wmask & ~0xf; in copy_thread() 258 childregs->wmask = 1; in copy_thread() 259 childregs->windowstart = 1; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/c6x/kernel/ |
D | process.c | 111 struct pt_regs *childregs; in copy_thread() local 113 childregs = task_pt_regs(p); in copy_thread() 117 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 118 childregs->sp = (unsigned long)(childregs + 1); in copy_thread() 120 childregs->a0 = usp; /* function */ in copy_thread() 121 childregs->a1 = ustk_size; /* argument */ in copy_thread() 124 *childregs = *current_pt_regs(); in copy_thread() 126 childregs->sp = usp; in copy_thread() 131 p->thread.usp = childregs->sp; in copy_thread() 132 thread_saved_ksp(p) = (unsigned long)childregs - 8; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/hexagon/kernel/ |
D | process.c | 58 struct pt_regs *childregs; in copy_thread() local 61 childregs = (struct pt_regs *) (((unsigned long) ti + THREAD_SIZE) - in copy_thread() 62 sizeof(*childregs)); in copy_thread() 64 ti->regs = childregs; in copy_thread() 72 ss = (struct hexagon_switch_stack *) ((unsigned long) childregs - in copy_thread() 77 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 81 pt_set_kmode(childregs); in copy_thread() 84 memcpy(childregs, current_pt_regs(), sizeof(*childregs)); in copy_thread() 88 pt_set_rte_sp(childregs, usp); in copy_thread() 91 childregs->r00 = 0; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/s390/kernel/ |
D | process.c | 89 struct pt_regs childregs; in copy_thread() member 92 frame = container_of(task_pt_regs(p), struct fake_frame, childregs); in copy_thread() 120 memset(&frame->childregs, 0, sizeof(struct pt_regs)); in copy_thread() 121 frame->childregs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_DAT | in copy_thread() 123 frame->childregs.psw.addr = in copy_thread() 125 frame->childregs.gprs[9] = new_stackp; /* function */ in copy_thread() 126 frame->childregs.gprs[10] = arg; in copy_thread() 127 frame->childregs.gprs[11] = (unsigned long) do_exit; in copy_thread() 128 frame->childregs.orig_gpr2 = -1; in copy_thread() 132 frame->childregs = *current_pt_regs(); in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/sh/kernel/ |
D | process_32.c | 99 struct pt_regs *childregs; in copy_thread() local 115 childregs = task_pt_regs(p); in copy_thread() 116 p->thread.sp = (unsigned long) childregs; in copy_thread() 118 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 120 childregs->regs[4] = arg; in copy_thread() 121 childregs->regs[5] = usp; in copy_thread() 122 childregs->sr = SR_MD; in copy_thread() 124 childregs->sr |= SR_FD; in copy_thread() 131 *childregs = *current_pt_regs(); in copy_thread() 134 childregs->regs[15] = usp; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/csky/kernel/ |
D | process.c | 40 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 46 childstack = ((struct switch_stack *) childregs) - 1; in copy_thread() 53 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 57 childregs->sr = mfcr("psr"); in copy_thread() 59 *childregs = *(current_pt_regs()); in copy_thread() 61 childregs->usp = usp; in copy_thread() 63 task_thread_info(p)->tp_value = childregs->tls in copy_thread() 66 childregs->a0 = 0; in copy_thread()
|
/kernel/linux/linux-5.10/arch/h8300/kernel/ |
D | process.c | 111 struct pt_regs *childregs; in copy_thread() local 113 childregs = (struct pt_regs *) (THREAD_SIZE + task_stack_page(p)) - 1; in copy_thread() 116 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 117 childregs->retpc = (unsigned long) ret_from_kernel_thread; in copy_thread() 118 childregs->er4 = topstk; /* arg */ in copy_thread() 119 childregs->er5 = usp; /* fn */ in copy_thread() 121 *childregs = *current_pt_regs(); in copy_thread() 122 childregs->er0 = 0; in copy_thread() 123 childregs->retpc = (unsigned long) ret_from_fork; in copy_thread() 126 p->thread.ksp = (unsigned long)childregs; in copy_thread()
|
/kernel/linux/linux-5.10/arch/nds32/kernel/ |
D | process.c | 155 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 160 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 166 *childregs = *current_pt_regs(); in copy_thread() 168 childregs->sp = stack_start; in copy_thread() 170 childregs->uregs[0] = 0; in copy_thread() 171 childregs->osp = 0; in copy_thread() 173 childregs->uregs[25] = tls; in copy_thread() 177 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread() 196 childregs->lb = 0; in copy_thread() 197 childregs->le = 0; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/riscv/kernel/ |
D | process.c | 112 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 117 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 118 childregs->gp = gp_in_global; in copy_thread() 120 childregs->status = SR_PP | SR_PIE; in copy_thread() 126 *childregs = *(current_pt_regs()); in copy_thread() 128 childregs->sp = usp; in copy_thread() 130 childregs->tp = tls; in copy_thread() 131 childregs->a0 = 0; /* Return value of fork() */ in copy_thread() 134 p->thread.sp = (unsigned long)childregs; /* kernel sp */ in copy_thread()
|
/kernel/linux/linux-5.10/arch/nios2/kernel/ |
D | process.c | 106 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 110 ((struct switch_stack *)childregs) - 1; in copy_thread() 119 childregs->estatus = STATUS_PIE; in copy_thread() 120 childregs->sp = (unsigned long) childstack; in copy_thread() 123 p->thread.kregs = childregs; in copy_thread() 128 *childregs = *regs; in copy_thread() 129 childregs->r2 = 0; /* Set the return value for the child. */ in copy_thread() 130 childregs->r7 = 0; in copy_thread() 135 p->thread.kregs = childregs; in copy_thread() 139 childregs->sp = usp; in copy_thread()
|
/kernel/linux/linux-5.10/arch/sparc/kernel/ |
D | process_32.c | 279 struct pt_regs *childregs, *regs = current_pt_regs(); local 300 childregs = (struct pt_regs *) (new_stack + STACKFRAME_SZ); 310 p->thread.kregs = childregs; 319 childregs->u_regs[UREG_G1] = sp; /* function */ 320 childregs->u_regs[UREG_G2] = arg; 321 psr = childregs->psr = get_psr(); 327 childregs->u_regs[UREG_FP] = sp; 361 childregs->u_regs[UREG_FP] = (unsigned long)childstack; 366 childregs->psr &= ~PSR_EF; 371 childregs->u_regs[UREG_I0] = current->pid; [all …]
|
/kernel/linux/linux-5.10/arch/arm64/kernel/ |
D | process.c | 386 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 402 *childregs = *current_pt_regs(); in copy_thread() 403 childregs->regs[0] = 0; in copy_thread() 413 childregs->compat_sp = stack_start; in copy_thread() 415 childregs->sp = stack_start; in copy_thread() 425 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 426 childregs->pstate = PSR_MODE_EL1h; in copy_thread() 429 childregs->pstate |= PSR_UAO_BIT; in copy_thread() 434 childregs->pmr_save = GIC_PRIO_IRQON; in copy_thread() 440 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread()
|
/kernel/linux/linux-5.10/arch/alpha/kernel/ |
D | process.c | 244 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 248 childstack = ((struct switch_stack *) childregs) - 1; in copy_thread() 259 childregs->hae = alpha_mv.hae_cache, in copy_thread() 273 *childregs = *regs; in copy_thread() 274 childregs->r0 = 0; in copy_thread() 275 childregs->r19 = 0; in copy_thread() 276 childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ in copy_thread()
|
/kernel/linux/linux-5.10/arch/arm/kernel/ |
D | process.c | 232 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local 247 *childregs = *current_pt_regs(); in copy_thread() 248 childregs->ARM_r0 = 0; in copy_thread() 250 childregs->ARM_sp = stack_start; in copy_thread() 252 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 255 childregs->ARM_cpsr = SVC_MODE; in copy_thread() 258 thread->cpu_context.sp = (unsigned long)childregs; in copy_thread()
|
/kernel/linux/linux-5.10/arch/mips/kernel/ |
D | process.c | 128 struct pt_regs *childregs, *regs = current_pt_regs(); in copy_thread() local 134 childregs = (struct pt_regs *) childksp - 1; in copy_thread() 136 childksp = (unsigned long) childregs; in copy_thread() 141 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 153 childregs->cp0_status = status; in copy_thread() 158 *childregs = *regs; in copy_thread() 159 childregs->regs[7] = 0; /* Clear error flag */ in copy_thread() 160 childregs->regs[2] = 0; /* Child gets zero as return value */ in copy_thread() 162 childregs->regs[29] = usp; in copy_thread() 165 p->thread.reg29 = (unsigned long) childregs; in copy_thread() [all …]
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
D | process.c | 130 struct pt_regs *childregs; in copy_thread() local 133 childregs = task_pt_regs(p); in copy_thread() 134 fork_frame = container_of(childregs, struct fork_frame, regs); in copy_thread() 137 frame->bp = encode_frame_pointer(childregs); in copy_thread() 154 p->thread.sp0 = (unsigned long) (childregs + 1); in copy_thread() 166 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 172 *childregs = *current_pt_regs(); in copy_thread() 173 childregs->ax = 0; in copy_thread() 175 childregs->sp = sp; in copy_thread()
|
/kernel/linux/linux-5.10/arch/powerpc/kernel/ |
D | process.c | 1671 struct pt_regs *childregs, *kregs; in copy_thread() local 1686 childregs = (struct pt_regs *) sp; in copy_thread() 1689 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread() 1690 childregs->gpr[1] = sp + sizeof(struct pt_regs); in copy_thread() 1693 childregs->gpr[14] = ppc_function_entry((void *)usp); in copy_thread() 1696 childregs->softe = IRQS_ENABLED; in copy_thread() 1698 childregs->gpr[15] = kthread_arg; in copy_thread() 1706 *childregs = *regs; in copy_thread() 1708 childregs->gpr[1] = usp; in copy_thread() 1709 p->thread.regs = childregs; in copy_thread() [all …]
|