* [PATCH 23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' [not found] <1426270496-26362-1-git-send-email-alexinbeijing@gmail.com> @ 2015-03-13 18:14 ` Alex Dowad 2015-03-19 6:45 ` [23/32] " Michael Ellerman 0 siblings, 1 reply; 6+ messages in thread From: Alex Dowad @ 2015-03-13 18:14 UTC (permalink / raw) To: linux-kernel Cc: Michael Neuling, Paul Gortmaker, Paul Mackerras, Anton Blanchard, Vineeth Vijayan, Christoph Lameter, open list:LINUX FOR POWERPC... 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/powerpc/kernel/process.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index b4cc7be..febb50d 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1114,8 +1114,11 @@ static void setup_ksp_vsid(struct task_struct *p, unsigned long sp) */ extern unsigned long dscr_default; /* defined in arch/powerpc/kernel/sysfs.c */ +/* + * 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, *kregs; extern void ret_from_fork(void); @@ -1127,6 +1130,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, sp -= sizeof(struct pt_regs); childregs = (struct pt_regs *) sp; if (unlikely(p->flags & PF_KTHREAD)) { + /* kernel thread */ struct thread_info *ti = (void *)task_stack_page(p); memset(childregs, 0, sizeof(struct pt_regs)); childregs->gpr[1] = sp + sizeof(struct pt_regs); @@ -1137,11 +1141,12 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, clear_tsk_thread_flag(p, TIF_32BIT); childregs->softe = 1; #endif - childregs->gpr[15] = arg; + childregs->gpr[15] = kthread_arg; p->thread.regs = NULL; /* no user register state */ ti->flags |= _TIF_RESTOREALL; f = ret_from_kernel_thread; } else { + /* user thread */ struct pt_regs *regs = current_pt_regs(); CHECK_FULL_REGS(regs); *childregs = *regs; -- 2.0.0.GIT ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' 2015-03-13 18:14 ` [PATCH 23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' Alex Dowad @ 2015-03-19 6:45 ` Michael Ellerman 2015-03-19 7:22 ` Alex Dowad 0 siblings, 1 reply; 6+ messages in thread From: Michael Ellerman @ 2015-03-19 6:45 UTC (permalink / raw) To: Alex Dowad, linux-kernel Cc: Michael Neuling, Paul Gortmaker, Vineeth Vijayan, Anton Blanchard, Paul Mackerras, Christoph Lameter, open list:LINUX FOR POWERPC... On Fri, 2015-13-03 at 18:14:46 UTC, Alex Dowad wrote: > 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()). I don't understand the bit about consistency with do_fork() ? Otherwise it looks fine. cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' 2015-03-19 6:45 ` [23/32] " Michael Ellerman @ 2015-03-19 7:22 ` Alex Dowad 2015-03-19 23:54 ` Michael Ellerman 0 siblings, 1 reply; 6+ messages in thread From: Alex Dowad @ 2015-03-19 7:22 UTC (permalink / raw) To: Michael Ellerman, linux-kernel Cc: Michael Neuling, Paul Gortmaker, Vineeth Vijayan, Anton Blanchard, Paul Mackerras, Christoph Lameter, open list:LINUX FOR POWERPC... On 19/03/15 08:45, Michael Ellerman wrote: > On Fri, 2015-13-03 at 18:14:46 UTC, Alex Dowad wrote: >> 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()). > > I don't understand the bit about consistency with do_fork() ? This series of patches includes one patch which renames the arg for do_fork(), and others which rename the same arg for each arch-specific implementation of copy_thread(). So if all of them are accepted and merged, then all will be consistent. If only some of the patches are accepted, I will rewrite the commit message so it doesn't mention "consistency". Thanks! AD > > Otherwise it looks fine. > > cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' 2015-03-19 7:22 ` Alex Dowad @ 2015-03-19 23:54 ` Michael Ellerman 2015-03-24 19:49 ` Alex Dowad 0 siblings, 1 reply; 6+ messages in thread From: Michael Ellerman @ 2015-03-19 23:54 UTC (permalink / raw) To: Alex Dowad Cc: Michael Neuling, linux-kernel, Paul Gortmaker, Vineeth Vijayan, Anton Blanchard, Paul Mackerras, Christoph Lameter, open list:LINUX FOR POWERPC... On Thu, 2015-03-19 at 09:22 +0200, Alex Dowad wrote: > On 19/03/15 08:45, Michael Ellerman wrote: > > On Fri, 2015-13-03 at 18:14:46 UTC, Alex Dowad wrote: > >> 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()). > > > > I don't understand the bit about consistency with do_fork() ? > This series of patches includes one patch which renames the arg for > do_fork(), and others which rename the same arg for each arch-specific > implementation of copy_thread(). So if all of them are accepted and > merged, then all will be consistent. If only some of the patches are > accepted, I will rewrite the commit message so it doesn't mention > "consistency". Ah OK, I only got patch 23, so I missed the context of the whole series. I'll apply this one to the powerpc tree. cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' 2015-03-19 23:54 ` Michael Ellerman @ 2015-03-24 19:49 ` Alex Dowad 2015-03-25 1:35 ` Michael Ellerman 0 siblings, 1 reply; 6+ messages in thread From: Alex Dowad @ 2015-03-24 19:49 UTC (permalink / raw) To: Michael Ellerman Cc: Michael Neuling, linux-kernel, Paul Gortmaker, Vineeth Vijayan, Anton Blanchard, Paul Mackerras, Christoph Lameter, open list:LINUX FOR POWERPC... On 20/03/15 01:54, Michael Ellerman wrote: > On Thu, 2015-03-19 at 09:22 +0200, Alex Dowad wrote: >> On 19/03/15 08:45, Michael Ellerman wrote: >>> On Fri, 2015-13-03 at 18:14:46 UTC, Alex Dowad wrote: >>>> 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()). >>> >>> I don't understand the bit about consistency with do_fork() ? >>> >> This series of patches includes one patch which renames the arg for >> do_fork(), and others which rename the same arg for each arch-specific >> implementation of copy_thread(). So if all of them are accepted and >> merged, then all will be consistent. If only some of the patches are >> accepted, I will rewrite the commit message so it doesn't mention >> "consistency". > Ah OK, I only got patch 23, so I missed the context of the whole series. > > I'll apply this one to the powerpc tree. > Dear M. Ellerman, sorry for not replying promptly. If you would like to apply this directly to the powerpc tree, that is fine, but can I edit the commit message to remove the mention of 'consistency'? I doubt that all 30+ archs will ever merge this change. Thanks, Alex ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' 2015-03-24 19:49 ` Alex Dowad @ 2015-03-25 1:35 ` Michael Ellerman 0 siblings, 0 replies; 6+ messages in thread From: Michael Ellerman @ 2015-03-25 1:35 UTC (permalink / raw) To: Alex Dowad Cc: Michael Neuling, linux-kernel, Paul Gortmaker, Vineeth Vijayan, Anton Blanchard, Paul Mackerras, Christoph Lameter, open list:LINUX FOR POWERPC... On Tue, 2015-03-24 at 21:49 +0200, Alex Dowad wrote: > On 20/03/15 01:54, Michael Ellerman wrote: > > On Thu, 2015-03-19 at 09:22 +0200, Alex Dowad wrote: > >> On 19/03/15 08:45, Michael Ellerman wrote: > >>> On Fri, 2015-13-03 at 18:14:46 UTC, Alex Dowad wrote: > >>>> 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()). > >>> > >>> I don't understand the bit about consistency with do_fork() ? > >>> > >> This series of patches includes one patch which renames the arg for > >> do_fork(), and others which rename the same arg for each arch-specific > >> implementation of copy_thread(). So if all of them are accepted and > >> merged, then all will be consistent. If only some of the patches are > >> accepted, I will rewrite the commit message so it doesn't mention > >> "consistency". > > Ah OK, I only got patch 23, so I missed the context of the whole series. > > > > I'll apply this one to the powerpc tree. > > Dear M. Ellerman, sorry for not replying promptly. If you would like to > apply this directly to the powerpc tree, that is fine, but can I edit > the commit message to remove the mention of 'consistency'? I doubt that > all 30+ archs will ever merge this change. Thanks, Alex I merged it last week: https://git.kernel.org/cgit/linux/kernel/git/mpe/linux.git/commit/?h=next&id=6eca8933d3ff17bff39d5f10a2a22366d8622fa6 And I edited the commit message more or less as you describe. And feel free to call me Michael or mpe :) cheers ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-25 1:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1426270496-26362-1-git-send-email-alexinbeijing@gmail.com> 2015-03-13 18:14 ` [PATCH 23/32] powerpc: copy_thread(): rename 'arg' argument to 'kthread_arg' Alex Dowad 2015-03-19 6:45 ` [23/32] " Michael Ellerman 2015-03-19 7:22 ` Alex Dowad 2015-03-19 23:54 ` Michael Ellerman 2015-03-24 19:49 ` Alex Dowad 2015-03-25 1:35 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).