diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2015-03-13 14:14:45 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2015-04-24 07:45:55 -0400 |
commit | 5fec97d0e3d93717f1d6a958a03e579078088861 (patch) | |
tree | 7d47cc0f0db5f5bdff0d7a9f6f06f000cb588b70 /arch/parisc/kernel | |
parent | a4e4f67f41d9bfcc2a00849a75712f09a7d43798 (diff) |
parisc: 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@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/process.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 8a488c22a99f..809905a811ed 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -181,9 +181,12 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r) | |||
181 | return 1; | 181 | return 1; |
182 | } | 182 | } |
183 | 183 | ||
184 | /* | ||
185 | * Copy architecture-specific thread state | ||
186 | */ | ||
184 | int | 187 | int |
185 | copy_thread(unsigned long clone_flags, unsigned long usp, | 188 | copy_thread(unsigned long clone_flags, unsigned long usp, |
186 | unsigned long arg, struct task_struct *p) | 189 | unsigned long kthread_arg, struct task_struct *p) |
187 | { | 190 | { |
188 | struct pt_regs *cregs = &(p->thread.regs); | 191 | struct pt_regs *cregs = &(p->thread.regs); |
189 | void *stack = task_stack_page(p); | 192 | void *stack = task_stack_page(p); |
@@ -195,11 +198,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
195 | extern void * const child_return; | 198 | extern void * const child_return; |
196 | 199 | ||
197 | if (unlikely(p->flags & PF_KTHREAD)) { | 200 | if (unlikely(p->flags & PF_KTHREAD)) { |
201 | /* kernel thread */ | ||
198 | memset(cregs, 0, sizeof(struct pt_regs)); | 202 | memset(cregs, 0, sizeof(struct pt_regs)); |
199 | if (!usp) /* idle thread */ | 203 | if (!usp) /* idle thread */ |
200 | return 0; | 204 | return 0; |
201 | |||
202 | /* kernel thread */ | ||
203 | /* Must exit via ret_from_kernel_thread in order | 205 | /* Must exit via ret_from_kernel_thread in order |
204 | * to call schedule_tail() | 206 | * to call schedule_tail() |
205 | */ | 207 | */ |
@@ -215,7 +217,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
215 | #else | 217 | #else |
216 | cregs->gr[26] = usp; | 218 | cregs->gr[26] = usp; |
217 | #endif | 219 | #endif |
218 | cregs->gr[25] = arg; | 220 | cregs->gr[25] = kthread_arg; |
219 | } else { | 221 | } else { |
220 | /* user thread */ | 222 | /* user thread */ |
221 | /* usp must be word aligned. This also prevents users from | 223 | /* usp must be word aligned. This also prevents users from |