Skip to content

Commit

Permalink
xen/x86: Initialize per_cpu(xen_vcpu, 0) a little earlier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris Ostrovsky authored and David Vrabel committed Oct 5, 2016
1 parent b057878 commit 565fdc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
xen_initial_gdt = &per_cpu(gdt_page, 0);

xen_smp_init();
WARN_ON(xen_cpuhp_setup());

#ifdef CONFIG_ACPI_NUMA
/*
Expand All @@ -1658,6 +1657,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
possible map and a non-dummy shared_info. */
per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];

WARN_ON(xen_cpuhp_setup());

local_irq_disable();
early_boot_irqs_disabled = true;

Expand Down

0 comments on commit 565fdc6

Please sign in to comment.