diff options
-rw-r--r-- | arch/x86/kernel/smpboot.c | 3 | ||||
-rw-r--r-- | arch/x86/xen/spinlock.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 361f91674ce5..198416ddff01 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1358,6 +1358,8 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1358 | pr_info("CPU0: "); | 1358 | pr_info("CPU0: "); |
1359 | print_cpu_info(&cpu_data(0)); | 1359 | print_cpu_info(&cpu_data(0)); |
1360 | 1360 | ||
1361 | native_pv_lock_init(); | ||
1362 | |||
1361 | uv_system_init(); | 1363 | uv_system_init(); |
1362 | 1364 | ||
1363 | set_mtrr_aps_delayed_init(); | 1365 | set_mtrr_aps_delayed_init(); |
@@ -1385,7 +1387,6 @@ void __init native_smp_prepare_boot_cpu(void) | |||
1385 | /* already set me in cpu_online_mask in boot_cpu_init() */ | 1387 | /* already set me in cpu_online_mask in boot_cpu_init() */ |
1386 | cpumask_set_cpu(me, cpu_callout_mask); | 1388 | cpumask_set_cpu(me, cpu_callout_mask); |
1387 | cpu_set_state_online(me); | 1389 | cpu_set_state_online(me); |
1388 | native_pv_lock_init(); | ||
1389 | } | 1390 | } |
1390 | 1391 | ||
1391 | void __init native_smp_cpus_done(unsigned int max_cpus) | 1392 | void __init native_smp_cpus_done(unsigned int max_cpus) |
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index e8ab80ad7a6f..1e1462d3d43e 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
@@ -81,8 +81,11 @@ void xen_init_lock_cpu(int cpu) | |||
81 | int irq; | 81 | int irq; |
82 | char *name; | 82 | char *name; |
83 | 83 | ||
84 | if (!xen_pvspin) | 84 | if (!xen_pvspin) { |
85 | if (cpu == 0) | ||
86 | static_branch_disable(&virt_spin_lock_key); | ||
85 | return; | 87 | return; |
88 | } | ||
86 | 89 | ||
87 | WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n", | 90 | WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n", |
88 | cpu, per_cpu(lock_kicker_irq, cpu)); | 91 | cpu, per_cpu(lock_kicker_irq, cpu)); |
@@ -130,7 +133,6 @@ void __init xen_init_spinlocks(void) | |||
130 | 133 | ||
131 | if (!xen_pvspin) { | 134 | if (!xen_pvspin) { |
132 | printk(KERN_DEBUG "xen: PV spinlocks disabled\n"); | 135 | printk(KERN_DEBUG "xen: PV spinlocks disabled\n"); |
133 | static_branch_disable(&virt_spin_lock_key); | ||
134 | return; | 136 | return; |
135 | } | 137 | } |
136 | printk(KERN_DEBUG "xen: PV spinlocks enabled\n"); | 138 | printk(KERN_DEBUG "xen: PV spinlocks enabled\n"); |