aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-11-12 18:08:36 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:12 -0500
commit83460ec8dcac14142e7860a01fa59c267ac4657c (patch)
tree6bd63a842820b67150d74267dc07372be339f5c3 /include
parent54886a7153353ea2bf21ebfc1b8e030e71d151d7 (diff)
syscalls.h: use gcc alias instead of assembler aliases for syscalls
Use standard gcc __attribute__((alias(foo))) to define the syscall aliases instead of custom assembler macros. This is far cleaner, and also fixes my LTO kernel build. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/compat.h4
-rw-r--r--include/linux/syscalls.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 345da00a86e0..ada34c92b684 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -41,14 +41,14 @@
41 COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) 41 COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
42 42
43#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ 43#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
44 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ 44 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
45 __attribute__((alias(__stringify(compat_SyS##name)))); \
45 static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ 46 static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
46 asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\ 47 asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\
47 asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ 48 asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
48 { \ 49 { \
49 return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ 50 return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \
50 } \ 51 } \
51 SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \
52 static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 52 static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
53 53
54#ifndef compat_user_stack_pointer 54#ifndef compat_user_stack_pointer
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7fac04e7ff6e..c27f846f6b71 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -184,7 +184,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
184 184
185#define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) 185#define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
186#define __SYSCALL_DEFINEx(x, name, ...) \ 186#define __SYSCALL_DEFINEx(x, name, ...) \
187 asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 187 asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
188 __attribute__((alias(__stringify(SyS##name)))); \
188 static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 189 static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
189 asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ 190 asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
190 asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ 191 asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
@@ -194,7 +195,6 @@ extern struct trace_event_functions exit_syscall_print_funcs;
194 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ 195 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
195 return ret; \ 196 return ret; \
196 } \ 197 } \
197 SYSCALL_ALIAS(sys##name, SyS##name); \
198 static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 198 static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
199 199
200asmlinkage long sys_time(time_t __user *tloc); 200asmlinkage long sys_time(time_t __user *tloc);