Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_LINKAGE_H |
| 3 | #define _ASM_X86_LINKAGE_H |
Harvey Harrison | 82f74e7 | 2008-01-30 13:31:07 +0100 | [diff] [blame] | 4 | |
Cyrill Gorcunov | bb7f5f6 | 2009-03-09 20:19:51 +0300 | [diff] [blame] | 5 | #include <linux/stringify.h> |
| 6 | |
Ingo Molnar | 78a9909 | 2008-04-17 17:40:51 +0200 | [diff] [blame] | 7 | #undef notrace |
| 8 | #define notrace __attribute__((no_instrument_function)) |
| 9 | |
Harvey Harrison | 82f74e7 | 2008-01-30 13:31:07 +0100 | [diff] [blame] | 10 | #ifdef CONFIG_X86_32 |
| 11 | #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) |
Cyrill Gorcunov | 7ab1524 | 2009-03-06 19:08:34 +0300 | [diff] [blame] | 12 | #endif /* CONFIG_X86_32 */ |
| 13 | |
| 14 | #ifdef __ASSEMBLY__ |
Harvey Harrison | 82f74e7 | 2008-01-30 13:31:07 +0100 | [diff] [blame] | 15 | |
Cyrill Gorcunov | 9569554 | 2009-02-14 00:50:18 +0300 | [diff] [blame] | 16 | #define GLOBAL(name) \ |
| 17 | .globl name; \ |
| 18 | name: |
| 19 | |
Cyrill Gorcunov | bb7f5f6 | 2009-03-09 20:19:51 +0300 | [diff] [blame] | 20 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16) |
| 21 | #define __ALIGN .p2align 4, 0x90 |
| 22 | #define __ALIGN_STR __stringify(__ALIGN) |
Harvey Harrison | 82f74e7 | 2008-01-30 13:31:07 +0100 | [diff] [blame] | 23 | #endif |
| 24 | |
Cyrill Gorcunov | 7ab1524 | 2009-03-06 19:08:34 +0300 | [diff] [blame] | 25 | #endif /* __ASSEMBLY__ */ |
| 26 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 27 | #endif /* _ASM_X86_LINKAGE_H */ |
Harvey Harrison | 82f74e7 | 2008-01-30 13:31:07 +0100 | [diff] [blame] | 28 | |