jump_label: move 'asm goto' support test to Kconfig
Currently, CONFIG_JUMP_LABEL just means "I _want_ to use jump label". The jump label is controlled by HAVE_JUMP_LABEL, which is defined like this: #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) # define HAVE_JUMP_LABEL #endif We can improve this by testing 'asm goto' support in Kconfig, then make JUMP_LABEL depend on CC_HAS_ASM_GOTO. Ugly #ifdef HAVE_JUMP_LABEL will go away, and CONFIG_JUMP_LABEL will match to the real kernel capability. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
This commit is contained in:
@@ -2,19 +2,6 @@
|
||||
#ifndef _ASM_X86_JUMP_LABEL_H
|
||||
#define _ASM_X86_JUMP_LABEL_H
|
||||
|
||||
#ifndef HAVE_JUMP_LABEL
|
||||
/*
|
||||
* For better or for worse, if jump labels (the gcc extension) are missing,
|
||||
* then the entire static branch patching infrastructure is compiled out.
|
||||
* If that happens, the code in here will malfunction. Raise a compiler
|
||||
* error instead.
|
||||
*
|
||||
* In theory, jump labels and the static branch patching infrastructure
|
||||
* could be decoupled to fix this.
|
||||
*/
|
||||
#error asm/jump_label.h included on a non-jump-label kernel
|
||||
#endif
|
||||
|
||||
#define JUMP_LABEL_NOP_SIZE 5
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
Reference in New Issue
Block a user