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: Alex Dowad
---
arch/cris/arch-v32/kernel/process.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/cris/arch-v32/kernel/process.c
b/arch/cris/arch-v32/kernel/process.c
index cebd32e..dc55e6c 100644
--- a/arch/cris/arch-v32/kernel/process.c
+++ b/arch/cris/arch-v32/kernel/process.c
@@ -101,9 +101,12 @@ unsigned long thread_saved_pc(struct task_struct *t)
extern asmlinkage void ret_from_fork(void);
extern asmlinkage void ret_from_kernel_thread(void);
+/*
+ * Copy architecture-specific thread state
+ */
int
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 *childregs = task_pt_regs(p);
struct switch_stack *swstack = ((struct switch_stack *) childregs) - 1;
@@ -114,10 +117,11 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
* task.
*/
if (unlikely(p->flags & PF_KTHREAD)) {
+ /* kernel thread */
memset(swstack, 0,
sizeof(struct switch_stack) + sizeof(struct pt_regs));
swstack->r1 = usp;
- swstack->r2 = arg;
+ swstack->r2 = kthread_arg;
childregs->ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
swstack->return_ip = (unsigned long) ret_from_kernel_thread;
p->thread.ksp = (unsigned long) swstack;
--
2.0.0.GIT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/