mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-26 07:44:27 +08:00
2bf3604c41
Instead of both queued and simple spinlocks doing it. Move it into the arch's spinlock.h. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210309015950.27688-2-dave@stgolabs.net
22 lines
472 B
C
22 lines
472 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef __ASM_SPINLOCK_H
|
|
#define __ASM_SPINLOCK_H
|
|
#ifdef __KERNEL__
|
|
|
|
#ifdef CONFIG_PPC_QUEUED_SPINLOCKS
|
|
#include <asm/qspinlock.h>
|
|
#include <asm/qrwlock.h>
|
|
#else
|
|
#include <asm/simple_spinlock.h>
|
|
#endif
|
|
|
|
/* See include/linux/spinlock.h */
|
|
#define smp_mb__after_spinlock() smp_mb()
|
|
|
|
#ifndef CONFIG_PARAVIRT_SPINLOCKS
|
|
static inline void pv_spinlocks_init(void) { }
|
|
#endif
|
|
|
|
#endif /* __KERNEL__ */
|
|
#endif /* __ASM_SPINLOCK_H */
|