xref: /kernel/linux/linux-5.10/arch/loongarch/include/asm/qspinlock_paravirt.h (revision 8c2ecf20)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/loongarch/include/asm/
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __ASM_QSPINLOCK_PARAVIRT_H
3#define __ASM_QSPINLOCK_PARAVIRT_H
4
5#ifdef CONFIG_64BIT
6
7#define __pv_queued_spin_unlock	__pv_queued_spin_unlock
8void __pv_queued_spin_unlock(struct qspinlock *lock)
9{
10	u8 lockval = cmpxchg(&lock->locked, _Q_LOCKED_VAL, 0);
11
12	if (likely(lockval == _Q_LOCKED_VAL))
13		return;
14	__pv_queued_spin_unlock_slowpath(lock, lockval);
15}
16
17#endif /* CONFIG_64BIT */
18#endif
19

Indexes created Thu Nov 07 10:32:03 CST 2024