Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-19 Thread Chris Metcalf

On 03/16/2015 04:44 PM, Alex Dowad wrote:


On 16/03/15 22:19, Chris Metcalf wrote:

On 3/13/2015 2:14 PM, 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()).


Signed-off-by: Alex Dowad
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf 

If you would prefer me to take this into the tile tree, let me know, 
and I am happy to do so.



Hi Chris,

Thanks for your kind offer. I am a 100% genuine true-blue kernel 
newbie and have no idea whether a change like this should be merged 
individually by each arch maintainer, or all together at some point 
upstream (or is it downstream? I'm not sure about my streams). Do you 
have any suggestion?


Thank you again! AD


I think James Hogan's replies were on-target [1].  My sense is that 
since it's a cleanup, and since you're trying for consistency, if you 
can gather up a few Acked-by's from maintainers, it probably makes sense 
to have it taken as a series.


[1] https://lkml.org/lkml/2015/3/16/477

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-19 Thread Chris Metcalf

On 03/16/2015 04:44 PM, Alex Dowad wrote:


On 16/03/15 22:19, Chris Metcalf wrote:

On 3/13/2015 2:14 PM, 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()).


Signed-off-by: Alex Dowadalexinbeij...@gmail.com
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf cmetc...@ezchip.com

If you would prefer me to take this into the tile tree, let me know, 
and I am happy to do so.



Hi Chris,

Thanks for your kind offer. I am a 100% genuine true-blue kernel 
newbie and have no idea whether a change like this should be merged 
individually by each arch maintainer, or all together at some point 
upstream (or is it downstream? I'm not sure about my streams). Do you 
have any suggestion?


Thank you again! AD


I think James Hogan's replies were on-target [1].  My sense is that 
since it's a cleanup, and since you're trying for consistency, if you 
can gather up a few Acked-by's from maintainers, it probably makes sense 
to have it taken as a series.


[1] https://lkml.org/lkml/2015/3/16/477

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-16 Thread Alex Dowad


On 16/03/15 22:19, Chris Metcalf wrote:

On 3/13/2015 2:14 PM, 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()).


Signed-off-by: Alex Dowad
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf 

If you would prefer me to take this into the tile tree, let me know, 
and I am happy to do so.



Hi Chris,

Thanks for your kind offer. I am a 100% genuine true-blue kernel newbie 
and have no idea whether a change like this should be merged 
individually by each arch maintainer, or all together at some point 
upstream (or is it downstream? I'm not sure about my streams). Do you 
have any suggestion?


Thank you again! AD
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-16 Thread Chris Metcalf

On 3/13/2015 2:14 PM, 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()).

Signed-off-by: Alex Dowad
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf 

If you would prefer me to take this into the tile tree, let me know, and I am 
happy to do so.

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-16 Thread Chris Metcalf

On 3/13/2015 2:14 PM, 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()).

Signed-off-by: Alex Dowadalexinbeij...@gmail.com
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf cmetc...@ezchip.com

If you would prefer me to take this into the tile tree, let me know, and I am 
happy to do so.

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-16 Thread Alex Dowad


On 16/03/15 22:19, Chris Metcalf wrote:

On 3/13/2015 2:14 PM, 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()).


Signed-off-by: Alex Dowadalexinbeij...@gmail.com
---
  arch/tile/kernel/process.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)


Acked-by: Chris Metcalf cmetc...@ezchip.com

If you would prefer me to take this into the tile tree, let me know, 
and I am happy to do so.



Hi Chris,

Thanks for your kind offer. I am a 100% genuine true-blue kernel newbie 
and have no idea whether a change like this should be merged 
individually by each arch maintainer, or all together at some point 
upstream (or is it downstream? I'm not sure about my streams). Do you 
have any suggestion?


Thank you again! AD
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-13 Thread Alex Dowad
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/tile/kernel/process.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 48e5773..bff52e4 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -97,8 +97,11 @@ void arch_release_thread_info(struct thread_info *info)
 
 static void save_arch_state(struct thread_struct *t);
 
+/*
+ * 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);
unsigned long ksp;
@@ -130,15 +133,15 @@ int copy_thread(unsigned long clone_flags, unsigned long 
sp,
memset(_regs[2], 0,
   (CALLEE_SAVED_REGS_COUNT - 2) * sizeof(unsigned long));
callee_regs[0] = sp;   /* r30 = function */
-   callee_regs[1] = arg;  /* r31 = arg */
+   callee_regs[1] = kthread_arg; /* r31 = arg */
childregs->ex1 = PL_ICS_EX1(KERNEL_PL, 0);
p->thread.pc = (unsigned long) ret_from_kernel_thread;
return 0;
}
 
/*
-* Start new thread in ret_from_fork so it schedules properly
-* and then return from interrupt like the parent.
+* user thread: start in ret_from_fork so it schedules properly
+* and then returns from interrupt like the parent.
 */
p->thread.pc = (unsigned long) ret_from_fork;
 
-- 
2.0.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-13 Thread Alex Dowad
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 alexinbeij...@gmail.com
---
 arch/tile/kernel/process.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 48e5773..bff52e4 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -97,8 +97,11 @@ void arch_release_thread_info(struct thread_info *info)
 
 static void save_arch_state(struct thread_struct *t);
 
+/*
+ * 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);
unsigned long ksp;
@@ -130,15 +133,15 @@ int copy_thread(unsigned long clone_flags, unsigned long 
sp,
memset(callee_regs[2], 0,
   (CALLEE_SAVED_REGS_COUNT - 2) * sizeof(unsigned long));
callee_regs[0] = sp;   /* r30 = function */
-   callee_regs[1] = arg;  /* r31 = arg */
+   callee_regs[1] = kthread_arg; /* r31 = arg */
childregs-ex1 = PL_ICS_EX1(KERNEL_PL, 0);
p-thread.pc = (unsigned long) ret_from_kernel_thread;
return 0;
}
 
/*
-* Start new thread in ret_from_fork so it schedules properly
-* and then return from interrupt like the parent.
+* user thread: start in ret_from_fork so it schedules properly
+* and then returns from interrupt like the parent.
 */
p-thread.pc = (unsigned long) ret_from_fork;
 
-- 
2.0.0.GIT

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/