diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-22 15:49:40 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-22 15:49:40 +0300 |
commit | 50797851b4a594ba131fa5f147f4510e351bf081 (patch) | |
tree | f05dbfa2e65ad8f1161fc18a37cadee819ccac9a /arch/arm64/include/asm/spinlock.h | |
parent | 4fa5cd5245b627db88c9ca08ae442373b02596b4 (diff) | |
parent | 7d1e042314619115153a0f6f06e4552c09a50e13 (diff) | |
download | linux-50797851b4a594ba131fa5f147f4510e351bf081.tar.xz |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/spinlock.h')
-rw-r--r-- | arch/arm64/include/asm/spinlock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/spinlock.h b/arch/arm64/include/asm/spinlock.h index e875a5a551d7..89206b568cd4 100644 --- a/arch/arm64/include/asm/spinlock.h +++ b/arch/arm64/include/asm/spinlock.h @@ -363,4 +363,14 @@ static inline int arch_read_trylock(arch_rwlock_t *rw) #define arch_read_relax(lock) cpu_relax() #define arch_write_relax(lock) cpu_relax() +/* + * Accesses appearing in program order before a spin_lock() operation + * can be reordered with accesses inside the critical section, by virtue + * of arch_spin_lock being constructed using acquire semantics. + * + * In cases where this is problematic (e.g. try_to_wake_up), an + * smp_mb__before_spinlock() can restore the required ordering. + */ +#define smp_mb__before_spinlock() smp_mb() + #endif /* __ASM_SPINLOCK_H */ |