diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-12-04 14:43:41 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-08 19:23:12 +0100 |
commit | b17c2baa305cccbd16bafa289fd743cc2db77966 (patch) | |
tree | dd6c3b4e52c2f9bb1040c6f84f59244ea7ece435 /arch/x86/include/asm/linkage.h | |
parent | f94909ceb1ed4bfdb2ada72f93236305e6d6951f (diff) | |
download | linux-b17c2baa305cccbd16bafa289fd743cc2db77966.tar.bz2 |
x86: Prepare inline-asm for straight-line-speculation
Replace all ret/retq instructions with ASM_RET in preparation of
making it more than a single instruction.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211204134907.964635458@infradead.org
Diffstat (limited to 'arch/x86/include/asm/linkage.h')
-rw-r--r-- | arch/x86/include/asm/linkage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h index 365111789cc6..ebddec2f3ba8 100644 --- a/arch/x86/include/asm/linkage.h +++ b/arch/x86/include/asm/linkage.h @@ -18,6 +18,10 @@ #define __ALIGN_STR __stringify(__ALIGN) #endif +#else /* __ASSEMBLY__ */ + +#define ASM_RET "ret\n\t" + #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_LINKAGE_H */ |