diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-04-23 09:22:05 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-24 08:14:48 +0200 |
commit | 677df9d4615a2db6774cd0e8951bf7404b858b3b (patch) | |
tree | 3ddbbc31b609dda2ba8102270bf00b8649b8aa3e /init | |
parent | 58d30c36d472b75e8e9962d6a640be19d9389128 (diff) | |
download | talos-obmc-linux-677df9d4615a2db6774cd0e8951bf7404b858b3b.tar.gz talos-obmc-linux-677df9d4615a2db6774cd0e8951bf7404b858b3b.zip |
srcu: Fix Kconfig botch when SRCU not selected
If the CONFIG_SRCU option is not selected, for example, when building
arch/tile allnoconfig, the following build errors appear:
kernel/rcu/tree.o: In function `srcu_online_cpu':
tree.c:(.text+0x4248): multiple definition of `srcu_online_cpu'
kernel/rcu/srcutree.o:srcutree.c:(.text+0x2120): first defined here
kernel/rcu/tree.o: In function `srcu_offline_cpu':
tree.c:(.text+0x4250): multiple definition of `srcu_offline_cpu'
kernel/rcu/srcutree.o:srcutree.c:(.text+0x2160): first defined here
The corresponding .config file shows CONFIG_TREE_SRCU=y, but no sign
of CONFIG_SRCU, which fatally confuses SRCU's #ifdefs, resulting in
the above errors. The reason this occurs is the folowing line in
init/Kconfig's definition for TREE_SRCU:
default y if !TINY_RCU && !CLASSIC_SRCU
If CONFIG_CLASSIC_SRCU=n, as it will be in for allnoconfig, and if
CONFIG_SMP=y, then we will get CONFIG_TREE_SRCU=y but no CONFIG_SRCU,
as seen in the .config file, and which will result in the above errors.
This error did not show up during rcutorture testing because rcutorture
forces CONFIG_SRCU=y, as it must to prevent build errors in rcutorture.c.
This commit therefore conditions TREE_SRCU (and TINY_SRCU, while it is
at it) with SRCU, like this:
default y if SRCU && !TINY_RCU && !CLASSIC_SRCU
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20170423162205.GP3956@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/Kconfig b/init/Kconfig index 4119a44e4157..fe72c12e06a5 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -545,13 +545,13 @@ config CLASSIC_SRCU config TINY_SRCU bool - default y if TINY_RCU && !CLASSIC_SRCU + default y if SRCU && TINY_RCU && !CLASSIC_SRCU help This option selects the single-CPU non-preemptible version of SRCU. config TREE_SRCU bool - default y if !TINY_RCU && !CLASSIC_SRCU + default y if SRCU && !TINY_RCU && !CLASSIC_SRCU help This option selects the full-fledged version of SRCU. |