summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/linkage.h21
-rw-r--r--include/linux/syscalls.h14
2 files changed, 21 insertions, 14 deletions
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 807f1e533226..829d66c67fc2 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -2,6 +2,7 @@
#define _LINUX_LINKAGE_H
#include <linux/compiler.h>
+#include <linux/stringify.h>
#include <asm/linkage.h>
#ifdef __cplusplus
@@ -14,6 +15,26 @@
#define asmlinkage CPP_ASMLINKAGE
#endif
+#ifndef SYMBOL_NAME
+#ifdef CONFIG_SYMBOL_PREFIX
+#define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
+#else
+#define SYMBOL_NAME(x) x
+#endif
+#endif
+#define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))
+
+#ifndef cond_syscall
+#define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \
+ "\n\t.set\t" __SYMBOL_NAME(x) "," __SYMBOL_NAME(sys_ni_syscall));
+#endif
+
+#ifndef SYSCALL_ALIAS
+#define SYSCALL_ALIAS(alias, name) \
+ asm ("\t.globl " __SYMBOL_NAME(alias) \
+ "\n\t.set\t" __SYMBOL_NAME(alias) "," __SYMBOL_NAME(name))
+#endif
+
#define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE)
#define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 3e07b92efbf6..87584373305d 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -183,20 +183,6 @@ extern struct trace_event_functions exit_syscall_print_funcs;
#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
-#ifdef CONFIG_PPC64
-#define SYSCALL_ALIAS(alias, name) \
- asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
- "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
-#else
-#if defined(CONFIG_ALPHA) || defined(CONFIG_MIPS)
-#define SYSCALL_ALIAS(alias, name) \
- asm ( #alias " = " #name "\n\t.globl " #alias)
-#else
-#define SYSCALL_ALIAS(alias, name) \
- asm ("\t.globl " #alias "\n\t.set " #alias ", " #name)
-#endif
-#endif
-
#ifdef CONFIG_FTRACE_SYSCALLS
#define SYSCALL_DEFINEx(x, sname, ...) \
static const char *types_##sname[] = { \