Commit 62c2f777 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: wrap some stuff in __KERNEL__

From: Anton Blanchard <anton@samba.org>

- remove now unused kernel syscalls.
- wrap recently added defines in #ifdef __KERNEL__, fixes glibc
  compile issue
- some of our extra syscalls used asmlinkage, some did not. Make them
  consistent
parent 6cfe07f4
......@@ -274,10 +274,6 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/linkage.h>
/* On powerpc a system call basically clobbers the same registers like a
* function call, with the exception of LR (which is needed for the
* "sc; bnslr" sequence) and CR (where only CR0.SO is clobbered to signal
......@@ -401,22 +397,17 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
*/
static inline _syscall3(int, execve, __const__ char *, file, char **, argv,
char **,envp)
static inline _syscall3(int, open, __const__ char *, file, int, flag, int, mode)
static inline _syscall1(int, close, int, fd)
static inline _syscall1(int, dup, int, fd)
static inline _syscall3(int, read, int, fd, char *, buf , off_t, count)
static inline _syscall3(int, write, int, fd, __const__ char *, buf, off_t,
count)
static inline _syscall0(pid_t, setsid)
static inline _syscall3(off_t, lseek, int, fd, off_t, offset, int, count)
static inline _syscall3(pid_t, waitpid, pid_t, pid, int *, wait_stat, int,
options)
#endif /* __KERNEL_SYSCALLS__ */
asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
unsigned long prot, unsigned long flags,
unsigned long fd, off_t offset);
#ifdef __KERNEL__
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/linkage.h>
unsigned long sys_mmap(unsigned long addr, size_t len, unsigned long prot,
unsigned long flags, unsigned long fd, off_t offset);
struct pt_regs;
int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
unsigned long a3, unsigned long a4, unsigned long a5,
......@@ -430,13 +421,11 @@ int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
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);
asmlinkage int sys_pipe(int *fildes);
int sys_pipe(int *fildes);
int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction;
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
size_t sigsetsize);
long sys_rt_sigaction(int sig, const struct sigaction __user *act,
struct sigaction __user *oact, size_t sigsetsize);
/*
* "Conditional" syscalls
......@@ -446,6 +435,8 @@ asmlinkage long sys_rt_sigaction(int sig,
*/
#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall");
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _ASM_PPC_UNISTD_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment