| /* SPDX-License-Identifier: GPL-2.0 */ |
| #include <linux/stringify.h> |
| #include <linux/linkage.h> |
| #include <asm/cpufeatures.h> |
| #include <asm/alternative-asm.h> |
| #include <asm/nospec-branch.h> |
| .section .text.__x86.indirect_thunk |
| ENTRY(__x86_indirect_thunk_\reg) |
| ENDPROC(__x86_indirect_thunk_\reg) |
| * Despite being an assembler file we can't just use .irp here |
| * because __KSYM_DEPS__ only uses the C preprocessor and would |
| * only see one instance of "__x86_indirect_thunk_\reg" rather |
| * than one per register with the correct names. So we do it |
| * the simple and nasty way... |
| #define __EXPORT_THUNK(sym) _ASM_NOKPROBE(sym); EXPORT_SYMBOL(sym) |
| #define EXPORT_THUNK(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg) |
| #define GENERATE_THUNK(reg) THUNK reg ; EXPORT_THUNK(reg) |