Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340345
b: refs/heads/master
c: 3416e80
h: refs/heads/master
i:
  340343: e3c6baf
v: v3
  • Loading branch information
Al Viro committed Nov 29, 2012
1 parent c352067 commit 2493f21
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 45 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9eac30418dbbe51217a7c91906d349f9f4658e1
refs/heads/master: 3416e8098aa4c0eea1b2e5c4efc68cf61a848864
3 changes: 3 additions & 0 deletions trunk/arch/h8300/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE

/*
* "Conditional" syscalls
Expand Down
38 changes: 3 additions & 35 deletions trunk/arch/h8300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/h8300/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -340,21 +340,12 @@ SYMBOL_NAME_LABEL(sys_call_table)
bra SYMBOL_NAME(syscall_trampoline):8
.endm

SYMBOL_NAME_LABEL(sys_clone)
call_sp h8300_clone

SYMBOL_NAME_LABEL(sys_sigreturn)
call_sp do_sigreturn

SYMBOL_NAME_LABEL(sys_rt_sigreturn)
call_sp do_rt_sigreturn

SYMBOL_NAME_LABEL(sys_fork)
call_sp h8300_fork

SYMBOL_NAME_LABEL(sys_vfork)
call_sp h8300_vfork

SYMBOL_NAME_LABEL(syscall_trampoline)
mov.l sp,er0
jmp @er6

0 comments on commit 2493f21

Please sign in to comment.