xen/arm32: Call start_xen only on the boot CPU
authorJulien Grall <julien.grall@linaro.org>
Mon, 7 Oct 2013 14:44:35 +0000 (15:44 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 10 Oct 2013 10:18:25 +0000 (11:18 +0100)
The boot CPU can have a CPU ID non-equal to zero. Xen needs to check the
logical CPU ID (in r12) to know if the CPU is the boot one.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/arm32/head.S

index 92b3c4896f882df44220e18ea00a506922b60e89..ce1d21a8e380adcaa5d862a4281c67231eade5f2 100644 (file)
@@ -403,7 +403,8 @@ launch:
         sub   sp, #CPUINFO_sizeof    /* Make room for CPU save record */
         mov   r0, r10                /* Marshal args: - phys_offset */
         mov   r1, r8                 /*               - DTB address */
-        movs  r2, r7                 /*               - CPU ID */
+        mov   r2, r7                 /*               - CPU ID */
+        teq   r12, #0
         beq   start_xen              /* and disappear into the land of C */
         b     start_secondary        /* (to the appropriate entry point) */