summaryrefslogtreecommitdiff
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-22 22:51:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-28 23:43:42 -0500
commitafa86fc426ff7e7f5477f15da9c405d08d5cf790 (patch)
tree0f82925269757902ce6f7c287a968f7b439d2b2d /arch/blackfin/kernel
parent135c37b83c81b79a888108e3f7c5f64423d8a851 (diff)
flagday: don't pass regs to copy_thread()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index e5ae8fcab438..582276efaaa4 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -141,14 +141,14 @@ asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp)
int
copy_thread(unsigned long clone_flags,
unsigned long usp, unsigned long topstk,
- struct task_struct *p, struct pt_regs *regs)
+ struct task_struct *p)
{
struct pt_regs *childregs;
unsigned long *v;
childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
v = ((unsigned long *)childregs) - 2;
- if (unlikely(!regs)) {
+ if (unlikely(p->flags & PF_KTHREAD)) {
memset(childregs, 0, sizeof(struct pt_regs));
v[0] = usp;
v[1] = topstk;
@@ -157,7 +157,7 @@ copy_thread(unsigned long clone_flags,
__asm__ __volatile__("%0 = syscfg;":"=da"(childregs->syscfg):);
p->thread.usp = 0;
} else {
- *childregs = *regs;
+ *childregs = *current_pt_regs();
childregs->r0 = 0;
p->thread.usp = usp ? : rdusp();
v[0] = v[1] = 0;