mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
powerpc: qspinlock: Mark accesses to qnode lock checks
The powerpc implementation of qspinlocks will both poll and spin on the bitlock guarding a qnode. Mark these accesses with READ_ONCE to convey to KCSAN that polling is intentional here. Signed-off-by: Rohan McLure <rmclure@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230510033117.1395895-2-rmclure@linux.ibm.com
This commit is contained in:
parent
98e61df570
commit
03d44ee80e
1 changed files with 2 additions and 2 deletions
|
@ -435,7 +435,7 @@ yield_prev:
|
|||
|
||||
smp_rmb(); /* See __yield_to_locked_owner comment */
|
||||
|
||||
if (!node->locked) {
|
||||
if (!READ_ONCE(node->locked)) {
|
||||
yield_to_preempted(prev_cpu, yield_count);
|
||||
spin_begin();
|
||||
return preempted;
|
||||
|
@ -584,7 +584,7 @@ static __always_inline void queued_spin_lock_mcs_queue(struct qspinlock *lock, b
|
|||
|
||||
/* Wait for mcs node lock to be released */
|
||||
spin_begin();
|
||||
while (!node->locked) {
|
||||
while (!READ_ONCE(node->locked)) {
|
||||
spec_barrier();
|
||||
|
||||
if (yield_to_prev(lock, node, old, paravirt))
|
||||
|
|
Loading…
Add table
Reference in a new issue