lkml.org 
[lkml]   [2015]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/32] microblaze: copy_thread(): rename 'arg' argument to 'kthread_arg'
Date
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@gmail.com>
---
arch/microblaze/kernel/process.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index b2dd371..d4ecb98 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -51,20 +51,22 @@ void flush_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 thread_info *ti = task_thread_info(p);

if (unlikely(p->flags & PF_KTHREAD)) {
- /* if we're creating a new kernel thread then just zeroing all
- * the registers. That's OK for a brand new thread.*/
+ /* kernel thread: just zero all the registers */
memset(childregs, 0, sizeof(struct pt_regs));
memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
ti->cpu_context.r1 = (unsigned long)childregs;
ti->cpu_context.r20 = (unsigned long)usp; /* fn */
- ti->cpu_context.r19 = (unsigned long)arg;
+ ti->cpu_context.r19 = kthread_arg;
childregs->pt_mode = 1;
local_save_flags(childregs->msr);
#ifdef CONFIG_MMU
@@ -73,6 +75,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
return 0;
}
+
+ /* user thread */
*childregs = *current_pt_regs();
if (usp)
childregs->r1 = usp;
--
2.0.0.GIT


\
 
 \ /
  Last update: 2015-03-13 19:41    [W:0.220 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site