Skip to contentSkip to conversation

ARM: OMAP5: Redo THUMB mode switch on secondary CPU

PATCH In review Joel Fernandes 3 participants 3 messages Apr 30, 2014 – May 6, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP5: Redo THUMB mode switch on secondary CPU

Here's a redo of the patch [1] that effectively does the same thing but is the right way to do things by using ENDPROC instead. The firmware correctly switches to THUMB before entry.

The patch applies ontop of the earlier patch [1].

[1] https://lkml.org/lkml/2014/4/22/1044

Cc Dave Martin <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Russell King <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Tony Lindgren <[email protected]>

---

Tony, the earlier patch went into your fixes, and can remain. This patch is just a simple redo of the same and can go in for v3.16, no problem. Thanks.

 arch/arm/mach-omap2/omap-headsmp.S |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-omap2/omap-headsmp.S +1 -5
index 1809dce..bf36f26 100644
@@ -31,10 +31,6 @@
  * register AuxCoreBoot0.
  */
 ENTRY(omap5_secondary_startup)
-.arm
-THUMB( adr     r9, BSYM(wait)  )       @ CPU may be entered in ARM mode.
-THUMB( bx      r9              )       @ If this is a Thumb-2 kernel,
-THUMB( .thumb                  )       @ switch to Thumb now.
 wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	ldr	r0, [r2]
 	mov	r0, r0, lsr #5
@@ -43,7 +39,7 @@ wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	cmp	r0, r4
 	bne	wait
 	b	secondary_startup
-END(omap5_secondary_startup)
+ENDPROC(omap5_secondary_startup)
 /*
  * OMAP4 specific entry point for secondary CPU to jump from ROM
  * code.  This routine also provides a holding flag into which
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Joel Fernandes

Here's a redo of the patch [1] that effectively does the same thing but is the right way to do things by using ENDPROC instead. The firmware correctly switches to THUMB before entry.

The patch applies ontop of the earlier patch [1].

[1] https://lkml.org/lkml/2014/4/22/1044

Quoted 7 lines
Cc Dave Martin <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Russell King <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Tony Lindgren <[email protected]>

Looks OK to me.

This also makes omap5 consistent with omap3/4 here.

Quoted 39 lines

---

Tony, the earlier patch went into your fixes, and can remain. This patch is just a simple redo of the same and can go in for v3.16, no problem. Thanks.

 arch/arm/mach-omap2/omap-headsmp.S |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-omap2/omap-headsmp.S +1 -5
index 1809dce..bf36f26 100644
@@ -31,10 +31,6 @@
  * register AuxCoreBoot0.
  */
 ENTRY(omap5_secondary_startup)
-.arm
-THUMB( adr     r9, BSYM(wait)  )       @ CPU may be entered in ARM mode.
-THUMB( bx      r9              )       @ If this is a Thumb-2 kernel,
-THUMB( .thumb                  )       @ switch to Thumb now.
 wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	ldr	r0, [r2]
 	mov	r0, r0, lsr #5
@@ -43,7 +39,7 @@ wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	cmp	r0, r4
 	bne	wait
 	b	secondary_startup
-END(omap5_secondary_startup)
+ENDPROC(omap5_secondary_startup)
 /*
  * OMAP4 specific entry point for secondary CPU to jump from ROM
  * code.  This routine also provides a holding flag into which
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#2 lore raw
In reply to Joel Fernandes
Quoted 15 lines · Joel Fernandes

Here's a redo of the patch [1] that effectively does the same thing but is the right way to do things by using ENDPROC instead. The firmware correctly switches to THUMB before entry.

The patch applies ontop of the earlier patch [1].

[1] https://lkml.org/lkml/2014/4/22/1044

Cc Dave Martin <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Russell King <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Tony Lindgren <[email protected]>
Quoted 3 lines

---

Tony, the earlier patch went into your fixes, and can remain. This patch is just a simple redo of the same and can go in for v3.16, no problem. Thanks.

OK thanks, applying into omap-for-v3.16/fixes-not-urgent.

Tony

Quoted 30 lines
 arch/arm/mach-omap2/omap-headsmp.S |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-omap2/omap-headsmp.S +1 -5
index 1809dce..bf36f26 100644
@@ -31,10 +31,6 @@
  * register AuxCoreBoot0.
  */
 ENTRY(omap5_secondary_startup)
-.arm
-THUMB( adr     r9, BSYM(wait)  )       @ CPU may be entered in ARM mode.
-THUMB( bx      r9              )       @ If this is a Thumb-2 kernel,
-THUMB( .thumb                  )       @ switch to Thumb now.
 wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	ldr	r0, [r2]
 	mov	r0, r0, lsr #5
@@ -43,7 +39,7 @@ wait:	ldr	r2, =AUX_CORE_BOOT0_PA	@ read from AuxCoreBoot0
 	cmp	r0, r4
 	bne	wait
 	b	secondary_startup
-END(omap5_secondary_startup)
+ENDPROC(omap5_secondary_startup)
 /*
  * OMAP4 specific entry point for secondary CPU to jump from ROM
  * code.  This routine also provides a holding flag into which
Signature · 1 line
1.7.9.5