rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 19 Feb 2014 19:33:27 +0000 (14:33 -0500)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 26 Feb 2014 14:35:18 +0000 (06:35 -0800)
commit5cb5c6e18f822b19bd41a2c0f9930c82b3ec0bc9
treea21be1e06444dfc2d4a8b3b35db4d241cb0ea70b
parent7a754743185a4b05818e10058fa2fbe4e6969085
rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone

The kbuild test bot uncovered an implicit dependence on the
trace header being present before rcu.h in ia64 allmodconfig
that looks like this:

In file included from kernel/ksysfs.c:22:0:
kernel/rcu/rcu.h: In function '__rcu_reclaim':
kernel/rcu/rcu.h:107:3: error: implicit declaration of function 'trace_rcu_invoke_kfree_callback' [-Werror=implicit-function-declaration]
kernel/rcu/rcu.h:112:3: error: implicit declaration of function 'trace_rcu_invoke_callback' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

Looking at other rcu.h users, we can find that they all
were sourcing the trace header in advance of rcu.h itself,
as seen in the context of this diff.  There were also some
inconsistencies as to whether it was or wasn't sourced based
on the parent tracing Kconfig.

Rather than "fix" it at each use site, and have inconsistent
use based on whether "#ifdef CONFIG_RCU_TRACE" was used or not,
lets just source the trace header just once, in the actual consumer
of it, which is rcu.h itself.  We include it unconditionally, as
build testing shows us that is a hard requirement for some files.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcu.h
kernel/rcu/srcu.c
kernel/rcu/tiny.c
kernel/rcu/tree.c
kernel/rcu/update.c
This page took 0.026379 seconds and 5 git commands to generate.