diff options
Diffstat (limited to 'arch/parisc/kernel/process.c')
| -rw-r--r-- | arch/parisc/kernel/process.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 4eb70a40ec7e..5da41677e70b 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
| @@ -295,7 +295,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
| 295 | struct task_struct * p, struct pt_regs * pregs) | 295 | struct task_struct * p, struct pt_regs * pregs) | 
| 296 | { | 296 | { | 
| 297 | struct pt_regs * cregs = &(p->thread.regs); | 297 | struct pt_regs * cregs = &(p->thread.regs); | 
| 298 | struct thread_info *ti = p->thread_info; | 298 | void *stack = task_stack_page(p); | 
| 299 | 299 | ||
| 300 | /* We have to use void * instead of a function pointer, because | 300 | /* We have to use void * instead of a function pointer, because | 
| 301 | * function pointers aren't a pointer to the function on 64-bit. | 301 | * function pointers aren't a pointer to the function on 64-bit. | 
| @@ -322,7 +322,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
| 322 | */ | 322 | */ | 
| 323 | if (usp == 1) { | 323 | if (usp == 1) { | 
| 324 | /* kernel thread */ | 324 | /* kernel thread */ | 
| 325 | cregs->ksp = (((unsigned long)(ti)) + THREAD_SZ_ALGN); | 325 | cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN; | 
| 326 | /* Must exit via ret_from_kernel_thread in order | 326 | /* Must exit via ret_from_kernel_thread in order | 
| 327 | * to call schedule_tail() | 327 | * to call schedule_tail() | 
| 328 | */ | 328 | */ | 
| @@ -344,7 +344,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
| 344 | */ | 344 | */ | 
| 345 | 345 | ||
| 346 | /* Use same stack depth as parent */ | 346 | /* Use same stack depth as parent */ | 
| 347 | cregs->ksp = ((unsigned long)(ti)) | 347 | cregs->ksp = (unsigned long)stack | 
| 348 | + (pregs->gr[21] & (THREAD_SIZE - 1)); | 348 | + (pregs->gr[21] & (THREAD_SIZE - 1)); | 
| 349 | cregs->gr[30] = usp; | 349 | cregs->gr[30] = usp; | 
| 350 | if (p->personality == PER_HPUX) { | 350 | if (p->personality == PER_HPUX) { | 
