From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030283AbbCMSR3 (ORCPT ); Fri, 13 Mar 2015 14:17:29 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:37361 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161206AbbCMSRY (ORCPT ); Fri, 13 Mar 2015 14:17:24 -0400 From: Alex Dowad To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org (maintainer:X86 ARCHITECTURE...), Oleg Nesterov , Andy Lutomirski , Suresh Siddha , Andi Kleen Subject: [PATCH 31/32] x86: copy_thread(): rename 'arg' argument to 'kthread_arg' Date: Fri, 13 Mar 2015 20:14:54 +0200 Message-Id: <1426270496-26362-21-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 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/x86/kernel/process_32.c | 9 +++++++-- arch/x86/kernel/process_64.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 603c4f9..efb4a6b 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -129,8 +129,11 @@ void release_thread(struct task_struct *dead_task) release_vm86_irqs(dead_task); } +/* + * Copy architecture-specific thread state + */ int copy_thread(unsigned long clone_flags, unsigned long sp, - unsigned long arg, struct task_struct *p) + unsigned long kthread_arg, struct task_struct *p) { struct pt_regs *childregs = task_pt_regs(p); struct task_struct *tsk; @@ -149,13 +152,15 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, childregs->es = __USER_DS; childregs->fs = __KERNEL_PERCPU; childregs->bx = sp; /* function */ - childregs->bp = arg; + childregs->bp = kthread_arg; childregs->orig_ax = -1; childregs->cs = __KERNEL_CS | get_kernel_rpl(); childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED; p->thread.io_bitmap_ptr = NULL; return 0; } + + /* user thread */ *childregs = *current_pt_regs(); childregs->ax = 0; if (sp) diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 67fcc43..a27abb6 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -151,8 +151,11 @@ static inline u32 read_32bit_tls(struct task_struct *t, int tls) return get_desc_base(&t->thread.tls_array[tls]); } +/* + * Copy architecture-specific thread state + */ int copy_thread(unsigned long clone_flags, unsigned long sp, - unsigned long arg, struct task_struct *p) + unsigned long kthread_arg, struct task_struct *p) { int err; struct pt_regs *childregs; @@ -179,12 +182,14 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, childregs->sp = (unsigned long)childregs; childregs->ss = __KERNEL_DS; childregs->bx = sp; /* function */ - childregs->bp = arg; + childregs->bp = kthread_arg; childregs->orig_ax = -1; childregs->cs = __KERNEL_CS | get_kernel_rpl(); childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED; return 0; } + + /* user thread */ *childregs = *current_pt_regs(); childregs->ax = 0; -- 2.0.0.GIT