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>
8334bb773SAdam Borowski 
9334bb773SAdam Borowski #include <asm-generic/asm-prototypes.h>
10334bb773SAdam Borowski 
11334bb773SAdam Borowski #include <asm/special_insns.h>
12334bb773SAdam Borowski #include <asm/preempt.h>
1376b04384SDavid Woodhouse #include <asm/asm.h>
14334bb773SAdam Borowski 
15334bb773SAdam Borowski #ifndef CONFIG_X86_CMPXCHG64
16334bb773SAdam Borowski extern void cmpxchg8b_emu(void);
17334bb773SAdam Borowski #endif
1876b04384SDavid Woodhouse 
1976b04384SDavid Woodhouse #ifdef CONFIG_RETPOLINE
20ca3f0d80SPeter Zijlstra 
21ca3f0d80SPeter Zijlstra #define DECL_INDIRECT_THUNK(reg) \
22ca3f0d80SPeter Zijlstra 	extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
23ca3f0d80SPeter Zijlstra 
24cc1ac9c7SPeter Zijlstra #define DECL_RETPOLINE(reg) \
25cc1ac9c7SPeter Zijlstra 	extern asmlinkage void __x86_retpoline_ ## reg (void);
26cc1ac9c7SPeter Zijlstra 
27ca3f0d80SPeter Zijlstra #undef GEN
28ca3f0d80SPeter Zijlstra #define GEN(reg) DECL_INDIRECT_THUNK(reg)
29ca3f0d80SPeter Zijlstra #include <asm/GEN-for-each-reg.h>
30ca3f0d80SPeter Zijlstra 
31cc1ac9c7SPeter Zijlstra #undef GEN
32cc1ac9c7SPeter Zijlstra #define GEN(reg) DECL_RETPOLINE(reg)
33cc1ac9c7SPeter Zijlstra #include <asm/GEN-for-each-reg.h>
34cc1ac9c7SPeter Zijlstra 
3576b04384SDavid Woodhouse #endif /* CONFIG_RETPOLINE */
36