1#ifndef _ASM_X86_LINKAGE_H
2#define _ASM_X86_LINKAGE_H
3
4#include <linux/stringify.h>
5
6#undef notrace
7#define notrace __attribute__((no_instrument_function))
8
9#ifdef CONFIG_X86_32
10#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
11
12
13
14
15
16
17
18
19
20
21
22
23#define asmlinkage_protect(n, ret, args...) \
24 __asmlinkage_protect##n(ret, ##args)
25#define __asmlinkage_protect_n(ret, args...) \
26 __asm__ __volatile__ ("" : "=r" (ret) : "0" (ret), ##args)
27#define __asmlinkage_protect0(ret) \
28 __asmlinkage_protect_n(ret)
29#define __asmlinkage_protect1(ret, arg1) \
30 __asmlinkage_protect_n(ret, "m" (arg1))
31#define __asmlinkage_protect2(ret, arg1, arg2) \
32 __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2))
33#define __asmlinkage_protect3(ret, arg1, arg2, arg3) \
34 __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3))
35#define __asmlinkage_protect4(ret, arg1, arg2, arg3, arg4) \
36 __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \
37 "m" (arg4))
38#define __asmlinkage_protect5(ret, arg1, arg2, arg3, arg4, arg5) \
39 __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \
40 "m" (arg4), "m" (arg5))
41#define __asmlinkage_protect6(ret, arg1, arg2, arg3, arg4, arg5, arg6) \
42 __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \
43 "m" (arg4), "m" (arg5), "m" (arg6))
44
45#endif
46
47#ifdef __ASSEMBLY__
48
49#define GLOBAL(name) \
50 .globl name; \
51 name:
52
53#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
54#define __ALIGN .p2align 4, 0x90
55#define __ALIGN_STR __stringify(__ALIGN)
56#endif
57
58#endif
59
60#endif
61
62