12874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2b8b572e1SStephen Rothwell #ifndef __ASM_SPINLOCK_H
3b8b572e1SStephen Rothwell #define __ASM_SPINLOCK_H
4b8b572e1SStephen Rothwell #ifdef __KERNEL__
5b8b572e1SStephen Rothwell 
6aa65ff6bSNicholas Piggin #ifdef CONFIG_PPC_QUEUED_SPINLOCKS
7aa65ff6bSNicholas Piggin #include <asm/qspinlock.h>
8aa65ff6bSNicholas Piggin #include <asm/qrwlock.h>
9aa65ff6bSNicholas Piggin #else
1012d0b9d6SNicholas Piggin #include <asm/simple_spinlock.h>
11aa65ff6bSNicholas Piggin #endif
12d89e588cSPeter Zijlstra 
132bf3604cSDavidlohr Bueso /* See include/linux/spinlock.h */
142bf3604cSDavidlohr Bueso #define smp_mb__after_spinlock()	smp_mb()
152bf3604cSDavidlohr Bueso 
16*9f61521cSNicholas Piggin #ifndef CONFIG_PPC_QUEUED_SPINLOCKS
pv_spinlocks_init(void)1720c0e826SNicholas Piggin static inline void pv_spinlocks_init(void) { }
1820c0e826SNicholas Piggin #endif
1920c0e826SNicholas Piggin 
20b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
21b8b572e1SStephen Rothwell #endif /* __ASM_SPINLOCK_H */
22