From: Alex Dowad <alexinbeijing@gmail.com>
To: linux-kernel@vget.kernel.org
Cc: Mark Salter <msalter@redhat.com>,
Aurelien Jacquiot <a-jacquiot@ti.com>,
linux-c6x-dev@linux-c6x.org (open list:C6X ARCHITECTURE),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 08/32] c6x: copy_thread(): rename 'ustk_size' argument to 'kthread_arg'
Date: Fri, 13 Mar 2015 20:04:23 +0200 [thread overview]
Message-ID: <1426269888-25600-8-git-send-email-alexinbeijing@gmail.com> (raw)
In-Reply-To: <1426269888-25600-1-git-send-email-alexinbeijing@gmail.com>
'ustk_size' is a misnomer: it is never used for the size of the user stack. It is
only used when forking a new kernel thread, as the argument passed to the kthread's
main function.
Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
---
arch/c6x/kernel/process.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c
index 57d2ea8..b519377 100644
--- a/arch/c6x/kernel/process.c
+++ b/arch/c6x/kernel/process.c
@@ -109,10 +109,10 @@ void start_thread(struct pt_regs *regs, unsigned int pc, unsigned long usp)
}
/*
- * Copy a new thread context in its stack.
+ * Copy architecture-specific thread state
*/
int copy_thread(unsigned long clone_flags, unsigned long usp,
- unsigned long ustk_size,
+ unsigned long kthread_arg,
struct task_struct *p)
{
struct pt_regs *childregs;
@@ -125,9 +125,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
childregs->sp = (unsigned long)(childregs + 1);
p->thread.pc = (unsigned long) ret_from_kernel_thread;
childregs->a0 = usp; /* function */
- childregs->a1 = ustk_size; /* argument */
+ childregs->a1 = kthread_arg;
} else {
- /* Otherwise use the given stack */
+ /* user thread: use the given stack */
*childregs = *current_pt_regs();
if (usp)
childregs->sp = usp;
--
2.0.0.GIT
next prev parent reply other threads:[~2015-03-13 18:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:04 [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use Alex Dowad
2015-03-13 18:04 ` [PATCH 02/32] alpha: copy_thread(): rename 'arg' argument to 'kthread_arg' Alex Dowad
2015-03-13 18:04 ` [PATCH 03/32] arc: " Alex Dowad
2015-03-25 11:47 ` Vineet Gupta
2015-03-25 12:34 ` Alex Dowad
2015-03-25 12:37 ` Vineet Gupta
2015-03-13 18:04 ` [PATCH 04/32] arm: copy_thread(): rename 'stk_sz' " Alex Dowad
2015-03-13 18:04 ` [PATCH 05/32] arm64: " Alex Dowad
2015-03-13 18:04 ` [PATCH 06/32] avr32: copy_thread(): rename 'arg' " Alex Dowad
2015-03-16 7:03 ` Hans-Christian Egtvedt
2015-03-16 8:18 ` [PATCHv2 " Alex Dowad
2015-03-16 9:52 ` Hans-Christian Egtvedt
2015-03-13 18:04 ` [PATCH 07/32] blackfin: copy_thread(): rename 'topstk' " Alex Dowad
2015-03-13 18:04 ` Alex Dowad [this message]
2015-03-13 18:04 ` [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:04 ` [PATCH 10/32] cris/arch-v32: " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:18 ` [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use Aaron Tomlin
2015-03-13 23:04 ` josh
2015-03-13 23:21 ` David Rientjes
2015-03-14 17:14 ` Alex Dowad
2015-03-14 16:19 ` Alex Dowad
2015-03-14 17:30 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426269888-25600-8-git-send-email-alexinbeijing@gmail.com \
--to=alexinbeijing@gmail.com \
--cc=a-jacquiot@ti.com \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kernel@vget.kernel.org \
--cc=msalter@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®