]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator()
authorJulien Grall <julien.grall@arm.com>
Mon, 9 Oct 2017 13:23:35 +0000 (14:23 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 10 Oct 2017 21:22:09 +0000 (14:22 -0700)
We should consider the early boot period to end when we stop using the
boot allocator. This is inline with x86 and will be helpful to know
whether we should allocate memory from the boot allocator or xenheap.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/setup.c

index 3df451ae6fc0ccfd22b5c5083d7831773c40dd49..16a3b1be8e75cdb39a460ca640623689f3daa4b3 100644 (file)
@@ -757,6 +757,12 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     end_boot_allocator();
 
+    /*
+     * The memory subsystem has been initialized, we can now switch from
+     * early_boot -> boot.
+     */
+    system_state = SYS_STATE_boot;
+
     vm_init();
 
     if ( acpi_disabled )
@@ -779,8 +785,6 @@ void __init start_xen(unsigned long boot_phys_offset,
     console_init_preirq();
     console_init_ring();
 
-    system_state = SYS_STATE_boot;
-
     processor_id();
 
     smp_init_cpus();