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

[Xen-changelog] [xen master] xen/arm: Initialize PERCPU variables at the beginning of start_xen



commit c433774a6ea84c46c25fdf8ef7e2657aaf2c7f2b
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Jul 24 18:01:36 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jul 29 16:54:39 2013 +0100

    xen/arm: Initialize PERCPU variables at the beginning of start_xen
    
    PERCPU variables rely on HTPIDR (TPIDR_EL2) which is in an unknown state 
when
    a processor boot.
    
    For the boot CPU, the first use of PERCPU is in setup_pagetables. So
    initialize PERCPU and set the processor ID before.
    
    Bamvor Jian Zhang observed this failure on the sun6i processor which does 
not
    initialise HTPIDR and contributed a very similar patch.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Tim Deegan <tim@xxxxxxx>
    [ ijc -- added last para of commit message ]
---
 xen/arch/arm/setup.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2f9fdc8..1ec5e38 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -428,6 +428,9 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     setup_cache();
 
+    percpu_init_areas();
+    set_processor_id(0); /* needed early, for smp_processor_id() */
+
     smp_clear_cpu_maps();
 
     device_tree_flattened = (void *)BOOT_MISC_VIRT_START
@@ -458,8 +461,6 @@ void __init start_xen(unsigned long boot_phys_offset,
     gic_init();
     make_cpus_ready(cpus, 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;
 
--
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®.