[PATCH 19/32] mn10300: copy_thread(): rename 'ustk_size' argument to 'kthread_arg'

From: Alex Dowad
Date: Fri Mar 13 2015 - 14:19:31 EST


'ustk_size' is misleading, since this argument is never used for a user stack
size. Rather, it is an argument passed to the main function executed by a new
kernel thread. Therefore, rename it to 'kthread_arg'.

Signed-off-by: Alex Dowad <alexinbeijing@xxxxxxxxx>
---
arch/mn10300/kernel/process.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 3707da5..d08a9b1 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -137,11 +137,10 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
}

/*
- * set up the kernel stack for a new thread and copy arch-specific thread
- * control information
+ * Copy architecture-specific thread state
*/
int copy_thread(unsigned long clone_flags,
- unsigned long c_usp, unsigned long ustk_size,
+ unsigned long c_usp, unsigned long kthread_arg,
struct task_struct *p)
{
struct thread_info *ti = task_thread_info(p);
@@ -164,14 +163,17 @@ int copy_thread(unsigned long clone_flags,
p->thread.usp = c_usp;

if (unlikely(p->flags & PF_KTHREAD)) {
+ /* kernel thread */
memset(c_regs, 0, sizeof(struct pt_regs));
c_regs->a0 = c_usp; /* function */
- c_regs->d0 = ustk_size; /* argument */
+ c_regs->d0 = kthread_arg;
local_save_flags(c_regs->epsw);
c_regs->epsw |= EPSW_IE | EPSW_IM_7;
p->thread.pc = (unsigned long) ret_from_kernel_thread;
return 0;
}
+
+ /* user thread */
*c_regs = *current_pt_regs();
if (c_usp)
c_regs->sp = c_usp;
--
2.0.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/