diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:25:02 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:25:02 +0800 |
| commit | 138f2c357e124fa8e676e6f27cc986c3ce320130 (patch) | |
| tree | e0aca2935ad712a92f74025bbccac8583556e79d /kernel/locking | |
| parent | 2bf7955152a0544342fcaed28930748cc68392ae (diff) | |
| parent | 1a1a512b983108015ced1e7a7c7775cfeec42d8c (diff) | |
Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4
Conflicts:
drivers/base/power/opp/core.c
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/mcs_spinlock.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/locking/mcs_spinlock.h b/kernel/locking/mcs_spinlock.h index 5b9102a47ea5..c835270f0c2f 100644 --- a/kernel/locking/mcs_spinlock.h +++ b/kernel/locking/mcs_spinlock.h @@ -67,7 +67,13 @@ void mcs_spin_lock(struct mcs_spinlock **lock, struct mcs_spinlock *node) node->locked = 0; node->next = NULL; - prev = xchg_acquire(lock, node); + /* + * We rely on the full barrier with global transitivity implied by the + * below xchg() to order the initialization stores above against any + * observation of @node. And to provide the ACQUIRE ordering associated + * with a LOCK primitive. + */ + prev = xchg(lock, node); if (likely(prev == NULL)) { /* * Lock acquired, don't need to set node->locked to 1. Threads |
