1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2334bb773SAdam Borowski #include <asm/ftrace.h> 37c0f6ba6SLinus Torvalds #include <linux/uaccess.h> 465fddcfcSMike Rapoport #include <linux/pgtable.h> 5334bb773SAdam Borowski #include <asm/string.h> 6334bb773SAdam Borowski #include <asm/page.h> 7334bb773SAdam Borowski #include <asm/checksum.h> 8b3149ffcSBorislav Petkov #include <asm/mce.h> 9334bb773SAdam Borowski 10334bb773SAdam Borowski #include <asm-generic/asm-prototypes.h> 11334bb773SAdam Borowski 12334bb773SAdam Borowski #include <asm/special_insns.h> 13334bb773SAdam Borowski #include <asm/preempt.h> 1476b04384SDavid Woodhouse #include <asm/asm.h> 15334bb773SAdam Borowski 16334bb773SAdam Borowski #ifndef CONFIG_X86_CMPXCHG64 17334bb773SAdam Borowski extern void cmpxchg8b_emu(void); 18334bb773SAdam Borowski #endif 1976b04384SDavid Woodhouse 2076b04384SDavid Woodhouse #ifdef CONFIG_RETPOLINE 21ca3f0d80SPeter Zijlstra 22ca3f0d80SPeter Zijlstra #define DECL_INDIRECT_THUNK(reg) \ 23ca3f0d80SPeter Zijlstra extern asmlinkage void __x86_indirect_thunk_ ## reg (void); 24ca3f0d80SPeter Zijlstra 25cc1ac9c7SPeter Zijlstra #define DECL_RETPOLINE(reg) \ 26cc1ac9c7SPeter Zijlstra extern asmlinkage void __x86_retpoline_ ## reg (void); 27cc1ac9c7SPeter Zijlstra 28ca3f0d80SPeter Zijlstra #undef GEN 29ca3f0d80SPeter Zijlstra #define GEN(reg) DECL_INDIRECT_THUNK(reg) 30ca3f0d80SPeter Zijlstra #include <asm/GEN-for-each-reg.h> 31ca3f0d80SPeter Zijlstra 32cc1ac9c7SPeter Zijlstra #undef GEN 33cc1ac9c7SPeter Zijlstra #define GEN(reg) DECL_RETPOLINE(reg) 34cc1ac9c7SPeter Zijlstra #include <asm/GEN-for-each-reg.h> 35cc1ac9c7SPeter Zijlstra 3676b04384SDavid Woodhouse #endif /* CONFIG_RETPOLINE */ 37