]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Introduce init_info structure
authorJulien Grall <julien.grall@linaro.org>
Thu, 26 Sep 2013 11:09:35 +0000 (12:09 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 26 Sep 2013 14:41:50 +0000 (15:41 +0100)
This structure will gather all information to boot a secondary cpus.
For now it just contains the initial stack.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/arm32/asm-offsets.c
xen/arch/arm/arm32/head.S
xen/arch/arm/arm64/asm-offsets.c
xen/arch/arm/arm64/head.S
xen/arch/arm/smpboot.c
xen/include/asm-arm/init.h

index 263fff3c578d9cba443c89e4b3cb5af7c19e9af4..ac628c00eb3ff9f05300a55bdb963ac24f4bfd7a 100644 (file)
@@ -69,6 +69,10 @@ void __dummy__(void)
    OFFSET(PROCINFO_cpu_val, struct proc_info_list, cpu_val);
    OFFSET(PROCINFO_cpu_mask, struct proc_info_list, cpu_mask);
    OFFSET(PROCINFO_cpu_init, struct proc_info_list, cpu_init);
+
+   BLANK();
+   OFFSET(INITINFO_stack, struct init_info, stack);
+
 }
 
 /*
index 79e95b673cbbca819ffa9a6558a267636d77ead4..fce18a2d984d525369f0b0ba5c4bfdf24bf7b8de 100644 (file)
@@ -366,7 +366,8 @@ paging:
         bne   1b
 
 launch:
-        ldr   r0, =init_stack        /* Find the boot-time stack */
+        ldr   r0, =init_data
+        add   r0, #INITINFO_stack    /* Find the boot-time stack */
         ldr   sp, [r0]
         add   sp, #STACK_SIZE        /* (which grows down from the top). */
         sub   sp, #CPUINFO_sizeof    /* Make room for CPU save record */
index 2a225b6653068abc9df5d1e802e57ba5f1730296..d7572fa6502921d85f05b07d2c571b3d5cf13520 100644 (file)
@@ -46,6 +46,9 @@ void __dummy__(void)
    DEFINE(CPUINFO_sizeof, sizeof(struct cpu_info));
 
    OFFSET(VCPU_arch_saved_context, struct vcpu, arch.saved_context);
+
+   BLANK();
+   OFFSET(INITINFO_stack, struct init_info, stack);
 }
 
 /*
index 21b7e4d7415033e162a7953d3cf4a1cc80e2128f..e0831b6fd7abb53cd7d8f4657f0378fad7d434aa 100644 (file)
@@ -313,7 +313,8 @@ paging:
         b.ne  1b
 
 launch:
-        ldr   x0, =init_stack        /* Find the boot-time stack */
+        ldr   x0, =init_data
+        add   x0, x0, #INITINFO_stack /* Find the boot-time stack */
         ldr   x0, [x0]
         add   x0, x0, #STACK_SIZE    /* (which grows down from the top). */
         sub   x0, x0, #CPUINFO_sizeof /* Make room for CPU save record */
index b6aea63e18f2f142de098f94f76790fe075d9d35..945f4739a9217c6cb9377b674d070a1475035fc7 100644 (file)
@@ -46,8 +46,11 @@ nodemask_t __read_mostly node_online_map = { { [0] = 1UL } };
 static unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
        __attribute__((__aligned__(STACK_SIZE)));
 
-/* Pointer to the stack, used by head.S when entering C */
-unsigned char *init_stack = cpu0_boot_stack;
+/* Initial boot cpu data */
+struct init_info __initdata init_data =
+{
+    .stack = cpu0_boot_stack,
+};
 
 /* Shared state for coordinating CPU bringup */
 unsigned long smp_up_cpu = 0;
@@ -224,7 +227,7 @@ int __cpu_up(unsigned int cpu)
         return rc;
 
     /* Tell the remote CPU which stack to boot on. */
-    init_stack = idle_vcpu[cpu]->arch.stack;
+    init_data.stack = idle_vcpu[cpu]->arch.stack;
 
     /* Unblock the CPU.  It should be waiting in the loop in head.S
      * for an event to arrive when smp_up_cpu matches its cpuid. */
index 237ec25e4ef689c96c0b4de5504719fc170cc2da..7a07136eb4551afa4184fc51a730896cbf3ca4a5 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef _XEN_ASM_INIT_H
 #define _XEN_ASM_INIT_H
 
+struct init_info
+{
+    /* Pointer to the stack, used by head.S when entering in C */
+    unsigned char *stack;
+};
+
 #endif /* _XEN_ASM_INIT_H */
 /*
  * Local variables: