ftrace: fix printout
[linux-2.6/mini2440.git] / include / linux / linkage.h
blob14f329c64ba8ee54cf2c4166d09272167c836bd7
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <asm/linkage.h>
6 #define notrace __attribute__((no_instrument_function))
8 #ifdef __cplusplus
9 #define CPP_ASMLINKAGE extern "C"
10 #else
11 #define CPP_ASMLINKAGE
12 #endif
14 #ifndef asmlinkage
15 #define asmlinkage CPP_ASMLINKAGE
16 #endif
18 #ifndef asmregparm
19 # define asmregparm
20 #endif
23 * This is used by architectures to keep arguments on the stack
24 * untouched by the compiler by keeping them live until the end.
25 * The argument stack may be owned by the assembly-language
26 * caller, not the callee, and gcc doesn't always understand
27 * that.
29 * We have the return value, and a maximum of six arguments.
31 * This should always be followed by a "return ret" for the
32 * protection to work (ie no more work that the compiler might
33 * end up needing stack temporaries for).
35 /* Assembly files may be compiled with -traditional .. */
36 #ifndef __ASSEMBLY__
37 #ifndef asmlinkage_protect
38 # define asmlinkage_protect(n, ret, args...) do { } while (0)
39 #endif
40 #endif
42 #ifndef __ALIGN
43 #define __ALIGN .align 4,0x90
44 #define __ALIGN_STR ".align 4,0x90"
45 #endif
47 #ifdef __ASSEMBLY__
49 #define ALIGN __ALIGN
50 #define ALIGN_STR __ALIGN_STR
52 #ifndef ENTRY
53 #define ENTRY(name) \
54 .globl name; \
55 ALIGN; \
56 name:
57 #endif
59 #ifndef WEAK
60 #define WEAK(name) \
61 .weak name; \
62 name:
63 #endif
65 #define KPROBE_ENTRY(name) \
66 .pushsection .kprobes.text, "ax"; \
67 ENTRY(name)
69 #define KPROBE_END(name) \
70 END(name); \
71 .popsection
73 #ifndef END
74 #define END(name) \
75 .size name, .-name
76 #endif
78 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
79 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
80 * static analysis tools such as stack depth analyzer.
82 #ifndef ENDPROC
83 #define ENDPROC(name) \
84 .type name, @function; \
85 END(name)
86 #endif
88 #endif
90 #define NORET_TYPE /**/
91 #define ATTRIB_NORET __attribute__((noreturn))
92 #define NORET_AND noreturn,
94 #endif