blob: 14caa9d9fb7ffcba8bc368a9c178296d27d901fb [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_LINKAGE_H
3#define _ASM_X86_LINKAGE_H
Harvey Harrison82f74e72008-01-30 13:31:07 +01004
Cyrill Gorcunovbb7f5f62009-03-09 20:19:51 +03005#include <linux/stringify.h>
6
Ingo Molnar78a99092008-04-17 17:40:51 +02007#undef notrace
8#define notrace __attribute__((no_instrument_function))
9
Harvey Harrison82f74e72008-01-30 13:31:07 +010010#ifdef CONFIG_X86_32
11#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
Cyrill Gorcunov7ab15242009-03-06 19:08:34 +030012#endif /* CONFIG_X86_32 */
13
14#ifdef __ASSEMBLY__
Harvey Harrison82f74e72008-01-30 13:31:07 +010015
Cyrill Gorcunov95695542009-02-14 00:50:18 +030016#define GLOBAL(name) \
17 .globl name; \
18 name:
19
Cyrill Gorcunovbb7f5f62009-03-09 20:19:51 +030020#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
21#define __ALIGN .p2align 4, 0x90
22#define __ALIGN_STR __stringify(__ALIGN)
Harvey Harrison82f74e72008-01-30 13:31:07 +010023#endif
24
Cyrill Gorcunov7ab15242009-03-06 19:08:34 +030025#endif /* __ASSEMBLY__ */
26
H. Peter Anvin1965aae2008-10-22 22:26:29 -070027#endif /* _ASM_X86_LINKAGE_H */
Harvey Harrison82f74e72008-01-30 13:31:07 +010028