blob: 6ec72282888dc2331e70f3dbdae6b3c76889f6f6 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002#ifndef __ASM_SPINLOCK_H
3#define __ASM_SPINLOCK_H
4#ifdef __KERNEL__
5
Olivier Deprez157378f2022-04-04 15:47:50 +02006#ifdef CONFIG_PPC_QUEUED_SPINLOCKS
7#include <asm/qspinlock.h>
8#include <asm/qrwlock.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00009#else
Olivier Deprez157378f2022-04-04 15:47:50 +020010#include <asm/simple_spinlock.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000011#endif
12
Olivier Deprez157378f2022-04-04 15:47:50 +020013#ifndef CONFIG_PARAVIRT_SPINLOCKS
14static inline void pv_spinlocks_init(void) { }
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015#endif
16
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000017#endif /* __KERNEL__ */
18#endif /* __ASM_SPINLOCK_H */