xref: /openbmc/linux/arch/arm64/include/asm/spinlock.h (revision b4e18b29)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2012 ARM Ltd.
4  */
5 #ifndef __ASM_SPINLOCK_H
6 #define __ASM_SPINLOCK_H
7 
8 #include <asm/qrwlock.h>
9 #include <asm/qspinlock.h>
10 
11 /* See include/linux/spinlock.h */
12 #define smp_mb__after_spinlock()	smp_mb()
13 
14 /*
15  * Changing this will break osq_lock() thanks to the call inside
16  * smp_cond_load_relaxed().
17  *
18  * See:
19  * https://lore.kernel.org/lkml/20200110100612.GC2827@hirez.programming.kicks-ass.net
20  */
21 #define vcpu_is_preempted vcpu_is_preempted
22 static inline bool vcpu_is_preempted(int cpu)
23 {
24 	return false;
25 }
26 
27 #endif /* __ASM_SPINLOCK_H */
28