Skip to content

Commit b6d3d99

Browse files
author
Peter Zijlstra
committed
x86/asm: Fixup odd GEN-for-each-reg.h usage
Currently GEN-for-each-reg.h usage leaves GEN defined, relying on any subsequent usage to start with #undef, which is rude. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a92ede2 commit b6d3d99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/x86/include/asm/asm-prototypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ extern void cmpxchg8b_emu(void);
1919

2020
#ifdef CONFIG_RETPOLINE
2121

22-
#undef GEN
2322
#define GEN(reg) \
2423
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
2524
#include <asm/GEN-for-each-reg.h>
25+
#undef GEN
2626

2727
#endif /* CONFIG_RETPOLINE */

arch/x86/lib/retpoline.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ SYM_FUNC_END(__x86_indirect_thunk_\reg)
5555
#define __EXPORT_THUNK(sym) _ASM_NOKPROBE(sym); EXPORT_SYMBOL(sym)
5656
#define EXPORT_THUNK(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg)
5757

58-
#undef GEN
5958
#define GEN(reg) THUNK reg
6059
#include <asm/GEN-for-each-reg.h>
61-
6260
#undef GEN
61+
6362
#define GEN(reg) EXPORT_THUNK(reg)
6463
#include <asm/GEN-for-each-reg.h>
64+
#undef GEN

0 commit comments

Comments
 (0)