powerpc/44x: 44x TLB doesn't need "Guarded" set for all pages
[deliverable/linux.git] / include / linux / linkage.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_LINKAGE_H
2#define _LINUX_LINKAGE_H
3
a7bf0bd5 4#include <linux/compiler.h>
1da177e4
LT
5#include <asm/linkage.h>
6
7#ifdef __cplusplus
8#define CPP_ASMLINKAGE extern "C"
9#else
10#define CPP_ASMLINKAGE
11#endif
12
13#ifndef asmlinkage
14#define asmlinkage CPP_ASMLINKAGE
15#endif
16
d50efc6c
IM
17#ifndef asmregparm
18# define asmregparm
19#endif
20
a7bf0bd5
JF
21#define __page_aligned_data __section(.data.page_aligned) __aligned(PAGE_SIZE)
22#define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)
23
d10d89ec
LT
24/*
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.
30 *
31 * We have the return value, and a maximum of six arguments.
32 *
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).
36 */
b0fac023
HC
37/* Assembly files may be compiled with -traditional .. */
38#ifndef __ASSEMBLY__
54a01510
RM
39#ifndef asmlinkage_protect
40# define asmlinkage_protect(n, ret, args...) do { } while (0)
1da177e4 41#endif
b0fac023 42#endif
1da177e4
LT
43
44#ifndef __ALIGN
45#define __ALIGN .align 4,0x90
46#define __ALIGN_STR ".align 4,0x90"
47#endif
48
49#ifdef __ASSEMBLY__
50
51#define ALIGN __ALIGN
52#define ALIGN_STR __ALIGN_STR
53
ab7efcc9 54#ifndef ENTRY
1da177e4
LT
55#define ENTRY(name) \
56 .globl name; \
57 ALIGN; \
58 name:
ab7efcc9 59#endif
1da177e4 60
214541d1
RR
61#ifndef WEAK
62#define WEAK(name) \
63 .weak name; \
64 name:
65#endif
66
d0aaff97 67#define KPROBE_ENTRY(name) \
d28c4393 68 .pushsection .kprobes.text, "ax"; \
ab7efcc9 69 ENTRY(name)
d0aaff97 70
d28c4393
P
71#define KPROBE_END(name) \
72 END(name); \
73 .popsection
74
ab7efcc9
JB
75#ifndef END
76#define END(name) \
77 .size name, .-name
78#endif
79
6b8be6df
JR
80/* If symbol 'name' is treated as a subroutine (gets called, and returns)
81 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
82 * static analysis tools such as stack depth analyzer.
83 */
ab7efcc9
JB
84#ifndef ENDPROC
85#define ENDPROC(name) \
86 .type name, @function; \
87 END(name)
88#endif
d0aaff97 89
1da177e4
LT
90#endif
91
92#define NORET_TYPE /**/
93#define ATTRIB_NORET __attribute__((noreturn))
94#define NORET_AND noreturn,
95
1da177e4 96#endif
This page took 0.511461 seconds and 5 git commands to generate.