Skip to content

Commit 548095d

Browse files
committed
locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath()
Queued spinlocks are not used by DEC Alpha, and furthermore operations such as READ_ONCE() and release/relaxed RMW atomics are being changed to imply smp_read_barrier_depends(). This commit therefore removes the now-redundant smp_read_barrier_depends() from queued_spin_lock_slowpath(), and adjusts the comments accordingly. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com>
1 parent 5c6338b commit 548095d

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎kernel/locking/qspinlock.c‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static __always_inline void clear_pending_set_locked(struct qspinlock *lock)
170170
* @tail : The new queue tail code word
171171
* Return: The previous queue tail code word
172172
*
173-
* xchg(lock, tail)
173+
* xchg(lock, tail), which heads an address dependency
174174
*
175175
* p,*,* -> n,*,* ; prev = xchg(lock, node)
176176
*/
@@ -409,13 +409,11 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
409409
if (old & _Q_TAIL_MASK) {
410410
prev = decode_tail(old);
411411
/*
412-
* The above xchg_tail() is also a load of @lock which generates,
413-
* through decode_tail(), a pointer.
414-
*
415-
* The address dependency matches the RELEASE of xchg_tail()
416-
* such that the access to @prev must happen after.
412+
* The above xchg_tail() is also a load of @lock which
413+
* generates, through decode_tail(), a pointer. The address
414+
* dependency matches the RELEASE of xchg_tail() such that
415+
* the subsequent access to @prev happens after.
417416
*/
418-
smp_read_barrier_depends();
419417

420418
WRITE_ONCE(prev->next, node);
421419

0 commit comments

Comments
 (0)