aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/srcutiny.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-08-21 03:45:19 -0400
committerIngo Molnar <mingo@kernel.org>2017-08-21 03:45:19 -0400
commit94edf6f3c20c9c8ee301bde04150a91bab4bf32c (patch)
tree4a2af658258cf42fde24c1224e44c3e6a18c2792 /include/linux/srcutiny.h
parentd5da6457bfadf64ff78f1816ae8329dbbba19513 (diff)
parent656e7c0c0a2e8d899f87fd7f081ea7a711146604 (diff)
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney: - Removal of spin_unlock_wait() - SRCU updates - Torture-test updates - Documentation updates - Miscellaneous fixes - CPU-hotplug fixes - Miscellaneous non-RCU fixes Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/srcutiny.h')
-rw-r--r--include/linux/srcutiny.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
index cfbfc540cafc..261471f407a5 100644
--- a/include/linux/srcutiny.h
+++ b/include/linux/srcutiny.h
@@ -87,4 +87,17 @@ static inline void srcu_barrier(struct srcu_struct *sp)
87 synchronize_srcu(sp); 87 synchronize_srcu(sp);
88} 88}
89 89
90/* Defined here to avoid size increase for non-torture kernels. */
91static inline void srcu_torture_stats_print(struct srcu_struct *sp,
92 char *tt, char *tf)
93{
94 int idx;
95
96 idx = READ_ONCE(sp->srcu_idx) & 0x1;
97 pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n",
98 tt, tf, idx,
99 READ_ONCE(sp->srcu_lock_nesting[!idx]),
100 READ_ONCE(sp->srcu_lock_nesting[idx]));
101}
102
90#endif 103#endif