Line data Source code
1 : // SPDX-License-Identifier: GPL-2.0 2 : /* 3 : * Split spinlock implementation out into its own file, so it can be 4 : * compiled in a FTRACE-compatible way. 5 : */ 6 : #include <linux/spinlock.h> 7 : #include <linux/export.h> 8 : #include <linux/jump_label.h> 9 : 10 : #include <asm/paravirt.h> 11 : 12 1900 : __visible void __native_queued_spin_unlock(struct qspinlock *lock) 13 : { 14 1900 : native_queued_spin_unlock(lock); 15 1900 : } 16 : PV_CALLEE_SAVE_REGS_THUNK(__native_queued_spin_unlock); 17 : 18 22 : bool pv_is_native_spin_unlock(void) 19 : { 20 22 : return pv_ops.lock.queued_spin_unlock.func == 21 : __raw_callee_save___native_queued_spin_unlock; 22 : } 23 : 24 0 : __visible bool __native_vcpu_is_preempted(long cpu) 25 : { 26 0 : return false; 27 : } 28 : PV_CALLEE_SAVE_REGS_THUNK(__native_vcpu_is_preempted); 29 : 30 7 : bool pv_is_native_vcpu_is_preempted(void) 31 : { 32 7 : return pv_ops.lock.vcpu_is_preempted.func == 33 : __raw_callee_save___native_vcpu_is_preempted; 34 : }