diff options
author | Waiman Long <[email protected]> | 2015-05-10 21:17:10 -0400 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-05-11 09:51:52 +0200 |
commit | 52c9d2badd1ae4d11c29de57d4e964e48afd3cb4 (patch) | |
tree | 00edebb52a79aec06420e26520d788d0e0373cbc | |
parent | e95e6f176c61dd0e7bd9fdfb4956df1f9bfe99d4 (diff) |
locking/pvqspinlock: Replace xchg() by the more descriptive set_mb()
The xchg() function was used in pv_wait_node() to set a certain
value and provide a memory barrier which is what the set_mb()
function is for. This patch replaces the xchg() call by
set_mb().
Suggested-by: Linus Torvalds <[email protected]>
Signed-off-by: Waiman Long <[email protected]>
Cc: Douglas Hatch <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Scott J Norton <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | kernel/locking/qspinlock_paravirt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/qspinlock_paravirt.h b/kernel/locking/qspinlock_paravirt.h index b5758a95a8d3..27ab96dca68c 100644 --- a/kernel/locking/qspinlock_paravirt.h +++ b/kernel/locking/qspinlock_paravirt.h @@ -175,7 +175,7 @@ static void pv_wait_node(struct mcs_spinlock *node) * * Matches the xchg() from pv_kick_node(). */ - (void)xchg(&pn->state, vcpu_halted); + set_mb(pn->state, vcpu_halted); if (!READ_ONCE(node->locked)) pv_wait(&pn->state, vcpu_halted); |