Commit 5fec97d0 authored by Alex Dowad's avatar Alex Dowad Committed by Helge Deller

parisc: copy_thread(): rename 'arg' argument to 'kthread_arg'

The 'arg' argument to copy_thread() is only ever used when forking a new
kernel thread. Hence, rename it to 'kthread_arg' for clarity (and
consistency with do_fork() and other arch-specific implementations of
copy_thread()).
Signed-off-by: default avatarAlex Dowad <alexinbeijing@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent a4e4f67f
...@@ -181,9 +181,12 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r) ...@@ -181,9 +181,12 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)
return 1; return 1;
} }
/*
* Copy architecture-specific thread state
*/
int int
copy_thread(unsigned long clone_flags, unsigned long usp, copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p) unsigned long kthread_arg, struct task_struct *p)
{ {
struct pt_regs *cregs = &(p->thread.regs); struct pt_regs *cregs = &(p->thread.regs);
void *stack = task_stack_page(p); void *stack = task_stack_page(p);
...@@ -195,11 +198,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -195,11 +198,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
extern void * const child_return; extern void * const child_return;
if (unlikely(p->flags & PF_KTHREAD)) { if (unlikely(p->flags & PF_KTHREAD)) {
/* kernel thread */
memset(cregs, 0, sizeof(struct pt_regs)); memset(cregs, 0, sizeof(struct pt_regs));
if (!usp) /* idle thread */ if (!usp) /* idle thread */
return 0; return 0;
/* kernel thread */
/* Must exit via ret_from_kernel_thread in order /* Must exit via ret_from_kernel_thread in order
* to call schedule_tail() * to call schedule_tail()
*/ */
...@@ -215,7 +217,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -215,7 +217,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
#else #else
cregs->gr[26] = usp; cregs->gr[26] = usp;
#endif #endif
cregs->gr[25] = arg; cregs->gr[25] = kthread_arg;
} else { } else {
/* user thread */ /* user thread */
/* usp must be word aligned. This also prevents users from /* usp must be word aligned. This also prevents users from
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment