xen/pvticketlocks: Add xen_nopvspin parameter to disable xen pv ticketlocks

From: Jeremy Fitzhardinge <jer...@goop.org>

Signed-off-by: Jeremy Fitzhardinge <jer...@goop.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Signed-off-by: Raghavendra K T <raghavendra...@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mi...@kernel.org>
---
 arch/x86/xen/spinlock.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index a458729..669a971 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -244,6 +244,8 @@ void xen_uninit_lock_cpu(int cpu)
        per_cpu(irq_name, cpu) = NULL;
 }
 
+static bool xen_pvspin __initdata = true;
+
 void __init xen_init_spinlocks(void)
 {
        /*
@@ -253,10 +255,22 @@ void __init xen_init_spinlocks(void)
        if (xen_hvm_domain())
                return;
 
+       if (!xen_pvspin) {
+               printk(KERN_DEBUG "xen: PV spinlocks disabled\n");
+               return;
+       }
+
        pv_lock_ops.lock_spinning = xen_lock_spinning;
        pv_lock_ops.unlock_kick = xen_unlock_kick;
 }
 
+static __init int xen_parse_nopvspin(char *arg)
+{
+       xen_pvspin = false;
+       return 0;
+}
+early_param("xen_nopvspin", xen_parse_nopvspin);
+
 #ifdef CONFIG_XEN_DEBUG_FS
 
 static struct dentry *d_spin_debug;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to