Skip to content

Commit ce87de4

Browse files
mrutland-armctmarinas
authored andcommitted
arm64: simplify syscall wrapper ifdeffery
Back in commit: 4378a7d ("arm64: implement syscall wrappers") ... I implemented the arm64 syscall wrapper glue following the approach taken on x86. While doing so, I also copied across some ifdeffery that isn't necessary on arm64. On arm64 we don't share any of the native wrappers with compat tasks, and unlike x86 we don't have alternative implementations of SYSCALL_DEFINE0(), COND_SYSCALL(), or SYS_NI() defined when AArch32 compat support is enabled. Thus we don't need to prevent multiple definitions of these macros, and can remove the #ifndef ... #endif guards protecting them. If any of these had been previously defined elsewhere, syscalls are unlikely to work correctly, and we'd want the compiler to warn about the multiple definitions. Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 4f5cafb commit ce87de4

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎arch/arm64/include/asm/syscall_wrapper.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,18 @@ struct pt_regs;
6666
} \
6767
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
6868

69-
#ifndef SYSCALL_DEFINE0
7069
#define SYSCALL_DEFINE0(sname) \
7170
SYSCALL_METADATA(_##sname, 0); \
7271
asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \
7372
ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \
7473
asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused)
75-
#endif
7674

77-
#ifndef COND_SYSCALL
7875
#define COND_SYSCALL(name) \
7976
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
8077
{ \
8178
return sys_ni_syscall(); \
8279
}
83-
#endif
8480

85-
#ifndef SYS_NI
8681
#define SYS_NI(name) SYSCALL_ALIAS(__arm64_sys_##name, sys_ni_posix_timers);
87-
#endif
8882

8983
#endif /* __ASM_SYSCALL_WRAPPER_H */

0 commit comments

Comments
 (0)