Commit 5b1e894e authored by Anton Blanchard's avatar Anton Blanchard

Make cond_syscall per arch. This is required on some architectures

(eg ppc64) where foo points to a function descriptor and .foo is
the address of the actual function.
parent cbba4f5e
......@@ -597,4 +597,12 @@ static inline long delete_module(const char *name)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ALPHA_UNISTD_H */
......@@ -466,4 +466,13 @@ static inline pid_t wait(int * wait_stat)
static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp);
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* __ASM_ARM_UNISTD_H */
......@@ -395,4 +395,12 @@ static inline pid_t wait(int * wait_stat)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_CRIS_UNISTD_H_ */
......@@ -371,4 +371,12 @@ static inline pid_t wait(int * wait_stat)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_I386_UNISTD_H_ */
......@@ -325,5 +325,14 @@ wait (int * wait_stat)
}
#endif /* __KERNEL_SYSCALLS__ */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_IA64_UNISTD_H */
......@@ -357,4 +357,12 @@ static inline pid_t wait(int * wait_stat)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_M68K_UNISTD_H_ */
......@@ -488,4 +488,12 @@ static inline pid_t wait(int * wait_stat)
#endif /* !defined (__KERNEL_SYSCALLS__) */
#endif /* !defined (_LANGUAGE_ASSEMBLY) */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_UNISTD_H */
......@@ -814,4 +814,12 @@ static inline pid_t wait(int * wait_stat)
#endif /* !defined (__KERNEL_SYSCALLS__) */
#endif /* !defined (_LANGUAGE_ASSEMBLY) */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_UNISTD_H */
......@@ -900,4 +900,12 @@ static inline int execve(char *filename, char * argv [],
#undef STR
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_PARISC_UNISTD_H_ */
......@@ -437,4 +437,12 @@ static inline pid_t wait(int * wait_stat)
#endif /* __KERNEL_SYSCALLS__ */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_PPC_UNISTD_H_ */
......@@ -442,4 +442,12 @@ static inline pid_t wait(int * wait_stat)
#endif /* __KERNEL_SYSCALLS__ */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",sys_ni_syscall");
#endif /* _ASM_PPC_UNISTD_H_ */
......@@ -375,4 +375,12 @@ static inline pid_t wait(int * wait_stat)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_S390_UNISTD_H_ */
......@@ -345,4 +345,12 @@ static inline pid_t wait(int * wait_stat)
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _ASM_S390_UNISTD_H_ */
......@@ -367,4 +367,12 @@ static __inline__ pid_t wait(int * wait_stat)
}
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* __ASM_SH_UNISTD_H */
......@@ -437,4 +437,12 @@ static __inline__ pid_t wait(int * wait_stat)
#endif /* __KERNEL_SYSCALLS__ */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _SPARC_UNISTD_H */
......@@ -439,4 +439,12 @@ static __inline__ pid_t wait(int * wait_stat)
#define _SC_VERSION 8
#endif
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif /* _SPARC64_UNISTD_H */
......@@ -650,4 +650,12 @@ static inline pid_t wait(int * wait_stat)
#endif /* __NO_STUBS */
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on all toolchains, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif
......@@ -19,6 +19,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/unistd.h>
/*
* this is where the system-wide overflow UID and GID are defined, for
......@@ -174,14 +175,6 @@ asmlinkage long sys_ni_syscall(void)
return -ENOSYS;
}
/*
* "Conditional" syscalls
*
* What we want is __attribute__((weak,alias("sys_ni_syscall"))),
* but it doesn't work on sparc64, so we just do it by hand
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
cond_syscall(sys_nfsservctl)
cond_syscall(sys_quotactl)
cond_syscall(sys_acct)
......
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