summaryrefslogtreecommitdiffstats
path: root/include/linux/srcutiny.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/srcutiny.h')
-rw-r--r--include/linux/srcutiny.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
index f41d2fb09f87..b19216aaaef2 100644
--- a/include/linux/srcutiny.h
+++ b/include/linux/srcutiny.h
@@ -60,7 +60,7 @@ void srcu_drive_gp(struct work_struct *wp);
60#define DEFINE_STATIC_SRCU(name) \ 60#define DEFINE_STATIC_SRCU(name) \
61 static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name) 61 static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name)
62 62
63void synchronize_srcu(struct srcu_struct *sp); 63void synchronize_srcu(struct srcu_struct *ssp);
64 64
65/* 65/*
66 * Counts the new reader in the appropriate per-CPU element of the 66 * Counts the new reader in the appropriate per-CPU element of the
@@ -68,36 +68,36 @@ void synchronize_srcu(struct srcu_struct *sp);
68 * __srcu_read_unlock() must be in the same handler instance. Returns an 68 * __srcu_read_unlock() must be in the same handler instance. Returns an
69 * index that must be passed to the matching srcu_read_unlock(). 69 * index that must be passed to the matching srcu_read_unlock().
70 */ 70 */
71static inline int __srcu_read_lock(struct srcu_struct *sp) 71static inline int __srcu_read_lock(struct srcu_struct *ssp)
72{ 72{
73 int idx; 73 int idx;
74 74
75 idx = READ_ONCE(sp->srcu_idx); 75 idx = READ_ONCE(ssp->srcu_idx);
76 WRITE_ONCE(sp->srcu_lock_nesting[idx], sp->srcu_lock_nesting[idx] + 1); 76 WRITE_ONCE(ssp->srcu_lock_nesting[idx], ssp->srcu_lock_nesting[idx] + 1);
77 return idx; 77 return idx;
78} 78}
79 79
80static inline void synchronize_srcu_expedited(struct srcu_struct *sp) 80static inline void synchronize_srcu_expedited(struct srcu_struct *ssp)
81{ 81{
82 synchronize_srcu(sp); 82 synchronize_srcu(ssp);
83} 83}
84 84
85static inline void srcu_barrier(struct srcu_struct *sp) 85static inline void srcu_barrier(struct srcu_struct *ssp)
86{ 86{
87 synchronize_srcu(sp); 87 synchronize_srcu(ssp);
88} 88}
89 89
90/* Defined here to avoid size increase for non-torture kernels. */ 90/* Defined here to avoid size increase for non-torture kernels. */
91static inline void srcu_torture_stats_print(struct srcu_struct *sp, 91static inline void srcu_torture_stats_print(struct srcu_struct *ssp,
92 char *tt, char *tf) 92 char *tt, char *tf)
93{ 93{
94 int idx; 94 int idx;
95 95
96 idx = READ_ONCE(sp->srcu_idx) & 0x1; 96 idx = READ_ONCE(ssp->srcu_idx) & 0x1;
97 pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n", 97 pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n",
98 tt, tf, idx, 98 tt, tf, idx,
99 READ_ONCE(sp->srcu_lock_nesting[!idx]), 99 READ_ONCE(ssp->srcu_lock_nesting[!idx]),
100 READ_ONCE(sp->srcu_lock_nesting[idx])); 100 READ_ONCE(ssp->srcu_lock_nesting[idx]));
101} 101}
102 102
103#endif 103#endif