From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161010AbbCMSH5 (ORCPT ); Fri, 13 Mar 2015 14:07:57 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:38603 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030334AbbCMSHx (ORCPT ); Fri, 13 Mar 2015 14:07:53 -0400 From: Alex Dowad To: linux-kernel@vget.kernel.org Cc: Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org (open list:C6X ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 08/32] c6x: copy_thread(): rename 'ustk_size' argument to 'kthread_arg' Date: Fri, 13 Mar 2015 20:04:23 +0200 Message-Id: <1426269888-25600-8-git-send-email-alexinbeijing@gmail.com> X-Mailer: git-send-email 2.0.0.GIT In-Reply-To: <1426269888-25600-1-git-send-email-alexinbeijing@gmail.com> References: <1426269888-25600-1-git-send-email-alexinbeijing@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org '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 --- 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