diff mbox

xen/arm32: Call start_xen only on the boot CPU

Message ID 1381157075-28214-1-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall Oct. 7, 2013, 2:44 p.m. UTC
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>
---
 xen/arch/arm/arm32/head.S |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ian Campbell Oct. 10, 2013, 10:41 a.m. UTC | #1
On Mon, 2013-10-07 at 15:44 +0100, Julien Grall wrote:
> 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 + applied, thanks.

64-bit looks correct already to me.
diff mbox

Patch

diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 92b3c48..ce1d21a 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -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) */