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

[Xen-devel] [PATCH RFC] fix sun6i crash on setup_pagetables



this patch move set_processor_id in front of setup_pagetables
in order to fix crash when calling this_cpu in that functions.
the HPTIDR is unknown value according to ARM ARM 7AR(DDI0406C),
B4-1598. we should use it before using it.

but i do not know why other board like arndale board. should
bootloader write this register?

Signed-off-by: Bamvor Jian Zhang <bjzhang@xxxxxxxx>
---
 xen/arch/arm/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2f9fdc8..3bf1b40 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -437,6 +437,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     cpus = smp_get_max_cpus();
     cmdline_parse(device_tree_bootargs(device_tree_flattened));
 
+    set_processor_id(0); /* needed early, for this_cpu() */
     setup_pagetables(boot_phys_offset, get_xen_paddr());
     setup_mm(fdt_paddr, fdt_size);
 
@@ -459,7 +460,6 @@ void __init start_xen(unsigned long boot_phys_offset,
     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;
 
-- 
1.8.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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