aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/srcutiny.h
diff options
context:
space:
mode:
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