Skip to content

Commit c76fc98

Browse files
Dominik BrodowskiIngo Molnar
authored andcommitted
syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention
Make the code in syscall_wrapper.h more readable by naming the stub macros similar to the stub they provide. While at it, fix a stray newline at the end of the __IA32_COMPAT_SYS_STUBx macro. Signed-off-by: Dominik Brodowski <[email protected]> Cc: Al Viro <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent d5a0052 commit c76fc98

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/x86/include/asm/syscall_wrapper.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
* kernel/sys_ni.c and SYS_NI in kernel/time/posix-stubs.c to cover this
2929
* case as well.
3030
*/
31-
#define COMPAT_SC_IA32_STUBx(x, name, ...) \
31+
#define __IA32_COMPAT_SYS_STUBx(x, name, ...) \
3232
asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs);\
3333
ALLOW_ERROR_INJECTION(__ia32_compat_sys##name, ERRNO); \
3434
asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs)\
3535
{ \
3636
return __se_compat_sys##name(SC_IA32_REGS_TO_ARGS(x,__VA_ARGS__));\
3737
} \
3838

39-
#define SC_IA32_WRAPPERx(x, name, ...) \
39+
#define __IA32_SYS_STUBx(x, name, ...) \
4040
asmlinkage long __ia32_sys##name(const struct pt_regs *regs); \
4141
ALLOW_ERROR_INJECTION(__ia32_sys##name, ERRNO); \
4242
asmlinkage long __ia32_sys##name(const struct pt_regs *regs) \
@@ -64,8 +64,8 @@
6464
SYSCALL_ALIAS(__ia32_sys_##name, sys_ni_posix_timers)
6565

6666
#else /* CONFIG_IA32_EMULATION */
67-
#define COMPAT_SC_IA32_STUBx(x, name, ...)
68-
#define SC_IA32_WRAPPERx(x, fullname, name, ...)
67+
#define __IA32_COMPAT_SYS_STUBx(x, name, ...)
68+
#define __IA32_SYS_STUBx(x, fullname, name, ...)
6969
#endif /* CONFIG_IA32_EMULATION */
7070

7171

@@ -75,7 +75,7 @@
7575
* of the x86-64-style parameter ordering of x32 syscalls. The syscalls common
7676
* with x86_64 obviously do not need such care.
7777
*/
78-
#define COMPAT_SC_X32_STUBx(x, name, ...) \
78+
#define __X32_COMPAT_SYS_STUBx(x, name, ...) \
7979
asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\
8080
ALLOW_ERROR_INJECTION(__x32_compat_sys##name, ERRNO); \
8181
asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\
@@ -84,7 +84,7 @@
8484
} \
8585

8686
#else /* CONFIG_X86_X32 */
87-
#define COMPAT_SC_X32_STUBx(x, name, ...)
87+
#define __X32_COMPAT_SYS_STUBx(x, name, ...)
8888
#endif /* CONFIG_X86_X32 */
8989

9090

@@ -97,8 +97,8 @@
9797
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
9898
static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
9999
static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
100-
COMPAT_SC_IA32_STUBx(x, name, __VA_ARGS__) \
101-
COMPAT_SC_X32_STUBx(x, name, __VA_ARGS__) \
100+
__IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
101+
__X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
102102
static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
103103
{ \
104104
return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
@@ -163,7 +163,7 @@
163163
{ \
164164
return __se_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\
165165
} \
166-
SC_IA32_WRAPPERx(x, name, __VA_ARGS__) \
166+
__IA32_SYS_STUBx(x, name, __VA_ARGS__) \
167167
static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
168168
{ \
169169
long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\

0 commit comments

Comments
 (0)