Blackfin: drop unneeded asm/.gitignore
[linux-2.6/mini2440.git] / include / linux / linkage.h
blobfee9e59649c12faee1a8bb573b51fa5758ca884b
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <linux/compiler.h>
5 #include <asm/linkage.h>
7 #ifdef __cplusplus
8 #define CPP_ASMLINKAGE extern "C"
9 #else
10 #define CPP_ASMLINKAGE
11 #endif
13 #ifndef asmlinkage
14 #define asmlinkage CPP_ASMLINKAGE
15 #endif
17 #ifndef asmregparm
18 # define asmregparm
19 #endif
21 #define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE)
22 #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)
25 * This is used by architectures to keep arguments on the stack
26 * untouched by the compiler by keeping them live until the end.
27 * The argument stack may be owned by the assembly-language
28 * caller, not the callee, and gcc doesn't always understand
29 * that.
31 * We have the return value, and a maximum of six arguments.
33 * This should always be followed by a "return ret" for the
34 * protection to work (ie no more work that the compiler might
35 * end up needing stack temporaries for).
37 /* Assembly files may be compiled with -traditional .. */
38 #ifndef __ASSEMBLY__
39 #ifndef asmlinkage_protect
40 # define asmlinkage_protect(n, ret, args...) do { } while (0)
41 #endif
42 #endif
44 #ifndef __ALIGN
45 #define __ALIGN .align 4,0x90
46 #define __ALIGN_STR ".align 4,0x90"
47 #endif
49 #ifdef __ASSEMBLY__
51 #define ALIGN __ALIGN
52 #define ALIGN_STR __ALIGN_STR
54 #ifndef ENTRY
55 #define ENTRY(name) \
56 .globl name; \
57 ALIGN; \
58 name:
59 #endif
61 #ifndef WEAK
62 #define WEAK(name) \
63 .weak name; \
64 name:
65 #endif
67 #ifndef END
68 #define END(name) \
69 .size name, .-name
70 #endif
72 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
73 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
74 * static analysis tools such as stack depth analyzer.
76 #ifndef ENDPROC
77 #define ENDPROC(name) \
78 .type name, @function; \
79 END(name)
80 #endif
82 #endif
84 #define NORET_TYPE /**/
85 #define ATTRIB_NORET __attribute__((noreturn))
86 #define NORET_AND noreturn,
88 #endif