Skip to content

Commit

Permalink
rcu: Implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC
Browse files Browse the repository at this point in the history
Provide an implementation for debug_lockdep_rcu_enabled() when
CONFIG_DEBUG_LOCK_ALLOC is not enabled. This allows code to check
if rcu lockdep debugging is available without needing an extra
check if CONFIG_DEBUG_LOCK_ALLOC is enabled.

Signed-off-by: John Ogness <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
jogness authored and paulmckrcu committed Nov 9, 2022
1 parent e29a491 commit f733615
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ static inline int rcu_read_lock_any_held(void)
return !preemptible();
}

static inline int debug_lockdep_rcu_enabled(void)
{
return 0;
}

#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */

#ifdef CONFIG_PROVE_RCU
Expand Down

0 comments on commit f733615

Please sign in to comment.