summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/jump_label.h
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2022-04-18 19:50:39 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-04-22 13:32:04 +0300
commit4ab7674f5951ac6a8ac4fa8828090edb64a4771f (patch)
treeacd05dfd8faea515ddc411501bd25627da4cd148 /arch/x86/include/asm/jump_label.h
parent26e176896a5bb9222ae3433da902edd2566a61a4 (diff)
downloadlinux-4ab7674f5951ac6a8ac4fa8828090edb64a4771f.tar.xz
objtool: Make jump label hack optional
Objtool secretly does a jump label hack to overcome the limitations of the toolchain. Make the hack explicit (and optional for other arches) by turning it into a cmdline option and kernel config option. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/3bdcbfdd27ecb01ddec13c04bdf756a583b13d24.1650300597.git.jpoimboe@redhat.com
Diffstat (limited to 'arch/x86/include/asm/jump_label.h')
-rw-r--r--arch/x86/include/asm/jump_label.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index 3ce0e67c579c..071572e23d3a 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -20,7 +20,7 @@
_ASM_PTR "%c0 + %c1 - .\n\t" \
".popsection \n\t"
-#ifdef CONFIG_OBJTOOL
+#ifdef CONFIG_HAVE_JUMP_LABEL_HACK
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{
@@ -34,7 +34,7 @@ l_yes:
return true;
}
-#else /* !CONFIG_OBJTOOL */
+#else /* !CONFIG_HAVE_JUMP_LABEL_HACK */
static __always_inline bool arch_static_branch(struct static_key * const key, const bool branch)
{
@@ -48,7 +48,7 @@ l_yes:
return true;
}
-#endif /* CONFIG_OBJTOOL */
+#endif /* CONFIG_HAVE_JUMP_LABEL_HACK */
static __always_inline bool arch_static_branch_jump(struct static_key * const key, const bool branch)
{