1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_MCS_LOCK_H
3 #define __ASM_MCS_LOCK_H
6 #include <asm/spinlock.h>
8 /* MCS spin-locking. */
9 #define arch_mcs_spin_lock_contended(lock) \
11 /* Ensure prior stores are observed before we enter wfe. */ \
13 while (!(smp_load_acquire(lock))) \
17 #define arch_mcs_spin_unlock_contended(lock) \
19 smp_store_release(lock, 1); \
23 #endif /* CONFIG_SMP */
24 #endif /* __ASM_MCS_LOCK_H */