* [PATCH][v850] Handle new do_fork return value on v850
@ 2003-05-27 9:21 Miles Bader
0 siblings, 0 replies; only message in thread
From: Miles Bader @ 2003-05-27 9:21 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
diff -ruN -X../cludes linux-2.5.70/arch/v850/kernel/entry.S linux-2.5.70-v850-20030527/arch/v850/kernel/entry.S
--- linux-2.5.70/arch/v850/kernel/entry.S 2003-04-21 10:52:40.000000000 +0900
+++ linux-2.5.70-v850-20030527/arch/v850/kernel/entry.S 2003-05-27 16:53:39.000000000 +0900
@@ -554,11 +571,14 @@
L_ENTRY(sys_fork_wrapper):
#ifdef CONFIG_MMU
- addi SIGCHLD, r0, r6 // Arg 0: flags
+ addi SIGCHLD, r0, r6 // Arg 0: flags
ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's)
- movea PTO, sp, r8 // Arg 2: parent context
- mov hilo(CSYM(fork_common)), r18// Where the real work gets done
- br save_extra_state_tramp // Save state and go there
+ movea PTO, sp, r8 // Arg 2: parent context
+ mov r0, r9 // Arg 3/4/5: 0
+ st.w r0, 16[sp]
+ st.w r0, 20[sp]
+ mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
+ br save_extra_state_tramp // Save state and go there
#else
// fork almost works, enough to trick you into looking elsewhere :-(
addi -EINVAL, r0, r10
@@ -569,18 +589,24 @@
L_ENTRY(sys_vfork_wrapper):
addi CLONE_VFORK | CLONE_VM | SIGCHLD, r0, r6 // Arg 0: flags
ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's)
- movea PTO, sp, r8 // Arg 2: parent context
- mov hilo(CSYM(fork_common)), r18// Where the real work gets done
- br save_extra_state_tramp // Save state and go there
+ movea PTO, sp, r8 // Arg 2: parent context
+ mov r0, r9 // Arg 3/4/5: 0
+ st.w r0, 16[sp]
+ st.w r0, 20[sp]
+ mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
+ br save_extra_state_tramp // Save state and go there
END(sys_vfork_wrapper)
L_ENTRY(sys_clone_wrapper):
- ld.w PTO+PT_GPR(GPR_SP)[sp], r19 // parent's stack pointer
- cmp r7, r0 // See if child SP arg (arg 1) is 0.
- cmov z, r19, r7, r7 // ... and use the parent's if so.
- movea PTO, sp, r8 // Arg 2: parent context
- mov hilo(CSYM(fork_common)), r18// Where the real work gets done
- br save_extra_state_tramp // Save state and go there
+ ld.w PTO+PT_GPR(GPR_SP)[sp], r19// parent's stack pointer
+ cmp r7, r0 // See if child SP arg (arg 1) is 0.
+ cmov z, r19, r7, r7 // ... and use the parent's if so.
+ movea PTO, sp, r8 // Arg 2: parent context
+ mov r0, r9 // Arg 3/4/5: 0
+ st.w r0, 16[sp]
+ st.w r0, 20[sp]
+ mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
+ br save_extra_state_tramp // Save state and go there
END(sys_clone_wrapper)
diff -ruN -X../cludes linux-2.5.70/arch/v850/kernel/process.c linux-2.5.70-v850-20030527/arch/v850/kernel/process.c
--- linux-2.5.70/arch/v850/kernel/process.c 2003-04-21 10:52:40.000000000 +0900
+++ linux-2.5.70-v850-20030527/arch/v850/kernel/process.c 2003-05-27 16:54:00.000000000 +0900
@@ -200,14 +200,6 @@
return error;
}
-/* This is the common part of the various fork-like system calls (which
- are in entry.S). */
-int fork_common (int flags, unsigned long new_sp, struct pt_regs *regs)
-{
- struct task_struct *p = do_fork (flags, new_sp, regs, 0, 0, 0);
- return IS_ERR (p) ? PTR_ERR (p) : p->pid;
-}
-
/*
* These bracket the sleeping functions..
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-27 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-27 9:21 [PATCH][v850] Handle new do_fork return value on v850 Miles Bader
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).