summaryrefslogtreecommitdiffstats
path: root/arch/h8300/kernel/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-27 06:07:24 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-29 04:46:54 +0100
commit3416e8098aa4c0eea1b2e5c4efc68cf61a848864 (patch)
treeafa086cb8cb285b677e6c990bff66af53076f7ce /arch/h8300/kernel/process.c
parenttile: switch to generic clone() (diff)
downloadlinux-3416e8098aa4c0eea1b2e5c4efc68cf61a848864.tar.xz
linux-3416e8098aa4c0eea1b2e5c4efc68cf61a848864.zip
h8300: switch to generic fork/vfork/clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/h8300/kernel/process.c')
-rw-r--r--arch/h8300/kernel/process.c38
1 files changed, 3 insertions, 35 deletions
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index 2a45718cc5e8..b0fb4054aee5 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -127,40 +127,9 @@ void flush_thread(void)
{
}
-/*
- * "h8300_fork()".. By the time we get here, the
- * non-volatile registers have also been saved on the
- * stack. We do some ugly pointer stuff here.. (see
- * also copy_thread)
- */
-
-asmlinkage int h8300_fork(struct pt_regs *regs)
-{
- return -EINVAL;
-}
-
-asmlinkage int h8300_vfork(struct pt_regs *regs)
-{
- return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
-}
-
-asmlinkage int h8300_clone(struct pt_regs *regs)
-{
- unsigned long clone_flags;
- unsigned long newsp;
-
- /* syscall2 puts clone_flags in er1 and usp in er2 */
- clone_flags = regs->er1;
- newsp = regs->er2;
- if (!newsp)
- newsp = rdusp();
- return do_fork(clone_flags, newsp, regs, 0, NULL, NULL);
-
-}
-
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 *unused)
{
struct pt_regs * childregs;
@@ -173,11 +142,10 @@ int copy_thread(unsigned long clone_flags,
childregs->er5 = usp; /* fn */
p->thread.ksp = (unsigned long)childregs;
}
- *childregs = *regs;
+ *childregs = *current_pt_regs();
childregs->retpc = (unsigned long) ret_from_fork;
childregs->er0 = 0;
-
- p->thread.usp = usp;
+ p->thread.usp = usp ?: rdusp();
p->thread.ksp = (unsigned long)childregs;
return 0;