mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
seqlock: Rename __seqprop() users
More consistent naming should make it easier to untangle the _Generic token pasting maze called __seqprop(). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201110115358.GE2594@hirez.programming.kicks-ass.net
This commit is contained in:
parent
e04ce676e7
commit
ab440b2c60
1 changed files with 23 additions and 23 deletions
|
@ -307,10 +307,10 @@ SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mu
|
||||||
__seqprop_case((s), mutex, prop), \
|
__seqprop_case((s), mutex, prop), \
|
||||||
__seqprop_case((s), ww_mutex, prop))
|
__seqprop_case((s), ww_mutex, prop))
|
||||||
|
|
||||||
#define __seqcount_ptr(s) __seqprop(s, ptr)
|
#define seqprop_ptr(s) __seqprop(s, ptr)
|
||||||
#define __seqcount_sequence(s) __seqprop(s, sequence)
|
#define seqprop_sequence(s) __seqprop(s, sequence)
|
||||||
#define __seqcount_lock_preemptible(s) __seqprop(s, preemptible)
|
#define seqprop_preemptible(s) __seqprop(s, preemptible)
|
||||||
#define __seqcount_assert_lock_held(s) __seqprop(s, assert)
|
#define seqprop_assert(s) __seqprop(s, assert)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __read_seqcount_begin() - begin a seqcount_t read section w/o barrier
|
* __read_seqcount_begin() - begin a seqcount_t read section w/o barrier
|
||||||
|
@ -330,7 +330,7 @@ SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mu
|
||||||
({ \
|
({ \
|
||||||
unsigned __seq; \
|
unsigned __seq; \
|
||||||
\
|
\
|
||||||
while ((__seq = __seqcount_sequence(s)) & 1) \
|
while ((__seq = seqprop_sequence(s)) & 1) \
|
||||||
cpu_relax(); \
|
cpu_relax(); \
|
||||||
\
|
\
|
||||||
kcsan_atomic_next(KCSAN_SEQLOCK_REGION_MAX); \
|
kcsan_atomic_next(KCSAN_SEQLOCK_REGION_MAX); \
|
||||||
|
@ -359,7 +359,7 @@ SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mu
|
||||||
*/
|
*/
|
||||||
#define read_seqcount_begin(s) \
|
#define read_seqcount_begin(s) \
|
||||||
({ \
|
({ \
|
||||||
seqcount_lockdep_reader_access(__seqcount_ptr(s)); \
|
seqcount_lockdep_reader_access(seqprop_ptr(s)); \
|
||||||
raw_read_seqcount_begin(s); \
|
raw_read_seqcount_begin(s); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mu
|
||||||
*/
|
*/
|
||||||
#define raw_read_seqcount(s) \
|
#define raw_read_seqcount(s) \
|
||||||
({ \
|
({ \
|
||||||
unsigned __seq = __seqcount_sequence(s); \
|
unsigned __seq = seqprop_sequence(s); \
|
||||||
\
|
\
|
||||||
smp_rmb(); \
|
smp_rmb(); \
|
||||||
kcsan_atomic_next(KCSAN_SEQLOCK_REGION_MAX); \
|
kcsan_atomic_next(KCSAN_SEQLOCK_REGION_MAX); \
|
||||||
|
@ -425,7 +425,7 @@ SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mu
|
||||||
* Return: true if a read section retry is required, else false
|
* Return: true if a read section retry is required, else false
|
||||||
*/
|
*/
|
||||||
#define __read_seqcount_retry(s, start) \
|
#define __read_seqcount_retry(s, start) \
|
||||||
__read_seqcount_t_retry(__seqcount_ptr(s), start)
|
__read_seqcount_t_retry(seqprop_ptr(s), start)
|
||||||
|
|
||||||
static inline int __read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
static inline int __read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
||||||
{
|
{
|
||||||
|
@ -445,7 +445,7 @@ static inline int __read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
||||||
* Return: true if a read section retry is required, else false
|
* Return: true if a read section retry is required, else false
|
||||||
*/
|
*/
|
||||||
#define read_seqcount_retry(s, start) \
|
#define read_seqcount_retry(s, start) \
|
||||||
read_seqcount_t_retry(__seqcount_ptr(s), start)
|
read_seqcount_t_retry(seqprop_ptr(s), start)
|
||||||
|
|
||||||
static inline int read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
static inline int read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
||||||
{
|
{
|
||||||
|
@ -459,10 +459,10 @@ static inline int read_seqcount_t_retry(const seqcount_t *s, unsigned start)
|
||||||
*/
|
*/
|
||||||
#define raw_write_seqcount_begin(s) \
|
#define raw_write_seqcount_begin(s) \
|
||||||
do { \
|
do { \
|
||||||
if (__seqcount_lock_preemptible(s)) \
|
if (seqprop_preemptible(s)) \
|
||||||
preempt_disable(); \
|
preempt_disable(); \
|
||||||
\
|
\
|
||||||
raw_write_seqcount_t_begin(__seqcount_ptr(s)); \
|
raw_write_seqcount_t_begin(seqprop_ptr(s)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static inline void raw_write_seqcount_t_begin(seqcount_t *s)
|
static inline void raw_write_seqcount_t_begin(seqcount_t *s)
|
||||||
|
@ -478,9 +478,9 @@ static inline void raw_write_seqcount_t_begin(seqcount_t *s)
|
||||||
*/
|
*/
|
||||||
#define raw_write_seqcount_end(s) \
|
#define raw_write_seqcount_end(s) \
|
||||||
do { \
|
do { \
|
||||||
raw_write_seqcount_t_end(__seqcount_ptr(s)); \
|
raw_write_seqcount_t_end(seqprop_ptr(s)); \
|
||||||
\
|
\
|
||||||
if (__seqcount_lock_preemptible(s)) \
|
if (seqprop_preemptible(s)) \
|
||||||
preempt_enable(); \
|
preempt_enable(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -501,12 +501,12 @@ static inline void raw_write_seqcount_t_end(seqcount_t *s)
|
||||||
*/
|
*/
|
||||||
#define write_seqcount_begin_nested(s, subclass) \
|
#define write_seqcount_begin_nested(s, subclass) \
|
||||||
do { \
|
do { \
|
||||||
__seqcount_assert_lock_held(s); \
|
seqprop_assert(s); \
|
||||||
\
|
\
|
||||||
if (__seqcount_lock_preemptible(s)) \
|
if (seqprop_preemptible(s)) \
|
||||||
preempt_disable(); \
|
preempt_disable(); \
|
||||||
\
|
\
|
||||||
write_seqcount_t_begin_nested(__seqcount_ptr(s), subclass); \
|
write_seqcount_t_begin_nested(seqprop_ptr(s), subclass); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static inline void write_seqcount_t_begin_nested(seqcount_t *s, int subclass)
|
static inline void write_seqcount_t_begin_nested(seqcount_t *s, int subclass)
|
||||||
|
@ -528,12 +528,12 @@ static inline void write_seqcount_t_begin_nested(seqcount_t *s, int subclass)
|
||||||
*/
|
*/
|
||||||
#define write_seqcount_begin(s) \
|
#define write_seqcount_begin(s) \
|
||||||
do { \
|
do { \
|
||||||
__seqcount_assert_lock_held(s); \
|
seqprop_assert(s); \
|
||||||
\
|
\
|
||||||
if (__seqcount_lock_preemptible(s)) \
|
if (seqprop_preemptible(s)) \
|
||||||
preempt_disable(); \
|
preempt_disable(); \
|
||||||
\
|
\
|
||||||
write_seqcount_t_begin(__seqcount_ptr(s)); \
|
write_seqcount_t_begin(seqprop_ptr(s)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static inline void write_seqcount_t_begin(seqcount_t *s)
|
static inline void write_seqcount_t_begin(seqcount_t *s)
|
||||||
|
@ -549,9 +549,9 @@ static inline void write_seqcount_t_begin(seqcount_t *s)
|
||||||
*/
|
*/
|
||||||
#define write_seqcount_end(s) \
|
#define write_seqcount_end(s) \
|
||||||
do { \
|
do { \
|
||||||
write_seqcount_t_end(__seqcount_ptr(s)); \
|
write_seqcount_t_end(seqprop_ptr(s)); \
|
||||||
\
|
\
|
||||||
if (__seqcount_lock_preemptible(s)) \
|
if (seqprop_preemptible(s)) \
|
||||||
preempt_enable(); \
|
preempt_enable(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ static inline void write_seqcount_t_end(seqcount_t *s)
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
#define raw_write_seqcount_barrier(s) \
|
#define raw_write_seqcount_barrier(s) \
|
||||||
raw_write_seqcount_t_barrier(__seqcount_ptr(s))
|
raw_write_seqcount_t_barrier(seqprop_ptr(s))
|
||||||
|
|
||||||
static inline void raw_write_seqcount_t_barrier(seqcount_t *s)
|
static inline void raw_write_seqcount_t_barrier(seqcount_t *s)
|
||||||
{
|
{
|
||||||
|
@ -623,7 +623,7 @@ static inline void raw_write_seqcount_t_barrier(seqcount_t *s)
|
||||||
* will complete successfully and see data older than this.
|
* will complete successfully and see data older than this.
|
||||||
*/
|
*/
|
||||||
#define write_seqcount_invalidate(s) \
|
#define write_seqcount_invalidate(s) \
|
||||||
write_seqcount_t_invalidate(__seqcount_ptr(s))
|
write_seqcount_t_invalidate(seqprop_ptr(s))
|
||||||
|
|
||||||
static inline void write_seqcount_t_invalidate(seqcount_t *s)
|
static inline void write_seqcount_t_invalidate(seqcount_t *s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue