[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1426269888-25600-9-git-send-email-alexinbeijing@gmail.com>
Date: Fri, 13 Mar 2015 20:04:24 +0200
From: Alex Dowad <alexinbeijing@...il.com>
To: linux-kernel@...t.kernel.org
Cc: Mikael Starvik <starvik@...s.com>,
Jesper Nilsson <jesper.nilsson@...s.com>,
linux-cris-kernel@...s.com (open list:CRIS PORT),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' argument to 'kthread_arg'
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 <alexinbeijing@...il.com>
---
arch/cris/arch-v10/kernel/process.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c
index 02b7834..c8c73d3 100644
--- a/arch/cris/arch-v10/kernel/process.c
+++ b/arch/cris/arch-v10/kernel/process.c
@@ -94,8 +94,11 @@ unsigned long thread_saved_pc(struct task_struct *t)
asmlinkage void ret_from_fork(void);
asmlinkage void ret_from_kernel_thread(void);
+/*
+ * Copy architecture-specific thread state
+ */
int copy_thread(unsigned long clone_flags, unsigned long usp,
- unsigned long arg, struct task_struct *p)
+ unsigned long kthread_arg, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
struct switch_stack *swstack = ((struct switch_stack *)childregs) - 1;
@@ -105,10 +108,11 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
*/
if (unlikely(p->flags & PF_KTHREAD)) {
+ /* kernel thread */
memset(swstack, 0,
sizeof(struct switch_stack) + sizeof(struct pt_regs));
swstack->r1 = usp;
- swstack->r2 = arg;
+ swstack->r2 = kthread_arg;
childregs->dccr = 1 << I_DCCR_BITNR;
swstack->return_ip = (unsigned long) ret_from_kernel_thread;
p->thread.ksp = (unsigned long) swstack;
--
2.0.0.GIT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists