[PATCH] powerpc: declare arch syscalls in <asm/syscalls.h>
powerpc currently declares some of its own system calls in <asm/unistd.h>, but not all of them. That place also contains remainders of the now almost unused kernel syscall hack. - Add a new <asm/syscalls.h> with clean declarations - Include that file from every source that implements one of these - Get rid of old declarations in <asm/unistd.h> This patch is required as a base for implementing system calls from an SPU, but also makes sense as a general cleanup. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
5536408c21
commit
a7f31841a4
@@ -425,6 +425,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
#define __ARCH_WANT_IPC_PARSE_VERSION
|
||||
#define __ARCH_WANT_OLD_READDIR
|
||||
@@ -460,43 +461,9 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
|
||||
* System call prototypes.
|
||||
*/
|
||||
#ifdef __KERNEL_SYSCALLS__
|
||||
extern pid_t setsid(void);
|
||||
extern int write(int fd, const char *buf, off_t count);
|
||||
extern int read(int fd, char *buf, off_t count);
|
||||
extern off_t lseek(int fd, off_t offset, int count);
|
||||
extern int dup(int fd);
|
||||
extern int execve(const char *file, char **argv, char **envp);
|
||||
extern int open(const char *file, int flag, int mode);
|
||||
extern int close(int fd);
|
||||
extern pid_t waitpid(pid_t pid, int *wait_stat, int options);
|
||||
#endif /* __KERNEL_SYSCALLS__ */
|
||||
|
||||
/*
|
||||
* Functions that implement syscalls.
|
||||
*/
|
||||
unsigned long sys_mmap(unsigned long addr, size_t len, unsigned long prot,
|
||||
unsigned long flags, unsigned long fd, off_t offset);
|
||||
unsigned long sys_mmap2(unsigned long addr, size_t len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
unsigned long fd, unsigned long pgoff);
|
||||
struct pt_regs;
|
||||
int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
|
||||
unsigned long a3, unsigned long a4, unsigned long a5,
|
||||
struct pt_regs *regs);
|
||||
int sys_clone(unsigned long clone_flags, unsigned long usp,
|
||||
int __user *parent_tidp, void __user *child_threadptr,
|
||||
int __user *child_tidp, int p6, struct pt_regs *regs);
|
||||
int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
|
||||
unsigned long p4, unsigned long p5, unsigned long p6,
|
||||
struct pt_regs *regs);
|
||||
int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
|
||||
unsigned long p4, unsigned long p5, unsigned long p6,
|
||||
struct pt_regs *regs);
|
||||
int sys_pipe(int __user *fildes);
|
||||
struct sigaction;
|
||||
long sys_rt_sigaction(int sig, const struct sigaction __user *act,
|
||||
struct sigaction __user *oact, size_t sigsetsize);
|
||||
|
||||
/*
|
||||
* "Conditional" syscalls
|
||||
*
|
||||
|
Reference in New Issue
Block a user