From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756696AbbCMSTZ (ORCPT ); Fri, 13 Mar 2015 14:19:25 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:33637 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932604AbbCMSPn (ORCPT ); Fri, 13 Mar 2015 14:15:43 -0400 From: Alex Dowad To: linux-kernel@vger.kernel.org Cc: David Howells , Koichi Yasutake , linux-am33-list@redhat.com (moderated list:PANASONIC MN10300...) Subject: [PATCH 19/32] mn10300: copy_thread(): rename 'ustk_size' argument to 'kthread_arg' Date: Fri, 13 Mar 2015 20:14:42 +0200 Message-Id: <1426270496-26362-9-git-send-email-alexinbeijing@gmail.com> X-Mailer: git-send-email 2.0.0.GIT In-Reply-To: <1426270496-26362-1-git-send-email-alexinbeijing@gmail.com> References: <1426270496-26362-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 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 --- 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