aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index f98c17ff1957..90084a6de35a 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -373,7 +373,6 @@ void release_thread(struct task_struct *dead_task)
373} 373}
374 374
375asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); 375asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
376asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread");
377 376
378int 377int
379copy_thread(unsigned long clone_flags, unsigned long stack_start, 378copy_thread(unsigned long clone_flags, unsigned long stack_start,
@@ -388,13 +387,13 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
388 *childregs = *regs; 387 *childregs = *regs;
389 childregs->ARM_r0 = 0; 388 childregs->ARM_r0 = 0;
390 childregs->ARM_sp = stack_start; 389 childregs->ARM_sp = stack_start;
391 thread->cpu_context.pc = (unsigned long)ret_from_fork;
392 } else { 390 } else {
391 memset(childregs, 0, sizeof(struct pt_regs));
393 thread->cpu_context.r4 = stk_sz; 392 thread->cpu_context.r4 = stk_sz;
394 thread->cpu_context.r5 = stack_start; 393 thread->cpu_context.r5 = stack_start;
395 thread->cpu_context.pc = (unsigned long)ret_from_kernel_thread;
396 childregs->ARM_cpsr = SVC_MODE; 394 childregs->ARM_cpsr = SVC_MODE;
397 } 395 }
396 thread->cpu_context.pc = (unsigned long)ret_from_fork;
398 thread->cpu_context.sp = (unsigned long)childregs; 397 thread->cpu_context.sp = (unsigned long)childregs;
399 398
400 clear_ptrace_hw_breakpoint(p); 399 clear_ptrace_hw_breakpoint(p);