Home
last modified time | relevance | path

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

/Linux-v4.19/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()
74 ti->cpu_context.msr = childregs->msr & ~MSR_IE; in copy_thread()
79 *childregs = *current_pt_regs(); in copy_thread()
81 childregs->r1 = usp; in copy_thread()
84 ti->cpu_context.r1 = (unsigned long)childregs; in copy_thread()
86 ti->cpu_context.msr = (unsigned long)childregs->msr; in copy_thread()
[all …]
/Linux-v4.19/arch/c6x/kernel/
Dprocess.c115 struct pt_regs *childregs; in copy_thread() local
117 childregs = task_pt_regs(p); in copy_thread()
121 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
122 childregs->sp = (unsigned long)(childregs + 1); in copy_thread()
124 childregs->a0 = usp; /* function */ in copy_thread()
125 childregs->a1 = ustk_size; /* argument */ in copy_thread()
128 *childregs = *current_pt_regs(); in copy_thread()
130 childregs->sp = usp; in copy_thread()
135 p->thread.usp = childregs->sp; in copy_thread()
136 thread_saved_ksp(p) = (unsigned long)childregs - 8; in copy_thread()
[all …]
/Linux-v4.19/arch/hexagon/kernel/
Dprocess.c71 struct pt_regs *childregs; in copy_thread() local
74 childregs = (struct pt_regs *) (((unsigned long) ti + THREAD_SIZE) - in copy_thread()
75 sizeof(*childregs)); in copy_thread()
77 ti->regs = childregs; in copy_thread()
85 ss = (struct hexagon_switch_stack *) ((unsigned long) childregs - in copy_thread()
90 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
94 pt_set_kmode(childregs); in copy_thread()
97 memcpy(childregs, current_pt_regs(), sizeof(*childregs)); in copy_thread()
101 pt_set_rte_sp(childregs, usp); in copy_thread()
104 childregs->r00 = 0; in copy_thread()
[all …]
/Linux-v4.19/arch/xtensa/kernel/
Dprocess.c206 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
213 SPILL_SLOT(childregs, 1) = (unsigned long)childregs; in copy_thread()
214 SPILL_SLOT(childregs, 0) = 0; in copy_thread()
216 p->thread.sp = (unsigned long)childregs; in copy_thread()
230 *childregs = *regs; in copy_thread()
231 childregs->areg[1] = usp; in copy_thread()
232 childregs->areg[2] = 0; in copy_thread()
249 int len = childregs->wmask & ~0xf; in copy_thread()
256 childregs->wmask = 1; in copy_thread()
257 childregs->windowstart = 1; in copy_thread()
[all …]
/Linux-v4.19/arch/h8300/kernel/
Dprocess.c113 struct pt_regs *childregs; in copy_thread() local
115 childregs = (struct pt_regs *) (THREAD_SIZE + task_stack_page(p)) - 1; in copy_thread()
118 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
119 childregs->retpc = (unsigned long) ret_from_kernel_thread; in copy_thread()
120 childregs->er4 = topstk; /* arg */ in copy_thread()
121 childregs->er5 = usp; /* fn */ in copy_thread()
123 *childregs = *current_pt_regs(); in copy_thread()
124 childregs->er0 = 0; in copy_thread()
125 childregs->retpc = (unsigned long) ret_from_fork; in copy_thread()
128 p->thread.ksp = (unsigned long)childregs; in copy_thread()
/Linux-v4.19/arch/s390/kernel/
Dprocess.c87 struct pt_regs childregs; in copy_thread_tls() member
90 frame = container_of(task_pt_regs(p), struct fake_frame, childregs); in copy_thread_tls()
117 memset(&frame->childregs, 0, sizeof(struct pt_regs)); in copy_thread_tls()
118 frame->childregs.psw.mask = PSW_KERNEL_BITS | PSW_MASK_DAT | in copy_thread_tls()
120 frame->childregs.psw.addr = in copy_thread_tls()
122 frame->childregs.gprs[9] = new_stackp; /* function */ in copy_thread_tls()
123 frame->childregs.gprs[10] = arg; in copy_thread_tls()
124 frame->childregs.gprs[11] = (unsigned long) do_exit; in copy_thread_tls()
125 frame->childregs.orig_gpr2 = -1; in copy_thread_tls()
129 frame->childregs = *current_pt_regs(); in copy_thread_tls()
[all …]
/Linux-v4.19/arch/sh/kernel/
Dprocess_32.c125 struct pt_regs *childregs; in copy_thread() local
141 childregs = task_pt_regs(p); in copy_thread()
142 p->thread.sp = (unsigned long) childregs; in copy_thread()
144 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
146 childregs->regs[4] = arg; in copy_thread()
147 childregs->regs[5] = usp; in copy_thread()
148 childregs->sr = SR_MD; in copy_thread()
150 childregs->sr |= SR_FD; in copy_thread()
157 *childregs = *current_pt_regs(); in copy_thread()
160 childregs->regs[15] = usp; in copy_thread()
[all …]
Dprocess_64.c379 struct pt_regs *childregs; in copy_thread() local
392 childregs = (struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1; in copy_thread()
393 p->thread.sp = (unsigned long) childregs; in copy_thread()
396 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
397 childregs->regs[2] = (unsigned long)arg; in copy_thread()
398 childregs->regs[3] = (unsigned long)usp; in copy_thread()
399 childregs->sr = (1 << 30); /* not user_mode */ in copy_thread()
400 childregs->sr |= SR_FD; /* Invalidate FPU flag */ in copy_thread()
404 *childregs = *current_pt_regs(); in copy_thread()
413 childregs->regs[15] = neff_sign_extend(usp); in copy_thread()
[all …]
/Linux-v4.19/arch/nds32/kernel/
Dprocess.c138 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
143 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
149 *childregs = *current_pt_regs(); in copy_thread()
151 childregs->sp = stack_start; in copy_thread()
153 childregs->uregs[0] = 0; in copy_thread()
154 childregs->osp = 0; in copy_thread()
156 childregs->uregs[25] = childregs->uregs[3]; in copy_thread()
160 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread()
163 childregs->lb = 0; in copy_thread()
164 childregs->le = 0; in copy_thread()
[all …]
/Linux-v4.19/arch/riscv/kernel/
Dprocess.c105 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
111 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
112 childregs->gp = gp; in copy_thread()
113 childregs->sstatus = SR_SPP | SR_SPIE; /* Supervisor, irqs on */ in copy_thread()
119 *childregs = *(current_pt_regs()); in copy_thread()
121 childregs->sp = usp; in copy_thread()
123 childregs->tp = childregs->a5; in copy_thread()
124 childregs->a0 = 0; /* Return value of fork() */ in copy_thread()
127 p->thread.sp = (unsigned long)childregs; /* kernel sp */ in copy_thread()
/Linux-v4.19/arch/nios2/kernel/
Dprocess.c106 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()
/Linux-v4.19/arch/arm64/kernel/
Dprocess.c312 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
333 *childregs = *current_pt_regs(); in copy_thread()
334 childregs->regs[0] = 0; in copy_thread()
344 childregs->compat_sp = stack_start; in copy_thread()
346 childregs->sp = stack_start; in copy_thread()
354 p->thread.uw.tp_value = childregs->regs[3]; in copy_thread()
356 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
357 childregs->pstate = PSR_MODE_EL1h; in copy_thread()
360 childregs->pstate |= PSR_UAO_BIT; in copy_thread()
365 p->thread.cpu_context.sp = (unsigned long)childregs; in copy_thread()
/Linux-v4.19/arch/sparc/kernel/
Dprocess_32.c308 struct pt_regs *childregs, *regs = current_pt_regs(); local
329 childregs = (struct pt_regs *) (new_stack + STACKFRAME_SZ);
339 p->thread.kregs = childregs;
348 childregs->u_regs[UREG_G1] = sp; /* function */
349 childregs->u_regs[UREG_G2] = arg;
350 psr = childregs->psr = get_psr();
356 childregs->u_regs[UREG_FP] = sp;
390 childregs->u_regs[UREG_FP] = (unsigned long)childstack;
395 childregs->psr &= ~PSR_EF;
400 childregs->u_regs[UREG_I0] = current->pid;
[all …]
/Linux-v4.19/arch/unicore32/kernel/
Dprocess.c230 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
233 thread->cpu_context.sp = (unsigned long)childregs; in copy_thread()
238 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
241 *childregs = *current_pt_regs(); in copy_thread()
242 childregs->UCreg_00 = 0; in copy_thread()
244 childregs->UCreg_sp = stack_start; in copy_thread()
247 childregs->UCreg_16 = childregs->UCreg_03; in copy_thread()
/Linux-v4.19/arch/x86/kernel/
Dprocess_32.c125 struct pt_regs *childregs = task_pt_regs(p); in copy_thread_tls() local
126 struct fork_frame *fork_frame = container_of(childregs, struct fork_frame, regs); in copy_thread_tls()
134 p->thread.sp0 = (unsigned long) (childregs+1); in copy_thread_tls()
139 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread_tls()
146 *childregs = *current_pt_regs(); in copy_thread_tls()
147 childregs->ax = 0; in copy_thread_tls()
149 childregs->sp = sp; in copy_thread_tls()
Dprocess_64.c293 struct pt_regs *childregs; in copy_thread_tls() local
298 childregs = task_pt_regs(p); in copy_thread_tls()
299 fork_frame = container_of(childregs, struct fork_frame, regs); in copy_thread_tls()
316 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread_tls()
322 *childregs = *current_pt_regs(); in copy_thread_tls()
324 childregs->ax = 0; in copy_thread_tls()
326 childregs->sp = sp; in copy_thread_tls()
/Linux-v4.19/arch/alpha/kernel/
Dprocess.c246 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
250 childstack = ((struct switch_stack *) childregs) - 1; in copy_thread()
261 childregs->hae = alpha_mv.hae_cache, in copy_thread()
275 *childregs = *regs; in copy_thread()
276 childregs->r0 = 0; in copy_thread()
277 childregs->r19 = 0; in copy_thread()
278 childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */ in copy_thread()
/Linux-v4.19/arch/arm/kernel/
Dprocess.c234 struct pt_regs *childregs = task_pt_regs(p); in copy_thread() local
249 *childregs = *current_pt_regs(); in copy_thread()
250 childregs->ARM_r0 = 0; in copy_thread()
252 childregs->ARM_sp = stack_start; in copy_thread()
254 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
257 childregs->ARM_cpsr = SVC_MODE; in copy_thread()
260 thread->cpu_context.sp = (unsigned long)childregs; in copy_thread()
265 thread->tp_value[0] = childregs->ARM_r3; in copy_thread()
/Linux-v4.19/arch/mips/kernel/
Dprocess.c125 struct pt_regs *childregs, *regs = current_pt_regs(); in copy_thread_tls() local
131 childregs = (struct pt_regs *) childksp - 1; in copy_thread_tls()
133 childksp = (unsigned long) childregs; in copy_thread_tls()
138 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread_tls()
150 childregs->cp0_status = status; in copy_thread_tls()
155 *childregs = *regs; in copy_thread_tls()
156 childregs->regs[7] = 0; /* Clear error flag */ in copy_thread_tls()
157 childregs->regs[2] = 0; /* Child gets zero as return value */ in copy_thread_tls()
159 childregs->regs[29] = usp; in copy_thread_tls()
162 p->thread.reg29 = (unsigned long) childregs; in copy_thread_tls()
[all …]
/Linux-v4.19/arch/powerpc/kernel/
Dprocess.c1631 struct pt_regs *childregs, *kregs; in copy_thread() local
1642 childregs = (struct pt_regs *) sp; in copy_thread()
1645 memset(childregs, 0, sizeof(struct pt_regs)); in copy_thread()
1646 childregs->gpr[1] = sp + sizeof(struct pt_regs); in copy_thread()
1649 childregs->gpr[14] = ppc_function_entry((void *)usp); in copy_thread()
1652 childregs->softe = IRQS_ENABLED; in copy_thread()
1654 childregs->gpr[15] = kthread_arg; in copy_thread()
1662 *childregs = *regs; in copy_thread()
1664 childregs->gpr[1] = usp; in copy_thread()
1665 p->thread.regs = childregs; in copy_thread()
[all …]