162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci#ifndef __ASM_SPINLOCK_H 362306a36Sopenharmony_ci#define __ASM_SPINLOCK_H 462306a36Sopenharmony_ci#ifdef __KERNEL__ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifdef CONFIG_PPC_QUEUED_SPINLOCKS 762306a36Sopenharmony_ci#include <asm/qspinlock.h> 862306a36Sopenharmony_ci#include <asm/qrwlock.h> 962306a36Sopenharmony_ci#else 1062306a36Sopenharmony_ci#include <asm/simple_spinlock.h> 1162306a36Sopenharmony_ci#endif 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* See include/linux/spinlock.h */ 1462306a36Sopenharmony_ci#define smp_mb__after_spinlock() smp_mb() 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#ifndef CONFIG_PPC_QUEUED_SPINLOCKS 1762306a36Sopenharmony_cistatic inline void pv_spinlocks_init(void) { } 1862306a36Sopenharmony_ci#endif 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#endif /* __KERNEL__ */ 2162306a36Sopenharmony_ci#endif /* __ASM_SPINLOCK_H */ 22