1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2334bb773SAdam Borowski #include <asm/ftrace.h>
37c0f6ba6SLinus Torvalds #include <linux/uaccess.h>
4334bb773SAdam Borowski #include <asm/string.h>
5334bb773SAdam Borowski #include <asm/page.h>
6334bb773SAdam Borowski #include <asm/checksum.h>
7334bb773SAdam Borowski 
8334bb773SAdam Borowski #include <asm-generic/asm-prototypes.h>
9334bb773SAdam Borowski 
10334bb773SAdam Borowski #include <asm/page.h>
11334bb773SAdam Borowski #include <asm/pgtable.h>
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
2176b04384SDavid Woodhouse #ifdef CONFIG_X86_32
2276b04384SDavid Woodhouse #define INDIRECT_THUNK(reg) extern asmlinkage void __x86_indirect_thunk_e ## reg(void);
2376b04384SDavid Woodhouse #else
2476b04384SDavid Woodhouse #define INDIRECT_THUNK(reg) extern asmlinkage void __x86_indirect_thunk_r ## reg(void);
2576b04384SDavid Woodhouse INDIRECT_THUNK(8)
2676b04384SDavid Woodhouse INDIRECT_THUNK(9)
2776b04384SDavid Woodhouse INDIRECT_THUNK(10)
2876b04384SDavid Woodhouse INDIRECT_THUNK(11)
2976b04384SDavid Woodhouse INDIRECT_THUNK(12)
3076b04384SDavid Woodhouse INDIRECT_THUNK(13)
3176b04384SDavid Woodhouse INDIRECT_THUNK(14)
3276b04384SDavid Woodhouse INDIRECT_THUNK(15)
3376b04384SDavid Woodhouse #endif
3476b04384SDavid Woodhouse INDIRECT_THUNK(ax)
3576b04384SDavid Woodhouse INDIRECT_THUNK(bx)
3676b04384SDavid Woodhouse INDIRECT_THUNK(cx)
3776b04384SDavid Woodhouse INDIRECT_THUNK(dx)
3876b04384SDavid Woodhouse INDIRECT_THUNK(si)
3976b04384SDavid Woodhouse INDIRECT_THUNK(di)
4076b04384SDavid Woodhouse INDIRECT_THUNK(bp)
4176b04384SDavid Woodhouse INDIRECT_THUNK(sp)
4276b04384SDavid Woodhouse #endif /* CONFIG_RETPOLINE */
43