[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: Init traps very early



commit bea392432119c1dedefb448d4c053151da36c6e0
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Thu Jun 19 15:02:16 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jun 27 14:13:22 2014 +0100

    xen/arm: Init traps very early
    
    The function init_traps sets up the handler taken when Xen hits a
    BUG_ON/ASSERT.
    
    If an error happen before init_traps is called, we lose the backtrace.
    
    When a trap is taken from HYP mode, we need to:
        - get the processor ID, percpu has to be initialized and the
          smp_processor_id correctly set.
        - initialize current, even though it's not used for the time being. Move
          the debug sanity earlier.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Tested-by: Naresh Bhat <naresh.bhat@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    [ ijc -- fixed typos and rewrapped commit log ]
---
 xen/arch/arm/setup.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index b9ce7a9..78dc7f5 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -670,6 +670,12 @@ void __init start_xen(unsigned long boot_phys_offset,
     percpu_init_areas();
     set_processor_id(0); /* needed early, for smp_processor_id() */
 
+    set_current((struct vcpu *)0xfffff000); /* debug sanity */
+    idle_vcpu[0] = current;
+
+    /* Initialize traps early allow us to get backtrace when an error occurred 
*/
+    init_traps();
+
     smp_clear_cpu_maps();
 
     /* This is mapped by head.S */
@@ -706,11 +712,6 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     gic_init();
 
-    set_current((struct vcpu *)0xfffff000); /* debug sanity */
-    idle_vcpu[0] = current;
-
-    init_traps();
-
     setup_virt_paging();
 
     p2m_vmid_allocator_init();
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.