Skip to content

Commit

Permalink
take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
Browse files Browse the repository at this point in the history
now it can be done...

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Nov 29, 2012
1 parent 1ea2a01 commit 24465a4
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 63 deletions.
8 changes: 0 additions & 8 deletions arch/arm64/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ asmlinkage long sys_rt_sigreturn_wrapper(void);
asmlinkage long sys_sigaltstack_wrapper(const stack_t __user *uss,
stack_t __user *uoss);

/*
* AArch64 sys_clone implementation has a different prototype than the generic
* one (additional TLS value argument).
*/
asmlinkage long sys_clone(unsigned long, unsigned long, void __user *, int,
void __user *);
#define sys_clone sys_clone

#include <asm-generic/syscalls.h>

#endif /* __ASM_SYSCALLS_H */
5 changes: 0 additions & 5 deletions arch/hexagon/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ typedef long (*syscall_fn)(unsigned long, unsigned long,
unsigned long, unsigned long,
unsigned long, unsigned long);

asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
unsigned long parent_tidp, unsigned long child_tidp);

#define sys_clone sys_clone

#include <asm-generic/syscalls.h>

extern void *sys_call_table[];
Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm
header-y += elf.h
generic-y += clkdev.h
generic-y += exec.h
generic-y += syscalls.h
16 changes: 0 additions & 16 deletions arch/microblaze/include/asm/syscalls.h

This file was deleted.

4 changes: 0 additions & 4 deletions arch/s390/kernel/entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ long sys_s390_fadvise64(int fd, u32 offset_high, u32 offset_low,
long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);
long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high,
u32 len_low);
long sys_fork(void);
long sys_clone(unsigned long newsp, unsigned long clone_flags,
int __user *parent_tidptr, int __user *child_tidptr);
long sys_vfork(void);
long sys_sigsuspend(int history0, int history1, old_sigset_t mask);
long sys_sigaction(int sig, const struct old_sigaction __user *act,
struct old_sigaction __user *oact);
Expand Down
3 changes: 0 additions & 3 deletions arch/tile/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@ long sys_ftruncate64(unsigned int fd, loff_t length);
#endif

/* Provide versions of standard syscalls that use current_pt_regs(). */
long sys_clone(unsigned long clone_flags, unsigned long newsp,
void __user *parent_tid, void __user *child_tid);
long sys_rt_sigreturn(void);
long sys_sigaltstack(const stack_t __user *, stack_t __user *);
#define sys_clone sys_clone
#define sys_rt_sigreturn sys_rt_sigreturn
#define sys_sigaltstack sys_sigaltstack

Expand Down
1 change: 0 additions & 1 deletion arch/tile/kernel/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ long compat_sys_sched_rr_get_interval(compat_pid_t pid,

/* Call the assembly trampolines where necessary. */
#define compat_sys_rt_sigreturn _compat_sys_rt_sigreturn
#undef sys_clone
#define sys_clone _sys_clone

/*
Expand Down
1 change: 0 additions & 1 deletion arch/tile/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
/* Call the assembly trampolines where necessary. */
#undef sys_rt_sigreturn
#define sys_rt_sigreturn _sys_rt_sigreturn
#undef sys_clone
#define sys_clone _sys_clone

/*
Expand Down
11 changes: 0 additions & 11 deletions arch/x86/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
long sys_iopl(unsigned int, struct pt_regs *);

/* kernel/process.c */
asmlinkage long sys_fork(void);
asmlinkage long sys_vfork(void);
#ifdef CONFIG_CLONE_BACKWARDS
asmlinkage long sys_clone(unsigned long, unsigned long, void __user *, int,
void __user *);
#else
asmlinkage long sys_clone(unsigned long, unsigned long, void __user *,
void __user *, int);
#endif

/* kernel/ldt.c */
asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/um/shared/sysdep/syscalls.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern long sys_clone(unsigned long clone_flags, unsigned long newsp,
void __user *parent_tid, void __user *child_tid);
#ifdef __i386__
#include "syscalls_32.h"
#else
Expand Down
12 changes: 0 additions & 12 deletions include/asm-generic/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
* Calling conventions for these system calls can differ, so
* it's possible to override them.
*/
#ifndef sys_clone
asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp,
void __user *parent_tid, void __user *child_tid);
#endif

#ifndef sys_fork
asmlinkage long sys_fork(void);
#endif

#ifndef sys_vfork
asmlinkage long sys_vfork(void);
#endif

#ifndef sys_mmap2
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
Expand Down
10 changes: 10 additions & 0 deletions include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,16 @@ int kernel_execve(const char *filename, const char *const argv[], const char *co
(const char __user *const __user *)envp)
#endif

asmlinkage long sys_fork(void);
asmlinkage long sys_vfork(void);
#ifdef CONFIG_CLONE_BACKWARDS
asmlinkage long sys_clone(unsigned long, unsigned long, int __user *, int,
int __user *);
#else
asmlinkage long sys_clone(unsigned long, unsigned long, int __user *,
int __user *, int);
#endif

asmlinkage long sys_execve(const char __user *filename,
const char __user *const __user *argv,
const char __user *const __user *envp);
Expand Down

0 comments on commit 24465a4

Please sign in to comment.