powerpc/xics: Factor out cpu joining/unjoining the GIQ
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / linkage.h
blob56ba37394656c7f211eaebdadf5481eda844acca
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
4 #include <linux/compiler.h>
5 #include <asm/linkage.h>
7 #define notrace __attribute__((no_instrument_function))
9 #ifdef __cplusplus
10 #define CPP_ASMLINKAGE extern "C"
11 #else
12 #define CPP_ASMLINKAGE
13 #endif
15 #ifndef asmlinkage
16 #define asmlinkage CPP_ASMLINKAGE
17 #endif
19 #ifndef asmregparm
20 # define asmregparm
21 #endif
23 #define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE)
24 #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)
27 * This is used by architectures to keep arguments on the stack
28 * untouched by the compiler by keeping them live until the end.
29 * The argument stack may be owned by the assembly-language
30 * caller, not the callee, and gcc doesn't always understand
31 * that.
33 * We have the return value, and a maximum of six arguments.
35 * This should always be followed by a "return ret" for the
36 * protection to work (ie no more work that the compiler might
37 * end up needing stack temporaries for).
39 /* Assembly files may be compiled with -traditional .. */
40 #ifndef __ASSEMBLY__
41 #ifndef asmlinkage_protect
42 # define asmlinkage_protect(n, ret, args...) do { } while (0)
43 #endif
44 #endif
46 #ifndef __ALIGN
47 #define __ALIGN .align 4,0x90
48 #define __ALIGN_STR ".align 4,0x90"
49 #endif
51 #ifdef __ASSEMBLY__
53 #define ALIGN __ALIGN
54 #define ALIGN_STR __ALIGN_STR
56 #ifndef ENTRY
57 #define ENTRY(name) \
58 .globl name; \
59 ALIGN; \
60 name:
61 #endif
63 #ifndef WEAK
64 #define WEAK(name) \
65 .weak name; \
66 name:
67 #endif
69 #define KPROBE_ENTRY(name) \
70 .pushsection .kprobes.text, "ax"; \
71 ENTRY(name)
73 #define KPROBE_END(name) \
74 END(name); \
75 .popsection
77 #ifndef END
78 #define END(name) \
79 .size name, .-name
80 #endif
82 /* If symbol 'name' is treated as a subroutine (gets called, and returns)
83 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
84 * static analysis tools such as stack depth analyzer.
86 #ifndef ENDPROC
87 #define ENDPROC(name) \
88 .type name, @function; \
89 END(name)
90 #endif
92 #endif
94 #define NORET_TYPE /**/
95 #define ATTRIB_NORET __attribute__((noreturn))
96 #define NORET_AND noreturn,
98 #endif