1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <linux/compiler.h>
5 #include <linux/export.h>
6 #include <asm/linkage.h>
9 #define CPP_ASMLINKAGE extern "C"
11 #define CPP_ASMLINKAGE
15 #define asmlinkage CPP_ASMLINKAGE
19 #define cond_syscall(x) asm(".weak\t" VMLINUX_SYMBOL_STR(x) "\n\t" \
20 ".set\t" VMLINUX_SYMBOL_STR(x) "," \
21 VMLINUX_SYMBOL_STR(sys_ni_syscall))
25 #define SYSCALL_ALIAS(alias, name) \
26 asm ("\t.globl " VMLINUX_SYMBOL_STR(alias) \
27 "\n\t.set\t" VMLINUX_SYMBOL_STR(alias) "," VMLINUX_SYMBOL_STR(name))
30 #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE)
31 #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE)
34 * For assembly routines.
36 * Note when using these that you must specify the appropriate
37 * alignment directives yourself
39 #define __PAGE_ALIGNED_DATA .section ".data..page_aligned", "aw"
40 #define __PAGE_ALIGNED_BSS .section ".bss..page_aligned", "aw"
43 * This is used by architectures to keep arguments on the stack
44 * untouched by the compiler by keeping them live until the end.
45 * The argument stack may be owned by the assembly-language
46 * caller, not the callee, and gcc doesn't always understand
49 * We have the return value, and a maximum of six arguments.
51 * This should always be followed by a "return ret" for the
52 * protection to work (ie no more work that the compiler might
53 * end up needing stack temporaries for).
55 /* Assembly files may be compiled with -traditional .. */
57 #ifndef asmlinkage_protect
58 # define asmlinkage_protect(n, ret, args...) do { } while (0)
63 #define __ALIGN .align 4,0x90
64 #define __ALIGN_STR ".align 4,0x90"
71 #define ALIGN_STR __ALIGN_STR
79 #endif /* LINKER_SCRIPT */
92 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
93 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
94 * static analysis tools such as stack depth analyzer.
97 #define ENDPROC(name) \
98 .type name, @function; \