Commit efdf8520 authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents cebce9d8 dd6714bd
...@@ -182,9 +182,7 @@ syscall_exit_cont: ...@@ -182,9 +182,7 @@ syscall_exit_cont:
.globl ret_from_fork .globl ret_from_fork
ret_from_fork: ret_from_fork:
REST_NVGPRS(r1) REST_NVGPRS(r1)
#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
bl schedule_tail bl schedule_tail
#endif
li r3,0 li r3,0
b ret_from_syscall b ret_from_syscall
......
...@@ -1006,6 +1006,7 @@ _GLOBAL(kernel_thread) ...@@ -1006,6 +1006,7 @@ _GLOBAL(kernel_thread)
mr r31,r4 /* argument */ mr r31,r4 /* argument */
ori r3,r5,CLONE_VM /* flags */ ori r3,r5,CLONE_VM /* flags */
oris r3,r3,CLONE_UNTRACED>>16 oris r3,r3,CLONE_UNTRACED>>16
li r4,0 /* new sp (unused) */
li r0,__NR_clone li r0,__NR_clone
sc sc
cmpi 0,r3,0 /* parent or child? */ cmpi 0,r3,0 /* parent or child? */
......
...@@ -332,7 +332,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -332,7 +332,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned long sp = (unsigned long)p->thread_info + THREAD_SIZE; unsigned long sp = (unsigned long)p->thread_info + THREAD_SIZE;
unsigned long childframe; unsigned long childframe;
p->user_tid = NULL; p->set_child_tid = p->clear_child_tid = NULL;
CHECK_FULL_REGS(regs); CHECK_FULL_REGS(regs);
/* Copy registers */ /* Copy registers */
...@@ -344,8 +344,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -344,8 +344,10 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childregs->gpr[1] = sp + sizeof(struct pt_regs); childregs->gpr[1] = sp + sizeof(struct pt_regs);
childregs->gpr[2] = (unsigned long) p; childregs->gpr[2] = (unsigned long) p;
p->thread.regs = NULL; /* no user register state */ p->thread.regs = NULL; /* no user register state */
} else } else {
childregs->gpr[1] = usp;
p->thread.regs = childregs; p->thread.regs = childregs;
}
childregs->gpr[3] = 0; /* Result from fork() */ childregs->gpr[3] = 0; /* Result from fork() */
sp -= STACK_FRAME_OVERHEAD; sp -= STACK_FRAME_OVERHEAD;
childframe = sp; childframe = sp;
...@@ -449,9 +451,9 @@ int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6, ...@@ -449,9 +451,9 @@ int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6,
struct task_struct *p; struct task_struct *p;
CHECK_FULL_REGS(regs); CHECK_FULL_REGS(regs);
if ((p1 & (CLONE_SETTID | CLONE_CLEARTID)) == 0) if (p2 == 0)
p3 = 0; p2 = regs->gpr[1]; /* stack pointer for child */
p = do_fork(p1 & ~CLONE_IDLETASK, p2, regs, 0, (int *)p3); p = do_fork(p1 & ~CLONE_IDLETASK, p2, regs, 0, (int *)p3, (int *)p4);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -460,7 +462,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6, ...@@ -460,7 +462,7 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
{ {
struct task_struct *p; struct task_struct *p;
CHECK_FULL_REGS(regs); CHECK_FULL_REGS(regs);
p = do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL); p = do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -469,7 +471,8 @@ int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6, ...@@ -469,7 +471,8 @@ int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
{ {
struct task_struct *p; struct task_struct *p;
CHECK_FULL_REGS(regs); CHECK_FULL_REGS(regs);
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gpr[1], regs, 0, NULL); p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gpr[1], regs,
0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment