summaryrefslogtreecommitdiffstats
path: root/include/linux/linkage.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-21 17:16:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-03 22:55:19 -0500
commite1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea (patch)
tree2431edf19caecce6aad82b4ee4ed2abe45e542e3 /include/linux/linkage.h
parent4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b (diff)
downloadop-kernel-dev-e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea.zip
op-kernel-dev-e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea.tar.gz
consolidate cond_syscall and SYSCALL_ALIAS declarations
take them to asm/linkage.h, with default in linux/linkage.h Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/linkage.h')
-rw-r--r--include/linux/linkage.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 807f1e5..829d66c 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)
OpenPOWER on IntegriCloud