aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dynamic_debug.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-12-30 10:14:15 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-05 19:46:51 -0500
commite9666d10a5677a494260d60d1fa0b73cc7646eb3 (patch)
treefd609e683efff32ed6cc1458e20c40969328a33e /include/linux/dynamic_debug.h
parent72d3ebb929de339f991fc49b58942d2d5ecdb753 (diff)
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>
Diffstat (limited to 'include/linux/dynamic_debug.h')
-rw-r--r--include/linux/dynamic_debug.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 2fd8006153c3..b3419da1a776 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -2,7 +2,7 @@
2#ifndef _DYNAMIC_DEBUG_H 2#ifndef _DYNAMIC_DEBUG_H
3#define _DYNAMIC_DEBUG_H 3#define _DYNAMIC_DEBUG_H
4 4
5#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) 5#if defined(CONFIG_JUMP_LABEL)
6#include <linux/jump_label.h> 6#include <linux/jump_label.h>
7#endif 7#endif
8 8
@@ -38,7 +38,7 @@ struct _ddebug {
38#define _DPRINTK_FLAGS_DEFAULT 0 38#define _DPRINTK_FLAGS_DEFAULT 0
39#endif 39#endif
40 unsigned int flags:8; 40 unsigned int flags:8;
41#ifdef HAVE_JUMP_LABEL 41#ifdef CONFIG_JUMP_LABEL
42 union { 42 union {
43 struct static_key_true dd_key_true; 43 struct static_key_true dd_key_true;
44 struct static_key_false dd_key_false; 44 struct static_key_false dd_key_false;
@@ -83,7 +83,7 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor,
83 dd_key_init(key, init) \ 83 dd_key_init(key, init) \
84 } 84 }
85 85
86#ifdef HAVE_JUMP_LABEL 86#ifdef CONFIG_JUMP_LABEL
87 87
88#define dd_key_init(key, init) key = (init) 88#define dd_key_init(key, init) key = (init)
89 89