xref: /openbmc/linux/arch/x86/include/asm/linkage.h (revision 5c816641)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_LINKAGE_H
3 #define _ASM_X86_LINKAGE_H
4 
5 #include <linux/stringify.h>
6 
7 #undef notrace
8 #define notrace __attribute__((no_instrument_function))
9 
10 #ifdef CONFIG_X86_32
11 #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
12 #endif /* CONFIG_X86_32 */
13 
14 #ifdef __ASSEMBLY__
15 
16 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
17 #define __ALIGN		.p2align 4, 0x90
18 #define __ALIGN_STR	__stringify(__ALIGN)
19 #endif
20 
21 #ifdef CONFIG_SLS
22 #define RET	ret; int3
23 #else
24 #define RET	ret
25 #endif
26 
27 #else /* __ASSEMBLY__ */
28 
29 #ifdef CONFIG_SLS
30 #define ASM_RET	"ret; int3\n\t"
31 #else
32 #define ASM_RET	"ret\n\t"
33 #endif
34 
35 #endif /* __ASSEMBLY__ */
36 
37 #endif /* _ASM_X86_LINKAGE_H */
38 
39