x86: fix UML and -regparm=3
[sfrench/cifs-2.6.git] / include / linux / linkage.h
1 #ifndef _LINUX_LINKAGE_H
2 #define _LINUX_LINKAGE_H
3
4 #include <asm/linkage.h>
5
6 #ifdef __cplusplus
7 #define CPP_ASMLINKAGE extern "C"
8 #else
9 #define CPP_ASMLINKAGE
10 #endif
11
12 #ifndef asmlinkage
13 #define asmlinkage CPP_ASMLINKAGE
14 #endif
15
16 #ifndef asmregparm
17 # define asmregparm
18 #endif
19
20 #ifndef prevent_tail_call
21 # define prevent_tail_call(ret) do { } while (0)
22 #endif
23
24 #ifndef __ALIGN
25 #define __ALIGN         .align 4,0x90
26 #define __ALIGN_STR     ".align 4,0x90"
27 #endif
28
29 #ifdef __ASSEMBLY__
30
31 #define ALIGN __ALIGN
32 #define ALIGN_STR __ALIGN_STR
33
34 #ifndef ENTRY
35 #define ENTRY(name) \
36   .globl name; \
37   ALIGN; \
38   name:
39 #endif
40
41 #ifndef WEAK
42 #define WEAK(name)         \
43         .weak name;        \
44         name:
45 #endif
46
47 #define KPROBE_ENTRY(name) \
48   .pushsection .kprobes.text, "ax"; \
49   ENTRY(name)
50
51 #define KPROBE_END(name) \
52   END(name);             \
53   .popsection
54
55 #ifndef END
56 #define END(name) \
57   .size name, .-name
58 #endif
59
60 #ifndef ENDPROC
61 #define ENDPROC(name) \
62   .type name, @function; \
63   END(name)
64 #endif
65
66 #endif
67
68 #define NORET_TYPE    /**/
69 #define ATTRIB_NORET  __attribute__((noreturn))
70 #define NORET_AND     noreturn,
71
72 #ifndef FASTCALL
73 #define FASTCALL(x)     x
74 #define fastcall
75 #endif
76
77 #endif