x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h
Because it makes no sense to split the retpoline gunk over multiple headers. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Borislav Petkov <bp@suse.de> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Tested-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/r/20211026120310.106290934@infradead.org
This commit is contained in:
parent
b6d3d9944b
commit
6fda8a3886
@ -17,11 +17,3 @@
|
|||||||
extern void cmpxchg8b_emu(void);
|
extern void cmpxchg8b_emu(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_RETPOLINE
|
|
||||||
|
|
||||||
#define GEN(reg) \
|
|
||||||
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
#undef GEN
|
|
||||||
|
|
||||||
#endif /* CONFIG_RETPOLINE */
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <linux/static_key.h>
|
#include <linux/static_key.h>
|
||||||
#include <linux/objtool.h>
|
#include <linux/objtool.h>
|
||||||
|
#include <linux/linkage.h>
|
||||||
|
|
||||||
#include <asm/alternative.h>
|
#include <asm/alternative.h>
|
||||||
#include <asm/cpufeatures.h>
|
#include <asm/cpufeatures.h>
|
||||||
@ -118,6 +119,12 @@
|
|||||||
".popsection\n\t"
|
".popsection\n\t"
|
||||||
|
|
||||||
#ifdef CONFIG_RETPOLINE
|
#ifdef CONFIG_RETPOLINE
|
||||||
|
|
||||||
|
#define GEN(reg) \
|
||||||
|
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
|
||||||
|
#include <asm/GEN-for-each-reg.h>
|
||||||
|
#undef GEN
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include <asm/set_memory.h>
|
#include <asm/set_memory.h>
|
||||||
#include <asm/nospec-branch.h>
|
#include <asm/nospec-branch.h>
|
||||||
#include <asm/text-patching.h>
|
#include <asm/text-patching.h>
|
||||||
#include <asm/asm-prototypes.h>
|
|
||||||
|
|
||||||
static u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
|
static u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user