aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2016-10-02 18:45:19 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2016-10-05 05:32:22 -0400
commit565fdc6a2afeb14e654a8d9ebc792afb9d2c0019 (patch)
treef9ca1605b6adbbb6c4e56cf17b3dd2e30fcea5fb /arch/x86/xen/enlighten.c
parentb057878b2aadc7e06280e7e702a36e7adb1bcdf7 (diff)
xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier
xen_cpuhp_setup() calls mutex_lock() which, when CONFIG_DEBUG_MUTEXES is defined, ends up calling xen_save_fl(). That routine expects per_cpu(xen_vcpu, 0) to be already initialized. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reported-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 366b6aed4a8e..96c2dea798a1 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1644,7 +1644,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
1644 xen_initial_gdt = &per_cpu(gdt_page, 0); 1644 xen_initial_gdt = &per_cpu(gdt_page, 0);
1645 1645
1646 xen_smp_init(); 1646 xen_smp_init();
1647 WARN_ON(xen_cpuhp_setup());
1648 1647
1649#ifdef CONFIG_ACPI_NUMA 1648#ifdef CONFIG_ACPI_NUMA
1650 /* 1649 /*
@@ -1658,6 +1657,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
1658 possible map and a non-dummy shared_info. */ 1657 possible map and a non-dummy shared_info. */
1659 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; 1658 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
1660 1659
1660 WARN_ON(xen_cpuhp_setup());
1661
1661 local_irq_disable(); 1662 local_irq_disable();
1662 early_boot_irqs_disabled = true; 1663 early_boot_irqs_disabled = true;
1663 1664