Skip to content
Snippets Groups Projects
Commit 18060014 authored by Waiman Long's avatar Waiman Long
Browse files

x86/asm: Fixup odd GEN-for-each-reg.h usage

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2090231



commit b6d3d994
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Tue, 26 Oct 2021 14:01:39 +0200

    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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Tested-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/r/20211026120310.041792350@infradead.org



Signed-off-by: default avatarWaiman Long <longman@redhat.com>
parent bbd324a6
No related branches found
No related tags found
No related merge requests found
......@@ -19,9 +19,9 @@ extern void cmpxchg8b_emu(void);
#ifdef CONFIG_RETPOLINE
#undef GEN
#define GEN(reg) \
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
#include <asm/GEN-for-each-reg.h>
#undef GEN
#endif /* CONFIG_RETPOLINE */
......@@ -55,10 +55,10 @@ SYM_FUNC_END(__x86_indirect_thunk_\reg)
#define __EXPORT_THUNK(sym) _ASM_NOKPROBE(sym); EXPORT_SYMBOL(sym)
#define EXPORT_THUNK(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg)
#undef GEN
#define GEN(reg) THUNK reg
#include <asm/GEN-for-each-reg.h>
#undef GEN
#define GEN(reg) EXPORT_THUNK(reg)
#include <asm/GEN-for-each-reg.h>
#undef GEN
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment