linkage.h 720 字节
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
H
H. Peter Anvin 已提交
2 3
#ifndef _ASM_X86_LINKAGE_H
#define _ASM_X86_LINKAGE_H
4

5 6
#include <linux/stringify.h>

7 8 9
#undef notrace
#define notrace __attribute__((no_instrument_function))

10
#ifdef CONFIG_X86_32
11
#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
12 13 14
#endif /* CONFIG_X86_32 */

#ifdef __ASSEMBLY__
15

16 17 18
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
#define __ALIGN		.p2align 4, 0x90
#define __ALIGN_STR	__stringify(__ALIGN)
19 20
#endif

21 22 23 24 25 26
#ifdef CONFIG_SLS
#define RET	ret; int3
#else
#define RET	ret
#endif

27 28
#else /* __ASSEMBLY__ */

29 30 31
#ifdef CONFIG_SLS
#define ASM_RET	"ret; int3\n\t"
#else
32
#define ASM_RET	"ret\n\t"
33
#endif
34

35 36
#endif /* __ASSEMBLY__ */

H
H. Peter Anvin 已提交
37
#endif /* _ASM_X86_LINKAGE_H */
38