aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-06 19:33:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-06 19:33:10 -0500
commit85e1ffbd42f664965dc05f6e9851c06379f27fb2 (patch)
tree125d9a6ce2f74873a0d72c6c13903f11ab7fd51b /kernel
parentac5eed2b41776b05cf03aac761d3bb5e64eea24c (diff)
parentd86271af64602e7c86c003b27f27c7216706ff96 (diff)
Merge tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - improve boolinit.cocci and use_after_iter.cocci semantic patches - fix alignment for kallsyms - move 'asm goto' compiler test to Kconfig and clean up jump_label CONFIG option - generate asm-generic wrappers automatically if arch does not implement mandatory UAPI headers - remove redundant generic-y defines - misc cleanups * tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: rename generated .*conf-cfg to *conf-cfg kbuild: remove unnecessary stubs for archheader and archscripts kbuild: use assignment instead of define ... endef for filechk_* rules arch: remove redundant UAPI generic-y defines kbuild: generate asm-generic wrappers if mandatory headers are missing arch: remove stale comments "UAPI Header export list" riscv: remove redundant kernel-space generic-y kbuild: change filechk to surround the given command with { } kbuild: remove redundant target cleaning on failure kbuild: clean up rule_dtc_dt_yaml kbuild: remove UIMAGE_IN and UIMAGE_OUT jump_label: move 'asm goto' support test to Kconfig kallsyms: lower alignment on ARM scripts: coccinelle: boolinit: drop warnings on named constants scripts: coccinelle: check for redeclaration kconfig: remove unused "file" field of yylval union nds32: remove redundant kernel-space generic-y nios2: remove unneeded HAS_DMA define
Diffstat (limited to 'kernel')
-rw-r--r--kernel/Makefile6
-rw-r--r--kernel/jump_label.c10
-rw-r--r--kernel/module.c2
-rw-r--r--kernel/sched/core.c2
-rw-r--r--kernel/sched/debug.c4
-rw-r--r--kernel/sched/fair.c6
-rw-r--r--kernel/sched/sched.h6
7 files changed, 18 insertions, 18 deletions
diff --git a/kernel/Makefile b/kernel/Makefile
index cde93d54c571..6aa7543bcdb2 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -122,7 +122,11 @@ targets += config_data.gz
122$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE 122$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
123 $(call if_changed,gzip) 123 $(call if_changed,gzip)
124 124
125 filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") 125filechk_ikconfiggz = \
126 echo "static const char kernel_config_data[] __used = MAGIC_START"; \
127 cat $< | scripts/bin2c; \
128 echo "MAGIC_END;"
129
126targets += config_data.h 130targets += config_data.h
127$(obj)/config_data.h: $(obj)/config_data.gz FORCE 131$(obj)/config_data.h: $(obj)/config_data.gz FORCE
128 $(call filechk,ikconfiggz) 132 $(call filechk,ikconfiggz)
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index b28028b08d44..bad96b476eb6 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -18,8 +18,6 @@
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <asm/sections.h> 19#include <asm/sections.h>
20 20
21#ifdef HAVE_JUMP_LABEL
22
23/* mutex to protect coming/going of the the jump_label table */ 21/* mutex to protect coming/going of the the jump_label table */
24static DEFINE_MUTEX(jump_label_mutex); 22static DEFINE_MUTEX(jump_label_mutex);
25 23
@@ -80,13 +78,13 @@ jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
80static void jump_label_update(struct static_key *key); 78static void jump_label_update(struct static_key *key);
81 79
82/* 80/*
83 * There are similar definitions for the !HAVE_JUMP_LABEL case in jump_label.h. 81 * There are similar definitions for the !CONFIG_JUMP_LABEL case in jump_label.h.
84 * The use of 'atomic_read()' requires atomic.h and its problematic for some 82 * The use of 'atomic_read()' requires atomic.h and its problematic for some
85 * kernel headers such as kernel.h and others. Since static_key_count() is not 83 * kernel headers such as kernel.h and others. Since static_key_count() is not
86 * used in the branch statements as it is for the !HAVE_JUMP_LABEL case its ok 84 * used in the branch statements as it is for the !CONFIG_JUMP_LABEL case its ok
87 * to have it be a function here. Similarly, for 'static_key_enable()' and 85 * to have it be a function here. Similarly, for 'static_key_enable()' and
88 * 'static_key_disable()', which require bug.h. This should allow jump_label.h 86 * 'static_key_disable()', which require bug.h. This should allow jump_label.h
89 * to be included from most/all places for HAVE_JUMP_LABEL. 87 * to be included from most/all places for CONFIG_JUMP_LABEL.
90 */ 88 */
91int static_key_count(struct static_key *key) 89int static_key_count(struct static_key *key)
92{ 90{
@@ -791,5 +789,3 @@ static __init int jump_label_test(void)
791} 789}
792early_initcall(jump_label_test); 790early_initcall(jump_label_test);
793#endif /* STATIC_KEYS_SELFTEST */ 791#endif /* STATIC_KEYS_SELFTEST */
794
795#endif /* HAVE_JUMP_LABEL */
diff --git a/kernel/module.c b/kernel/module.c
index fcbc0128810b..2ad1b5239910 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3102,7 +3102,7 @@ static int find_module_sections(struct module *mod, struct load_info *info)
3102 sizeof(*mod->bpf_raw_events), 3102 sizeof(*mod->bpf_raw_events),
3103 &mod->num_bpf_raw_events); 3103 &mod->num_bpf_raw_events);
3104#endif 3104#endif
3105#ifdef HAVE_JUMP_LABEL 3105#ifdef CONFIG_JUMP_LABEL
3106 mod->jump_entries = section_objs(info, "__jump_table", 3106 mod->jump_entries = section_objs(info, "__jump_table",
3107 sizeof(*mod->jump_entries), 3107 sizeof(*mod->jump_entries),
3108 &mod->num_jump_entries); 3108 &mod->num_jump_entries);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 223f78d5c111..a674c7db2f29 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -24,7 +24,7 @@
24 24
25DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); 25DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
26 26
27#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) 27#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL)
28/* 28/*
29 * Debugging: various feature bits 29 * Debugging: various feature bits
30 * 30 *
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 02bd5f969b21..de3de997e245 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -73,7 +73,7 @@ static int sched_feat_show(struct seq_file *m, void *v)
73 return 0; 73 return 0;
74} 74}
75 75
76#ifdef HAVE_JUMP_LABEL 76#ifdef CONFIG_JUMP_LABEL
77 77
78#define jump_label_key__true STATIC_KEY_INIT_TRUE 78#define jump_label_key__true STATIC_KEY_INIT_TRUE
79#define jump_label_key__false STATIC_KEY_INIT_FALSE 79#define jump_label_key__false STATIC_KEY_INIT_FALSE
@@ -99,7 +99,7 @@ static void sched_feat_enable(int i)
99#else 99#else
100static void sched_feat_disable(int i) { }; 100static void sched_feat_disable(int i) { };
101static void sched_feat_enable(int i) { }; 101static void sched_feat_enable(int i) { };
102#endif /* HAVE_JUMP_LABEL */ 102#endif /* CONFIG_JUMP_LABEL */
103 103
104static int sched_feat_set(char *cmp) 104static int sched_feat_set(char *cmp)
105{ 105{
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6483834f1278..50aa2aba69bd 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4217,7 +4217,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
4217 4217
4218#ifdef CONFIG_CFS_BANDWIDTH 4218#ifdef CONFIG_CFS_BANDWIDTH
4219 4219
4220#ifdef HAVE_JUMP_LABEL 4220#ifdef CONFIG_JUMP_LABEL
4221static struct static_key __cfs_bandwidth_used; 4221static struct static_key __cfs_bandwidth_used;
4222 4222
4223static inline bool cfs_bandwidth_used(void) 4223static inline bool cfs_bandwidth_used(void)
@@ -4234,7 +4234,7 @@ void cfs_bandwidth_usage_dec(void)
4234{ 4234{
4235 static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used); 4235 static_key_slow_dec_cpuslocked(&__cfs_bandwidth_used);
4236} 4236}
4237#else /* HAVE_JUMP_LABEL */ 4237#else /* CONFIG_JUMP_LABEL */
4238static bool cfs_bandwidth_used(void) 4238static bool cfs_bandwidth_used(void)
4239{ 4239{
4240 return true; 4240 return true;
@@ -4242,7 +4242,7 @@ static bool cfs_bandwidth_used(void)
4242 4242
4243void cfs_bandwidth_usage_inc(void) {} 4243void cfs_bandwidth_usage_inc(void) {}
4244void cfs_bandwidth_usage_dec(void) {} 4244void cfs_bandwidth_usage_dec(void) {}
4245#endif /* HAVE_JUMP_LABEL */ 4245#endif /* CONFIG_JUMP_LABEL */
4246 4246
4247/* 4247/*
4248 * default period for cfs group bandwidth. 4248 * default period for cfs group bandwidth.
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 0ba08924e017..d04530bf251f 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1488,7 +1488,7 @@ enum {
1488 1488
1489#undef SCHED_FEAT 1489#undef SCHED_FEAT
1490 1490
1491#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) 1491#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL)
1492 1492
1493/* 1493/*
1494 * To support run-time toggling of sched features, all the translation units 1494 * To support run-time toggling of sched features, all the translation units
@@ -1508,7 +1508,7 @@ static __always_inline bool static_branch_##name(struct static_key *key) \
1508extern struct static_key sched_feat_keys[__SCHED_FEAT_NR]; 1508extern struct static_key sched_feat_keys[__SCHED_FEAT_NR];
1509#define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) 1509#define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x]))
1510 1510
1511#else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */ 1511#else /* !(SCHED_DEBUG && CONFIG_JUMP_LABEL) */
1512 1512
1513/* 1513/*
1514 * Each translation unit has its own copy of sysctl_sched_features to allow 1514 * Each translation unit has its own copy of sysctl_sched_features to allow
@@ -1524,7 +1524,7 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features =
1524 1524
1525#define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) 1525#define sched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
1526 1526
1527#endif /* SCHED_DEBUG && HAVE_JUMP_LABEL */ 1527#endif /* SCHED_DEBUG && CONFIG_JUMP_LABEL */
1528 1528
1529extern struct static_key_false sched_numa_balancing; 1529extern struct static_key_false sched_numa_balancing;
1530extern struct static_key_false sched_schedstats; 1530extern struct static_key_false sched_schedstats;