1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <linux/compiler.h>
5 #include <linux/stringify.h>
6 #include <linux/export.h>
7 #include <asm/linkage.h>
10 #define CPP_ASMLINKAGE extern "C"
12 #define CPP_ASMLINKAGE
16 #define asmlinkage CPP_ASMLINKAGE
20 #define cond_syscall(x) asm( \
21 ".weak " VMLINUX_SYMBOL_STR(x) "\n\t" \
22 ".set " VMLINUX_SYMBOL_STR(x) "," \
23 VMLINUX_SYMBOL_STR(sys_ni_syscall))
27 #define SYSCALL_ALIAS(alias, name) asm( \
28 ".globl " VMLINUX_SYMBOL_STR(alias) "\n\t" \
29 ".set " VMLINUX_SYMBOL_STR(alias) "," \
30 VMLINUX_SYMBOL_STR(name))
33 #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE)
34 #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE)
37 * For assembly routines.
39 * Note when using these that you must specify the appropriate
40 * alignment directives yourself
42 #define __PAGE_ALIGNED_DATA .section ".data..page_aligned", "aw"
43 #define __PAGE_ALIGNED_BSS .section ".bss..page_aligned", "aw"
46 * This is used by architectures to keep arguments on the stack
47 * untouched by the compiler by keeping them live until the end.
48 * The argument stack may be owned by the assembly-language
49 * caller, not the callee, and gcc doesn't always understand
52 * We have the return value, and a maximum of six arguments.
54 * This should always be followed by a "return ret" for the
55 * protection to work (ie no more work that the compiler might
56 * end up needing stack temporaries for).
58 /* Assembly files may be compiled with -traditional .. */
60 #ifndef asmlinkage_protect
61 # define asmlinkage_protect(n, ret, args...) do { } while (0)
66 #define __ALIGN .align 4,0x90
67 #define __ALIGN_STR ".align 4,0x90"
74 #define ALIGN_STR __ALIGN_STR
82 #endif /* LINKER_SCRIPT */
95 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
96 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
97 * static analysis tools such as stack depth analyzer.
100 #define ENDPROC(name) \
101 .type name, @function; \