diff options
29 files changed, 44 insertions, 209 deletions
diff --git a/arch/alpha/include/asm/linkage.h b/arch/alpha/include/asm/linkage.h index 291c2d01c44f..7cfd06e8c935 100644 --- a/arch/alpha/include/asm/linkage.h +++ b/arch/alpha/include/asm/linkage.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef __ASM_LINKAGE_H |
| 2 | #define __ASM_LINKAGE_H | 2 | #define __ASM_LINKAGE_H |
| 3 | 3 | ||
| 4 | /* Nothing to see here... */ | 4 | #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") |
| 5 | #define SYSCALL_ALIAS(alias, name) \ | ||
| 6 | asm ( #alias " = " #name "\n\t.globl " #alias) | ||
| 5 | 7 | ||
| 6 | #endif | 8 | #endif |
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 6d6fe7ab5473..43baee17acdf 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h | |||
| @@ -18,16 +18,4 @@ | |||
| 18 | #define __ARCH_WANT_SYS_VFORK | 18 | #define __ARCH_WANT_SYS_VFORK |
| 19 | #define __ARCH_WANT_SYS_CLONE | 19 | #define __ARCH_WANT_SYS_CLONE |
| 20 | 20 | ||
| 21 | /* "Conditional" syscalls. What we want is | ||
| 22 | |||
| 23 | __attribute__((weak,alias("sys_ni_syscall"))) | ||
| 24 | |||
| 25 | but that raises the problem of what type to give the symbol. If we use | ||
| 26 | a prototype, it'll conflict with the definition given in this file and | ||
| 27 | others. If we use __typeof, we discover that not all symbols actually | ||
| 28 | have declarations. If we use no prototype, then we get warnings from | ||
| 29 | -Wstrict-prototypes. Ho hum. */ | ||
| 30 | |||
| 31 | #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") | ||
| 32 | |||
| 33 | #endif /* _ALPHA_UNISTD_H */ | 21 | #endif /* _ALPHA_UNISTD_H */ |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index e4ddfb39ca34..141baa3f9a72 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
| @@ -44,14 +44,6 @@ | |||
| 44 | #define __ARCH_WANT_SYS_CLONE | 44 | #define __ARCH_WANT_SYS_CLONE |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * "Conditional" syscalls | ||
| 48 | * | ||
| 49 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 50 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 51 | */ | ||
| 52 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Unimplemented (or alternatively implemented) syscalls | 47 | * Unimplemented (or alternatively implemented) syscalls |
| 56 | */ | 48 | */ |
| 57 | #define __IGNORE_fadvise64_64 | 49 | #define __IGNORE_fadvise64_64 |
diff --git a/arch/avr32/include/asm/unistd.h b/arch/avr32/include/asm/unistd.h index dc4d5a931112..c1eb080e45fe 100644 --- a/arch/avr32/include/asm/unistd.h +++ b/arch/avr32/include/asm/unistd.h | |||
| @@ -41,12 +41,4 @@ | |||
| 41 | #define __ARCH_WANT_SYS_VFORK | 41 | #define __ARCH_WANT_SYS_VFORK |
| 42 | #define __ARCH_WANT_SYS_CLONE | 42 | #define __ARCH_WANT_SYS_CLONE |
| 43 | 43 | ||
| 44 | /* | ||
| 45 | * "Conditional" syscalls | ||
| 46 | * | ||
| 47 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 48 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 49 | */ | ||
| 50 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); | ||
| 51 | |||
| 52 | #endif /* __ASM_AVR32_UNISTD_H */ | 44 | #endif /* __ASM_AVR32_UNISTD_H */ |
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h index 04e83ea8d5cc..c35414bdf7bd 100644 --- a/arch/blackfin/include/asm/unistd.h +++ b/arch/blackfin/include/asm/unistd.h | |||
| @@ -20,12 +20,4 @@ | |||
| 20 | #define __ARCH_WANT_SYS_NICE | 20 | #define __ARCH_WANT_SYS_NICE |
| 21 | #define __ARCH_WANT_SYS_VFORK | 21 | #define __ARCH_WANT_SYS_VFORK |
| 22 | 22 | ||
| 23 | /* | ||
| 24 | * "Conditional" syscalls | ||
| 25 | * | ||
| 26 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 27 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 28 | */ | ||
| 29 | #define cond_syscall(x) asm(".weak\t_" #x "\n\t.set\t_" #x ",_sys_ni_syscall"); | ||
| 30 | |||
| 31 | #endif /* __ASM_BFIN_UNISTD_H */ | 23 | #endif /* __ASM_BFIN_UNISTD_H */ |
diff --git a/arch/cris/include/asm/unistd.h b/arch/cris/include/asm/unistd.h index be57a988bfb9..0ff3f6889842 100644 --- a/arch/cris/include/asm/unistd.h +++ b/arch/cris/include/asm/unistd.h | |||
| @@ -34,12 +34,4 @@ | |||
| 34 | #define __ARCH_WANT_SYS_VFORK | 34 | #define __ARCH_WANT_SYS_VFORK |
| 35 | #define __ARCH_WANT_SYS_CLONE | 35 | #define __ARCH_WANT_SYS_CLONE |
| 36 | 36 | ||
| 37 | /* | ||
| 38 | * "Conditional" syscalls | ||
| 39 | * | ||
| 40 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 41 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 42 | */ | ||
| 43 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 44 | |||
| 45 | #endif /* _ASM_CRIS_UNISTD_H_ */ | 37 | #endif /* _ASM_CRIS_UNISTD_H_ */ |
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index 4cfcc7bba25a..70ec7293dce7 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h | |||
| @@ -31,14 +31,4 @@ | |||
| 31 | #define __ARCH_WANT_SYS_VFORK | 31 | #define __ARCH_WANT_SYS_VFORK |
| 32 | #define __ARCH_WANT_SYS_CLONE | 32 | #define __ARCH_WANT_SYS_CLONE |
| 33 | 33 | ||
| 34 | /* | ||
| 35 | * "Conditional" syscalls | ||
| 36 | * | ||
| 37 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
| 38 | * but it doesn't work on all toolchains, so we just do it by hand | ||
| 39 | */ | ||
| 40 | #ifndef cond_syscall | ||
| 41 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #endif /* _ASM_UNISTD_H_ */ | 34 | #endif /* _ASM_UNISTD_H_ */ |
diff --git a/arch/h8300/include/asm/linkage.h b/arch/h8300/include/asm/linkage.h index 6f4df7d46180..1d81604fb0ad 100644 --- a/arch/h8300/include/asm/linkage.h +++ b/arch/h8300/include/asm/linkage.h | |||
| @@ -2,7 +2,5 @@ | |||
| 2 | #define _H8300_LINKAGE_H | 2 | #define _H8300_LINKAGE_H |
| 3 | 3 | ||
| 4 | #undef SYMBOL_NAME_LABEL | 4 | #undef SYMBOL_NAME_LABEL |
| 5 | #undef SYMBOL_NAME | ||
| 6 | #define SYMBOL_NAME_LABEL(_name_) _##_name_##: | 5 | #define SYMBOL_NAME_LABEL(_name_) _##_name_##: |
| 7 | #define SYMBOL_NAME(_name_) _##_name_ | ||
| 8 | #endif | 6 | #endif |
diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h index 6721856d841b..ab671ecf5196 100644 --- a/arch/h8300/include/asm/unistd.h +++ b/arch/h8300/include/asm/unistd.h | |||
| @@ -33,11 +33,4 @@ | |||
| 33 | #define __ARCH_WANT_SYS_VFORK | 33 | #define __ARCH_WANT_SYS_VFORK |
| 34 | #define __ARCH_WANT_SYS_CLONE | 34 | #define __ARCH_WANT_SYS_CLONE |
| 35 | 35 | ||
| 36 | /* | ||
| 37 | * "Conditional" syscalls | ||
| 38 | */ | ||
| 39 | #define cond_syscall(name) \ | ||
| 40 | asm (".weak\t_" #name "\n" \ | ||
| 41 | ".set\t_" #name ",_sys_ni_syscall"); | ||
| 42 | |||
| 43 | #endif /* _ASM_H8300_UNISTD_H_ */ | 36 | #endif /* _ASM_H8300_UNISTD_H_ */ |
diff --git a/arch/ia64/include/asm/linkage.h b/arch/ia64/include/asm/linkage.h index ef22a45c1890..787575701f1c 100644 --- a/arch/ia64/include/asm/linkage.h +++ b/arch/ia64/include/asm/linkage.h | |||
| @@ -11,4 +11,8 @@ | |||
| 11 | 11 | ||
| 12 | #endif | 12 | #endif |
| 13 | 13 | ||
| 14 | #define cond_syscall(x) asm(".weak\t" #x "#\n" #x "#\t=\tsys_ni_syscall#") | ||
