1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SPINLOCK_H
3 #define __ASM_SPINLOCK_H
5 #include <asm/barrier.h>
6 #include <asm/processor.h>
8 #ifdef CONFIG_METAG_ATOMICITY_LOCK1
9 #include <asm/spinlock_lock1.h>
11 #include <asm/spinlock_lnkget.h>
15 * both lock1 and lnkget are test-and-set spinlocks with 0 unlocked and 1
19 #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
21 #define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
22 #define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
24 #define arch_spin_relax(lock) cpu_relax()
25 #define arch_read_relax(lock) cpu_relax()
26 #define arch_write_relax(lock) cpu_relax()
28 #endif /* __ASM_SPINLOCK_H */