2 * Split spinlock implementation out into its own file, so it can be
3 * compiled in a FTRACE-compatible way.
5 #include <linux/spinlock.h>
6 #include <linux/module.h>
7 #include <linux/jump_label.h>
9 #include <asm/paravirt.h>
11 #ifdef CONFIG_QUEUED_SPINLOCKS
12 __visible
void __native_queued_spin_unlock(struct qspinlock
*lock
)
14 native_queued_spin_unlock(lock
);
17 PV_CALLEE_SAVE_REGS_THUNK(__native_queued_spin_unlock
);
19 bool pv_is_native_spin_unlock(void)
21 return pv_lock_ops
.queued_spin_unlock
.func
==
22 __raw_callee_save___native_queued_spin_unlock
;
26 struct pv_lock_ops pv_lock_ops
= {
28 #ifdef CONFIG_QUEUED_SPINLOCKS
29 .queued_spin_lock_slowpath
= native_queued_spin_lock_slowpath
,
30 .queued_spin_unlock
= PV_CALLEE_SAVE(__native_queued_spin_unlock
),
33 #else /* !CONFIG_QUEUED_SPINLOCKS */
34 .lock_spinning
= __PV_IS_CALLEE_SAVE(paravirt_nop
),
35 .unlock_kick
= paravirt_nop
,
36 #endif /* !CONFIG_QUEUED_SPINLOCKS */
39 EXPORT_SYMBOL(pv_lock_ops
);
41 struct static_key paravirt_ticketlocks_enabled
= STATIC_KEY_INIT_FALSE
;
42 EXPORT_SYMBOL(paravirt_ticketlocks_enabled
);