Skip to content

Commit

Permalink
rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y
Browse files Browse the repository at this point in the history
Move the rcu_lock_map definition from rcutree.c to rcupdate.c so that
TINY_RCU can use lockdep.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Oct 5, 2009
1 parent 9b2619a commit 162cc27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
#include <linux/module.h>
#include <linux/kernel_stat.h>

#ifdef CONFIG_DEBUG_LOCK_ALLOC
static struct lock_class_key rcu_lock_key;
struct lockdep_map rcu_lock_map =
STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
EXPORT_SYMBOL_GPL(rcu_lock_map);
#endif

enum rcu_barrier {
RCU_BARRIER_STD,
RCU_BARRIER_BH,
Expand Down
7 changes: 0 additions & 7 deletions kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@

#include "rcutree.h"

#ifdef CONFIG_DEBUG_LOCK_ALLOC
static struct lock_class_key rcu_lock_key;
struct lockdep_map rcu_lock_map =
STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
EXPORT_SYMBOL_GPL(rcu_lock_map);
#endif

/* Data structures. */

#define RCU_STATE_INITIALIZER(name) { \
Expand Down

0 comments on commit 162cc27

Please sign in to comment.