jump_label: move 'asm goto' support test to Kconfig
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 30 Dec 2018 15:14:15 +0000 (00:14 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 06:02:34 +0000 (08:02 +0200)
commit0276ebf16675f3745d8b6f384dcf917e1379eda2
tree916496126f4c63fb188de8685b1a4d94bf007744
parent753328727cab4116410f2a3c150826ab6c555d6a
jump_label: move 'asm goto' support test to Kconfig

commit e9666d10a5677a494260d60d1fa0b73cc7646eb3 upstream.

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>
[nc: Fix trivial conflicts in 4.19
     arch/xtensa/kernel/jump_label.c doesn't exist yet
     Ensured CC_HAVE_ASM_GOTO and HAVE_JUMP_LABEL were sufficiently
     eliminated]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 files changed:
Makefile
arch/Kconfig
arch/arm/kernel/jump_label.c
arch/arm64/kernel/jump_label.c
arch/mips/kernel/jump_label.c
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/kernel/jump_label.c
arch/powerpc/platforms/powernv/opal-tracepoints.c
arch/powerpc/platforms/powernv/opal-wrappers.S
arch/powerpc/platforms/pseries/hvCall.S
arch/powerpc/platforms/pseries/lpar.c
arch/s390/kernel/Makefile
arch/s390/kernel/jump_label.c
arch/sparc/kernel/Makefile
arch/sparc/kernel/jump_label.c
arch/x86/Makefile
arch/x86/entry/calling.h
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/jump_label.h
arch/x86/include/asm/rmwcc.h
arch/x86/kernel/Makefile
arch/x86/kernel/jump_label.c
arch/x86/kvm/emulate.c
include/linux/dynamic_debug.h
include/linux/jump_label.h
include/linux/jump_label_ratelimit.h
include/linux/module.h
include/linux/netfilter.h
include/linux/netfilter_ingress.h
init/Kconfig
kernel/jump_label.c
kernel/module.c
kernel/sched/core.c
kernel/sched/debug.c
kernel/sched/fair.c
kernel/sched/sched.h
lib/dynamic_debug.c
net/core/dev.c
net/netfilter/core.c
scripts/gcc-goto.sh
tools/arch/x86/include/asm/rmwcc.h