Skip to content

Commit 565fdc6

Browse files
Boris OstrovskyDavid Vrabel
authored andcommitted
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 <[email protected]> Reported-by: Sander Eikelenboom <[email protected]> Signed-off-by: David Vrabel <[email protected]>
1 parent b057878 commit 565fdc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/xen/enlighten.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
16441644
xen_initial_gdt = &per_cpu(gdt_page, 0);
16451645

16461646
xen_smp_init();
1647-
WARN_ON(xen_cpuhp_setup());
16481647

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

1660+
WARN_ON(xen_cpuhp_setup());
1661+
16611662
local_irq_disable();
16621663
early_boot_irqs_disabled = true;
16631664

0 commit comments

Comments
 (0)