diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-13 23:47:37 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-28 23:43:41 -0500 |
commit | 135c37b83c81b79a888108e3f7c5f64423d8a851 (patch) | |
tree | f7d0b5f796ce3f9421abdea1230d591f5ae6e470 /arch/blackfin/kernel | |
parent | 3e41f9ba611cf8b87a20eecc54572b348b48bd91 (diff) |
bfin: switch to generic vfork, get rid of pointless wrappers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/entry.S | 33 | ||||
-rw-r--r-- | arch/blackfin/kernel/process.c | 21 | ||||
-rw-r--r-- | arch/blackfin/kernel/signal.c | 4 |
3 files changed, 5 insertions, 53 deletions
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S index 78f4f637e15..4071265fc4f 100644 --- a/arch/blackfin/kernel/entry.S +++ b/arch/blackfin/kernel/entry.S @@ -57,36 +57,3 @@ ENTRY(_ret_from_fork) RESTORE_CONTEXT rti; ENDPROC(_ret_from_fork) - -ENTRY(_sys_vfork) - r0 = sp; - r0 += 24; - [--sp] = rets; - SP += -12; - pseudo_long_call _bfin_vfork, p2; - SP += 12; - rets = [sp++]; - rts; -ENDPROC(_sys_vfork) - -ENTRY(_sys_clone) - r0 = sp; - r0 += 24; - [--sp] = rets; - SP += -12; - pseudo_long_call _bfin_clone, p2; - SP += 12; - rets = [sp++]; - rts; -ENDPROC(_sys_clone) - -ENTRY(_sys_rt_sigreturn) - r0 = sp; - r0 += 24; - [--sp] = rets; - SP += -12; - pseudo_long_call _do_rt_sigreturn, p2; - SP += 12; - rets = [sp++]; - rts; -ENDPROC(_sys_rt_sigreturn) diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index da8df0e504a..e5ae8fcab43 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c @@ -127,28 +127,13 @@ void flush_thread(void) { } -asmlinkage int bfin_vfork(struct pt_regs *regs) +asmlinkage int bfin_clone(unsigned long clone_flags, unsigned long newsp) { - return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, - NULL); -} - -asmlinkage int bfin_clone(struct pt_regs *regs) -{ - unsigned long clone_flags; - unsigned long newsp; - #ifdef __ARCH_SYNC_CORE_DCACHE if (current->nr_cpus_allowed == num_possible_cpus()) set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id())); #endif - - /* syscall2 puts clone_flags in r0 and usp in r1 */ - clone_flags = regs->r0; - newsp = regs->r1; - if (!newsp) - newsp = rdusp(); - else + if (newsp) newsp -= 12; return do_fork(clone_flags, newsp, regs, 0, NULL, NULL); } @@ -174,7 +159,7 @@ copy_thread(unsigned long clone_flags, } else { *childregs = *regs; childregs->r0 = 0; - p->thread.usp = usp; + p->thread.usp = usp ? : rdusp(); v[0] = v[1] = 0; } diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index 6ed20a1a4af..84b4be05840 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c @@ -82,9 +82,9 @@ rt_restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *p return err; } -asmlinkage int do_rt_sigreturn(unsigned long __unused) +asmlinkage int sys_rt_sigreturn(void) { - struct pt_regs *regs = (struct pt_regs *)__unused; + struct pt_regs *regs = current_pt_regs(); unsigned long usp = rdusp(); struct rt_sigframe *frame = (struct rt_sigframe *)(usp); sigset_t set; |