[3/3] openrisc: Cleanup copy_thread_tls docs and comments
diff mbox series

Message ID 20200226225625.28935-4-shorne@gmail.com
State Superseded
Headers show
Series
  • OpenRISC clone3 support
Related show

Commit Message

Stafford Horne Feb. 26, 2020, 10:56 p.m. UTC
Previously copy_thread_tls was copy_thread and before that something
else.  Remove the documentation about the regs parameter that didn't
exist in either version.

Next, fix comment wrapping and details about how TLS pointer gets to the
copy_thread_tls function.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 arch/openrisc/kernel/process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Christian Brauner Feb. 27, 2020, 12:24 p.m. UTC | #1
On Thu, Feb 27, 2020 at 07:56:25AM +0900, Stafford Horne wrote:
> Previously copy_thread_tls was copy_thread and before that something
> else.  Remove the documentation about the regs parameter that didn't
> exist in either version.
> 
> Next, fix comment wrapping and details about how TLS pointer gets to the
> copy_thread_tls function.
> 
> Signed-off-by: Stafford Horne <shorne@gmail.com>

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

> ---
>  arch/openrisc/kernel/process.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
> index 6695f167e126..b442e7b59e17 100644
> --- a/arch/openrisc/kernel/process.c
> +++ b/arch/openrisc/kernel/process.c
> @@ -122,7 +122,6 @@ extern asmlinkage void ret_from_fork(void);
>   * @usp: user stack pointer or fn for kernel thread
>   * @arg: arg to fn for kernel thread; always NULL for userspace thread
>   * @p: the newly created task
> - * @regs: CPU context to copy for userspace thread; always NULL for kthread
>   * @tls: the Thread Local Storate pointer for the new process
>   *
>   * At the top of a newly initialized kernel stack are two stacked pt_reg
> @@ -180,7 +179,8 @@ copy_thread_tls(unsigned long clone_flags, unsigned long usp,
>  			userregs->sp = usp;
>  
>  		/*
> -		 * For CLONE_SETTLS set "tp" (r10) to the TLS pointer passed to sys_clone.
> +		 * For CLONE_SETTLS set "tp" (r10) to the TLS pointer passed
> +		 * in clone_args to sys_clone3.

As I said in my other reply, I'd not reference any specific caller since
we have at least two.

Christian

Patch
diff mbox series

diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index 6695f167e126..b442e7b59e17 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -122,7 +122,6 @@  extern asmlinkage void ret_from_fork(void);
  * @usp: user stack pointer or fn for kernel thread
  * @arg: arg to fn for kernel thread; always NULL for userspace thread
  * @p: the newly created task
- * @regs: CPU context to copy for userspace thread; always NULL for kthread
  * @tls: the Thread Local Storate pointer for the new process
  *
  * At the top of a newly initialized kernel stack are two stacked pt_reg
@@ -180,7 +179,8 @@  copy_thread_tls(unsigned long clone_flags, unsigned long usp,
 			userregs->sp = usp;
 
 		/*
-		 * For CLONE_SETTLS set "tp" (r10) to the TLS pointer passed to sys_clone.
+		 * For CLONE_SETTLS set "tp" (r10) to the TLS pointer passed
+		 * in clone_args to sys_clone3.
 		 */
 		if (clone_flags & CLONE_SETTLS)
 			userregs->gpr[10] = tls;