summaryrefslogtreecommitdiff
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2022-11-07 17:15:59 +0300
committerPaul E. McKenney <paulmck@kernel.org>2022-11-09 20:29:06 +0300
commitf733615e39aa2d6ddeef33b7b2c9aa6a5a2c2785 (patch)
tree0465eb8d503f14866e875d760c6b5ec293194bb2 /include/linux/rcupdate.h
parente29a4915db1480f96e0bc2e928699d086a71f43c (diff)
downloadlinux-f733615e39aa2d6ddeef33b7b2c9aa6a5a2c2785.tar.xz
rcu: Implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC
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 <john.ogness@linutronix.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 08605ce7379d..65178c40ab6f 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -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