]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
xen: arm: Call init_xen_time earlier
authorIan Campbell <ian.campbell@citrix.com>
Wed, 19 Dec 2012 14:16:18 +0000 (14:16 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 19 Dec 2012 14:16:18 +0000 (14:16 +0000)
If we panic before calling init_xen_time then the "Rebooting in 5
seconds" delay ends up calling udelay which uses cntfrq before it has
been initialised resulting in a divide by zero.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/setup.c

index 20767246a5a39b68305d73c247ef413f142d5c74..7b0a0f61e15e06519ac1ad4307e4c81005581322 100644 (file)
@@ -219,6 +219,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     console_init_preirq();
 #endif
 
+    init_xen_time();
+
     gic_init();
     make_cpus_ready(cpus, boot_phys_offset);
 
@@ -227,8 +229,6 @@ void __init start_xen(unsigned long boot_phys_offset,
     set_current((struct vcpu *)0xfffff000); /* debug sanity */
     idle_vcpu[0] = current;
 
-    init_xen_time();
-
     setup_mm(atag_paddr, fdt_size);
 
     /* Setup Hyp vector base */