diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-08-22 20:52:04 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-08-22 20:52:04 +0200 |
commit | 6c06b66e957c423c341ca255118f809733011864 (patch) | |
tree | 2eb65f2f830d81ab032c7478503ff7c3ef0c9b96 /drivers/base/core.c | |
parent | bb7ba8069de933d69cb45dd0a5806b61033796a3 (diff) | |
parent | 07f038a408fb215fd656de78304b6ff4c7e4e490 (diff) | |
download | linux-6c06b66e957c423c341ca255118f809733011864.tar.gz linux-6c06b66e957c423c341ca255118f809733011864.tar.bz2 linux-6c06b66e957c423c341ca255118f809733011864.zip |
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU and LKMM changes from Paul E. McKenney:
- A few more RCU flavor consolidation cleanups.
- Miscellaneous fixes.
- Updates to RCU's list-traversal macros improving lockdep usability.
- Torture-test updates.
- Forward-progress improvements for no-CBs CPUs: Avoid ignoring
incoming callbacks during grace-period waits.
- Forward-progress improvements for no-CBs CPUs: Use ->cblist
structure to take advantage of others' grace periods.
- Also added a small commit that avoids needlessly inflicting
scheduler-clock ticks on callback-offloaded CPUs.
- Forward-progress improvements for no-CBs CPUs: Reduce contention
on ->nocb_lock guarding ->cblist.
- Forward-progress improvements for no-CBs CPUs: Add ->nocb_bypass
list to further reduce contention on ->nocb_lock guarding ->cblist.
- LKMM updates.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 1669d41fcddc..f0dd8e38fee3 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -68,6 +68,11 @@ void device_links_read_unlock(int idx) { srcu_read_unlock(&device_links_srcu, idx); } + +int device_links_read_lock_held(void) +{ + return srcu_read_lock_held(&device_links_srcu); +} #else /* !CONFIG_SRCU */ static DECLARE_RWSEM(device_links_lock); @@ -91,6 +96,13 @@ void device_links_read_unlock(int not_used) { up_read(&device_links_lock); } + +#ifdef CONFIG_DEBUG_LOCK_ALLOC +int device_links_read_lock_held(void) +{ + return lockdep_is_held(&device_links_lock); +} +#endif #endif /* !CONFIG_SRCU */ /** |