'ustk_size' is a misnomer: it is never used for the size of the user stack. It 
is
only used when forking a new kernel thread, as the argument passed to the 
kthread's
main function.

Signed-off-by: Alex Dowad <alexinbeij...@gmail.com>
---
 arch/c6x/kernel/process.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c
index 57d2ea8..b519377 100644
--- a/arch/c6x/kernel/process.c
+++ b/arch/c6x/kernel/process.c
@@ -109,10 +109,10 @@ void start_thread(struct pt_regs *regs, unsigned int pc, 
unsigned long usp)
 }
 
 /*
- * Copy a new thread context in its stack.
+ * Copy architecture-specific thread state
  */
 int copy_thread(unsigned long clone_flags, unsigned long usp,
-               unsigned long ustk_size,
+               unsigned long kthread_arg,
                struct task_struct *p)
 {
        struct pt_regs *childregs;
@@ -125,9 +125,9 @@ int copy_thread(unsigned long clone_flags, unsigned long 
usp,
                childregs->sp = (unsigned long)(childregs + 1);
                p->thread.pc = (unsigned long) ret_from_kernel_thread;
                childregs->a0 = usp;            /* function */
-               childregs->a1 = ustk_size;      /* argument */
+               childregs->a1 = kthread_arg;
        } else {
-               /* Otherwise use the given stack */
+               /* user thread: use the given stack */
                *childregs = *current_pt_regs();
                if (usp)
                        childregs->sp = usp;
-- 
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/

Reply via email to