Skip to contentSkip to conversation

do_fork updates for ppc

PATCH New Christoph Hellwig 1 participant 1 message May 20, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_fork updates for ppc

Update ppc for mingo's do_fork changes. Together with the pmac compile fixes this allows me to stay at the bledding edge with my my ibook..

Paul, any chance for sending Linus more updates from the linuxppc tree? I still can't build SMP or the sound drivers in mainline..

arch/ppc/kernel/process.c +5 -12
@@ -445,33 +445,26 @@
 	      void *child_threadptr, int *child_tidp, int p6,
 	      struct pt_regs *regs)
 {
- 	struct task_struct *p;
-
 	CHECK_FULL_REGS(regs);
 	if (usp == 0)
 		usp = regs->gpr[1];	/* stack pointer for child */
- 	p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0,
-		    parent_tidp, child_tidp);
- 	return IS_ERR(p) ? PTR_ERR(p) : p->pid;
+ 	return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0,
+			parent_tidp, child_tidp);
 }
 
 int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
 	     struct pt_regs *regs)
 {
-	struct task_struct *p;
 	CHECK_FULL_REGS(regs);
-	p = do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
-	return IS_ERR(p) ? PTR_ERR(p) : p->pid;
+	return do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
 }
 
 int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
 	      struct pt_regs *regs)
 {
-	struct task_struct *p;
 	CHECK_FULL_REGS(regs);
-	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 do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gpr[1],
+			regs, 0, NULL, NULL);
 }
 
 int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,

===== arch/ppc/kernel/smp.c 1.32 vs edited =====

arch/ppc/kernel/smp.c +1 -1
@@ -403,7 +403,7 @@
 	/* create a process for the processor */
 	/* only regs.msr is actually used, and 0 is OK for it */
 	memset(&regs, 0, sizeof(struct pt_regs));
-	p = do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
+	p = copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
 	if (IS_ERR(p))
 		panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
 

===== drivers/ide/ppc/pmac.c 1.12 vs edited =====