Commit e1b5bb6d authored by Al Viro's avatar Al Viro
Browse files

consolidate cond_syscall and SYSCALL_ALIAS declarations



take them to asm/linkage.h, with default in linux/linkage.h
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 4a0fd5bf
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
/* Nothing to see here... */
#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
#define SYSCALL_ALIAS(alias, name) \
asm ( #alias " = " #name "\n\t.globl " #alias)
#endif
......@@ -18,16 +18,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/* "Conditional" syscalls. What we want is
__attribute__((weak,alias("sys_ni_syscall")))
but that raises the problem of what type to give the symbol. If we use
a prototype, it'll conflict with the definition given in this file and
others. If we use __typeof, we discover that not all symbols actually
have declarations. If we use no prototype, then we get warnings from
-Wstrict-prototypes. Ho hum. */
#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")
#endif /* _ALPHA_UNISTD_H */
......@@ -43,14 +43,6 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "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")
/*
* Unimplemented (or alternatively implemented) syscalls
*/
......
......@@ -41,12 +41,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "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_AVR32_UNISTD_H */
......@@ -20,12 +20,4 @@
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_VFORK
/*
* "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_BFIN_UNISTD_H */
......@@ -34,12 +34,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "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_ */
......@@ -31,14 +31,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "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
*/
#ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif
#endif /* _ASM_UNISTD_H_ */
......@@ -2,7 +2,5 @@
#define _H8300_LINKAGE_H
#undef SYMBOL_NAME_LABEL
#undef SYMBOL_NAME
#define SYMBOL_NAME_LABEL(_name_) _##_name_##:
#define SYMBOL_NAME(_name_) _##_name_
#endif
......@@ -33,11 +33,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "Conditional" syscalls
*/
#define cond_syscall(name) \
asm (".weak\t_" #name "\n" \
".set\t_" #name ",_sys_ni_syscall");
#endif /* _ASM_H8300_UNISTD_H_ */
......@@ -11,4 +11,8 @@
#endif
#define cond_syscall(x) asm(".weak\t" #x "#\n" #x "#\t=\tsys_ni_syscall#")
#define SYSCALL_ALIAS(alias, name) \
asm ( #alias "# = " #name "#\n\t.globl " #alias "#")
#endif
......@@ -46,15 +46,5 @@ asmlinkage unsigned long sys_mmap2(
struct pt_regs;
asmlinkage long sys_ia64_pipe(void);
/*
* "Conditional" syscalls
*
* Note, this macro can only be used in the file which defines sys_ni_syscall, i.e., in
* kernel/sys_ni.c. This version causes warnings because the declaration isn't a
* proper prototype, but we can't use __typeof__ either, because not all cond_syscall()
* declarations have prototypes at the moment.
*/
#define cond_syscall(x) asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_IA64_UNISTD_H */
......@@ -48,14 +48,4 @@
#define __IGNORE_getresgid
#define __IGNORE_chown
/*
* "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
*/
#ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif
#endif /* _ASM_M32R_UNISTD_H */
......@@ -32,12 +32,4 @@
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_SYS_VFORK
/*
* "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_ */
......@@ -37,13 +37,5 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_FORK
/*
* "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_MICROBLAZE_UNISTD_H */
......@@ -6,5 +6,8 @@
#endif
#define __weak __attribute__((weak))
#define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall")
#define SYSCALL_ALIAS(alias, name) \
asm ( #alias " = " #name "\n\t.globl " #alias)
#endif
......@@ -63,12 +63,4 @@
#endif /* !__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" #x "\t=\tsys_ni_syscall")
#endif /* _ASM_UNISTD_H */
......@@ -45,14 +45,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "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
*/
#ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
#endif
#endif /* _ASM_UNISTD_H */
......@@ -170,12 +170,4 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
#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_ */
#ifndef _ASM_POWERPC_LINKAGE_H
#define _ASM_POWERPC_LINKAGE_H
#ifdef CONFIG_PPC64
#define cond_syscall(x) \
asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \
"\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n")
#define SYSCALL_ALIAS(alias, name) \
asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
"\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
#endif
#endif /* _ASM_POWERPC_LINKAGE_H */
......@@ -56,11 +56,5 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE
/*
* "Conditional" syscalls
*/
#define cond_syscall(x) \
asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_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