Home
last modified time | relevance | path

Searched refs:childregs (Results 1 – 16 of 16) sorted by relevance

/linux-6.1.9/arch/microblaze/kernel/
Dprocess.c60 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
66 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
68 ti->cpu_context.r1 = (unsigned long)childregs; in copy_thread()
71 childregs->pt_mode = 1; in copy_thread()
72 local_save_flags(childregs->msr); in copy_thread()
73 ti->cpu_context.msr = childregs->msr & ~MSR_IE; in copy_thread()
77 *childregs = *current_pt_regs(); in copy_thread()
79 childregs->r1 = usp; in copy_thread()
82 ti->cpu_context.r1 = (unsigned long)childregs; in copy_thread()
83 childregs->msr |= MSR_UMS; in copy_thread()
[all …]
/linux-6.1.9/arch/hexagon/kernel/
Dprocess.c60 struct pt_regs *childregs; in copy_thread() local
63 childregs = (struct pt_regs *) (((unsigned long) ti + THREAD_SIZE) - in copy_thread()
64 sizeof(*childregs)); in copy_thread()
66 ti->regs = childregs; in copy_thread()
74 ss = (struct hexagon_switch_stack *) ((unsigned long) childregs - in copy_thread()
79 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
83 pt_set_kmode(childregs); in copy_thread()
86 memcpy(childregs, current_pt_regs(), sizeof(*childregs)); in copy_thread()
90 pt_set_rte_sp(childregs, usp); in copy_thread()
93 childregs->r00 = 0; in copy_thread()
[all …]
/linux-6.1.9/arch/xtensa/kernel/
Dprocess.c271 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
279 SPILL_SLOT(childregs, 1) = (unsigned long)childregs; in copy_thread()
280 SPILL_SLOT(childregs, 0) = 0; in copy_thread()
282 p->thread.sp = (unsigned long)childregs; in copy_thread()
285 p->thread.sp = (unsigned long)childregs - 16; in copy_thread()
298 *childregs = *regs; in copy_thread()
299 childregs->areg[1] = usp; in copy_thread()
300 childregs->areg[2] = 0; in copy_thread()
317 int len = childregs->wmask & ~0xf; in copy_thread()
324 childregs->wmask = 1; in copy_thread()
[all …]
/linux-6.1.9/arch/s390/kernel/
Dprocess.c117 struct pt_regs childregs; in copy_thread() member
120 frame = container_of(task_pt_regs(p), struct fake_frame, childregs); in copy_thread()
149 memset(&frame->childregs, 0, sizeof(struct pt_regs)); in copy_thread()
150 frame->childregs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_DAT | in copy_thread()
152 frame->childregs.psw.addr = in copy_thread()
154 frame->childregs.gprs[9] = (unsigned long)args->fn; in copy_thread()
155 frame->childregs.gprs[10] = (unsigned long)args->fn_arg; in copy_thread()
156 frame->childregs.orig_gpr2 = -1; in copy_thread()
157 frame->childregs.last_break = 1; in copy_thread()
160 frame->childregs = *current_pt_regs(); in copy_thread()
[all …]
/linux-6.1.9/arch/sh/kernel/
Dprocess_32.c96 struct pt_regs *childregs; in copy_thread() local
112 childregs = task_pt_regs(p); in copy_thread()
113 p->thread.sp = (unsigned long) childregs; in copy_thread()
115 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
117 childregs->regs[4] = (unsigned long) args->fn_arg; in copy_thread()
118 childregs->regs[5] = (unsigned long) args->fn; in copy_thread()
119 childregs->sr = SR_MD; in copy_thread()
121 childregs->sr |= SR_FD; in copy_thread()
127 *childregs = *current_pt_regs(); in copy_thread()
130 childregs->regs[15] = usp; in copy_thread()
[all …]
/linux-6.1.9/arch/csky/kernel/
Dprocess.c38 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
44 childstack = ((struct switch_stack *) childregs) - 1; in copy_thread()
51 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
55 childregs->sr = mfcr("psr"); in copy_thread()
57 *childregs = *(current_pt_regs()); in copy_thread()
59 childregs->usp = usp; in copy_thread()
61 task_thread_info(p)->tp_value = childregs->tls in copy_thread()
64 childregs->a0 = 0; in copy_thread()
/linux-6.1.9/arch/loongarch/kernel/
Dprocess.c130 struct pt_regs *childregs, *regs = current_pt_regs(); in copy_thread() local
135 childregs = (struct pt_regs *) childksp - 1; in copy_thread()
137 childksp = (unsigned long) childregs; in copy_thread()
150 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
151 childregs->csr_euen = p->thread.csr_euen; in copy_thread()
152 childregs->csr_crmd = p->thread.csr_crmd; in copy_thread()
153 childregs->csr_prmd = p->thread.csr_prmd; in copy_thread()
154 childregs->csr_ecfg = p->thread.csr_ecfg; in copy_thread()
159 *childregs = *regs; in copy_thread()
160 childregs->regs[4] = 0; /* Child gets zero as return value */ in copy_thread()
[all …]
/linux-6.1.9/arch/riscv/kernel/
Dprocess.c165 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
172 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
173 childregs->gp = gp_in_global; in copy_thread()
175 childregs->status = SR_PP | SR_PIE; in copy_thread()
181 *childregs = *(current_pt_regs()); in copy_thread()
183 childregs->sp = usp; in copy_thread()
185 childregs->tp = tls; in copy_thread()
186 childregs->a0 = 0; /* Return value of fork() */ in copy_thread()
189 p->thread.sp = (unsigned long)childregs; /* kernel sp */ in copy_thread()
/linux-6.1.9/arch/nios2/kernel/
Dprocess.c108 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
112 ((struct switch_stack *)childregs) - 1; in copy_thread()
121 childregs->estatus = STATUS_PIE; in copy_thread()
122 childregs->sp = (unsigned long) childstack; in copy_thread()
125 p->thread.kregs = childregs; in copy_thread()
130 *childregs = *regs; in copy_thread()
131 childregs->r2 = 0; /* Set the return value for the child. */ in copy_thread()
132 childregs->r7 = 0; in copy_thread()
137 p->thread.kregs = childregs; in copy_thread()
141 childregs->sp = usp; in copy_thread()
/linux-6.1.9/arch/sparc/kernel/
Dprocess_32.c268 struct pt_regs *childregs, *regs = current_pt_regs(); local
289 childregs = (struct pt_regs *) (new_stack + STACKFRAME_SZ);
299 p->thread.kregs = childregs;
306 childregs->u_regs[UREG_G1] = (unsigned long) args->fn;
307 childregs->u_regs[UREG_G2] = (unsigned long) args->fn_arg;
308 psr = childregs->psr = get_psr();
314 childregs->u_regs[UREG_FP] = sp;
346 childregs->u_regs[UREG_FP] = (unsigned long)childstack;
351 childregs->psr &= ~PSR_EF;
356 childregs->u_regs[UREG_I0] = current->pid;
[all …]
/linux-6.1.9/arch/alpha/kernel/
Dprocess.c240 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
244 childstack = ((struct switch_stack *) childregs) - 1; in copy_thread()
255 childregs->hae = alpha_mv.hae_cache; in copy_thread()
269 *childregs = *regs; in copy_thread()
270 childregs->r0 = 0; in copy_thread()
271 childregs->r19 = 0; in copy_thread()
272 childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ in copy_thread()
/linux-6.1.9/arch/arm64/kernel/
Dprocess.c347 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
363 *childregs = *current_pt_regs(); in copy_thread()
364 childregs->regs[0] = 0; in copy_thread()
376 childregs->compat_sp = stack_start; in copy_thread()
378 childregs->sp = stack_start; in copy_thread()
397 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
398 childregs->pstate = PSR_MODE_EL1h | PSR_IL_BIT; in copy_thread()
404 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread()
409 p->thread.cpu_context.fp = (unsigned long)childregs->stackframe; in copy_thread()
/linux-6.1.9/arch/arm/kernel/
Dprocess.c243 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
258 *childregs = *current_pt_regs(); in copy_thread()
259 childregs->ARM_r0 = 0; in copy_thread()
261 childregs->ARM_sp = stack_start; in copy_thread()
263 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
266 childregs->ARM_cpsr = SVC_MODE; in copy_thread()
269 thread->cpu_context.sp = (unsigned long)childregs; in copy_thread()
/linux-6.1.9/arch/x86/kernel/
Dprocess.c141 struct pt_regs *childregs; in copy_thread() local
144 childregs = task_pt_regs(p); in copy_thread()
145 fork_frame = container_of(childregs, struct fork_frame, regs); in copy_thread()
148 frame->bp = encode_frame_pointer(childregs); in copy_thread()
165 p->thread.sp0 = (unsigned long) (childregs + 1); in copy_thread()
181 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
193 *childregs = *current_pt_regs(); in copy_thread()
194 childregs->ax = 0; in copy_thread()
196 childregs->sp = sp; in copy_thread()
209 childregs->sp = 0; in copy_thread()
[all …]
/linux-6.1.9/arch/mips/kernel/
Dprocess.c114 struct pt_regs *childregs, *regs = current_pt_regs(); in copy_thread() local
120 childregs = (struct pt_regs *) childksp - 1; in copy_thread()
122 childksp = (unsigned long) childregs; in copy_thread()
127 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
138 childregs->cp0_status = status; in copy_thread()
143 *childregs = *regs; in copy_thread()
144 childregs->regs[7] = 0; /* Clear error flag */ in copy_thread()
145 childregs->regs[2] = 0; /* Child gets zero as return value */ in copy_thread()
147 childregs->regs[29] = usp; in copy_thread()
149 p->thread.reg29 = (unsigned long) childregs; in copy_thread()
[all …]
/linux-6.1.9/arch/powerpc/kernel/
Dprocess.c1716 struct pt_regs *childregs, *kregs; in copy_thread() local
1731 childregs = (struct pt_regs *) sp; in copy_thread()
1734 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
1735 childregs->gpr[1] = sp + sizeof(struct pt_regs); in copy_thread()
1738 childregs->gpr[14] = ppc_function_entry((void *)args->fn); in copy_thread()
1741 childregs->softe = IRQS_ENABLED; in copy_thread()
1743 childregs->gpr[15] = (unsigned long)args->fn_arg; in copy_thread()
1750 *childregs = *regs; in copy_thread()
1752 childregs->gpr[1] = usp; in copy_thread()
1753 p->thread.regs = childregs; in copy_thread()
[all …]