Commit e55687fe authored by Peter Zijlstra's avatar Peter Zijlstra

seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g

__SEQ_LOCKDEP() is an expression gate for the
seqcount_LOCKNAME_t::lock member. Rename it to be about the member,
not the gate condition.

Later (PREEMPT_RT) patches will make the member available for !LOCKDEP
configs.
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
parent af5a06b5
...@@ -133,20 +133,20 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s) ...@@ -133,20 +133,20 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
*/ */
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
#define __SEQ_LOCKDEP(expr) expr #define __SEQ_LOCK(expr) expr
#else #else
#define __SEQ_LOCKDEP(expr) #define __SEQ_LOCK(expr)
#endif #endif
#define SEQCOUNT_LOCKTYPE_ZERO(seq_name, assoc_lock) { \ #define SEQCOUNT_LOCKTYPE_ZERO(seq_name, assoc_lock) { \
.seqcount = SEQCNT_ZERO(seq_name.seqcount), \ .seqcount = SEQCNT_ZERO(seq_name.seqcount), \
__SEQ_LOCKDEP(.lock = (assoc_lock)) \ __SEQ_LOCK(.lock = (assoc_lock)) \
} }
#define seqcount_locktype_init(s, assoc_lock) \ #define seqcount_locktype_init(s, assoc_lock) \
do { \ do { \
seqcount_init(&(s)->seqcount); \ seqcount_init(&(s)->seqcount); \
__SEQ_LOCKDEP((s)->lock = (assoc_lock)); \ __SEQ_LOCK((s)->lock = (assoc_lock)); \
} while (0) } while (0)
/** /**
...@@ -161,7 +161,7 @@ do { \ ...@@ -161,7 +161,7 @@ do { \
*/ */
typedef struct seqcount_spinlock { typedef struct seqcount_spinlock {
seqcount_t seqcount; seqcount_t seqcount;
__SEQ_LOCKDEP(spinlock_t *lock); __SEQ_LOCK(spinlock_t *lock);
} seqcount_spinlock_t; } seqcount_spinlock_t;
/** /**
...@@ -192,7 +192,7 @@ typedef struct seqcount_spinlock { ...@@ -192,7 +192,7 @@ typedef struct seqcount_spinlock {
*/ */
typedef struct seqcount_raw_spinlock { typedef struct seqcount_raw_spinlock {
seqcount_t seqcount; seqcount_t seqcount;
__SEQ_LOCKDEP(raw_spinlock_t *lock); __SEQ_LOCK(raw_spinlock_t *lock);
} seqcount_raw_spinlock_t; } seqcount_raw_spinlock_t;
/** /**
...@@ -223,7 +223,7 @@ typedef struct seqcount_raw_spinlock { ...@@ -223,7 +223,7 @@ typedef struct seqcount_raw_spinlock {
*/ */
typedef struct seqcount_rwlock { typedef struct seqcount_rwlock {
seqcount_t seqcount; seqcount_t seqcount;
__SEQ_LOCKDEP(rwlock_t *lock); __SEQ_LOCK(rwlock_t *lock);
} seqcount_rwlock_t; } seqcount_rwlock_t;
/** /**
...@@ -257,7 +257,7 @@ typedef struct seqcount_rwlock { ...@@ -257,7 +257,7 @@ typedef struct seqcount_rwlock {
*/ */
typedef struct seqcount_mutex { typedef struct seqcount_mutex {
seqcount_t seqcount; seqcount_t seqcount;
__SEQ_LOCKDEP(struct mutex *lock); __SEQ_LOCK(struct mutex *lock);
} seqcount_mutex_t; } seqcount_mutex_t;
/** /**
...@@ -291,7 +291,7 @@ typedef struct seqcount_mutex { ...@@ -291,7 +291,7 @@ typedef struct seqcount_mutex {
*/ */
typedef struct seqcount_ww_mutex { typedef struct seqcount_ww_mutex {
seqcount_t seqcount; seqcount_t seqcount;
__SEQ_LOCKDEP(struct ww_mutex *lock); __SEQ_LOCK(struct ww_mutex *lock);
} seqcount_ww_mutex_t; } seqcount_ww_mutex_t;
/** /**
...@@ -329,7 +329,7 @@ __seqcount_##locktype##_preemptible(seqcount_##locktype##_t *s) \ ...@@ -329,7 +329,7 @@ __seqcount_##locktype##_preemptible(seqcount_##locktype##_t *s) \
static inline void \ static inline void \
__seqcount_##locktype##_assert(seqcount_##locktype##_t *s) \ __seqcount_##locktype##_assert(seqcount_##locktype##_t *s) \
{ \ { \
__SEQ_LOCKDEP(lockdep_assert_held(lockmember)); \ __SEQ_LOCK(lockdep_assert_held(lockmember)); \
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment