aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/linkage.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/linkage.h')
-rw-r--r--include/linux/linkage.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index de09dec25ec3..d3e8ad23a8e0 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <linux/stringify.h> 5#include <linux/stringify.h>
6#include <linux/export.h>
6#include <asm/linkage.h> 7#include <asm/linkage.h>
7 8
8#ifdef __cplusplus 9#ifdef __cplusplus
@@ -15,21 +16,18 @@
15#define asmlinkage CPP_ASMLINKAGE 16#define asmlinkage CPP_ASMLINKAGE
16#endif 17#endif
17 18
18#ifdef CONFIG_SYMBOL_PREFIX
19#define __SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX __stringify(x)
20#else
21#define __SYMBOL_NAME(x) __stringify(x)
22#endif
23
24#ifndef cond_syscall 19#ifndef cond_syscall
25#define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \ 20#define cond_syscall(x) asm( \
26 "\n\t.set\t" __SYMBOL_NAME(x) "," __SYMBOL_NAME(sys_ni_syscall)); 21 ".weak " VMLINUX_SYMBOL_STR(x) "\n\t" \
22 ".set " VMLINUX_SYMBOL_STR(x) "," \
23 VMLINUX_SYMBOL_STR(sys_ni_syscall))
27#endif 24#endif
28 25
29#ifndef SYSCALL_ALIAS 26#ifndef SYSCALL_ALIAS
30#define SYSCALL_ALIAS(alias, name) \ 27#define SYSCALL_ALIAS(alias, name) asm( \
31 asm ("\t.globl " __SYMBOL_NAME(alias) \ 28 ".globl " VMLINUX_SYMBOL_STR(alias) "\n\t" \
32 "\n\t.set\t" __SYMBOL_NAME(alias) "," __SYMBOL_NAME(name)) 29 ".set " VMLINUX_SYMBOL_STR(alias) "," \
30 VMLINUX_SYMBOL_STR(name))
33#endif 31#endif
34 32
35#define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) 33#define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE)