spinlock.c (6e2d6b2728fcb408eabd7991804f8cb33ff59f20) spinlock.c (5c83511bdb9832c86be20fb86b783356e2f58062)
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/kernel_stat.h>
7#include <linux/spinlock.h>
8#include <linux/debugfs.h>

--- 127 unchanged lines hidden (view full) ---

136
137 if (!xen_pvspin) {
138 printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
139 return;
140 }
141 printk(KERN_DEBUG "xen: PV spinlocks enabled\n");
142
143 __pv_init_lock_hash();
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/kernel_stat.h>
7#include <linux/spinlock.h>
8#include <linux/debugfs.h>

--- 127 unchanged lines hidden (view full) ---

136
137 if (!xen_pvspin) {
138 printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
139 return;
140 }
141 printk(KERN_DEBUG "xen: PV spinlocks enabled\n");
142
143 __pv_init_lock_hash();
144 pv_lock_ops.queued_spin_lock_slowpath = __pv_queued_spin_lock_slowpath;
145 pv_lock_ops.queued_spin_unlock = PV_CALLEE_SAVE(__pv_queued_spin_unlock);
146 pv_lock_ops.wait = xen_qlock_wait;
147 pv_lock_ops.kick = xen_qlock_kick;
148 pv_lock_ops.vcpu_is_preempted = PV_CALLEE_SAVE(xen_vcpu_stolen);
144 pv_ops.lock.queued_spin_lock_slowpath = __pv_queued_spin_lock_slowpath;
145 pv_ops.lock.queued_spin_unlock =
146 PV_CALLEE_SAVE(__pv_queued_spin_unlock);
147 pv_ops.lock.wait = xen_qlock_wait;
148 pv_ops.lock.kick = xen_qlock_kick;
149 pv_ops.lock.vcpu_is_preempted = PV_CALLEE_SAVE(xen_vcpu_stolen);
149}
150
151static __init int xen_parse_nopvspin(char *arg)
152{
153 xen_pvspin = false;
154 return 0;
155}
156early_param("xen_nopvspin", xen_parse_nopvspin);
157
150}
151
152static __init int xen_parse_nopvspin(char *arg)
153{
154 xen_pvspin = false;
155 return 0;
156}
157early_param("xen_nopvspin", xen_parse_nopvspin);
158