diff mbox

[2/3] ARM: shmobile: Force ARM mode to compile reset vector for secondary CPUs

Message ID 1373421397-1786-3-git-send-email-koba@kmckk.co.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Tetsuyuki Kobayashi July 10, 2013, 1:56 a.m. UTC
Instructions start from boot vector must be ARM mode.
This patch specify ARM mode explicitly and use 'bx' instruction to be
able to change to Thumb mode.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
 arch/arm/mach-shmobile/headsmp.S |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Simon Horman July 10, 2013, 1:20 p.m. UTC | #1
On Wed, Jul 10, 2013 at 10:56:36AM +0900, Tetsuyuki Kobayashi wrote:
> Instructions start from boot vector must be ARM mode.
> This patch specify ARM mode explicitly and use 'bx' instruction to be
> able to change to Thumb mode.
> 
> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
> ---
>  arch/arm/mach-shmobile/headsmp.S |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Thanks, I have queued this up with Magnus's ack in the thumb-fixes
branch of my renesas tree on kernel.org. It should be
included in the renesas-next-20130710v2 tag.
Tetsuyuki Kobayashi July 11, 2013, 1:21 a.m. UTC | #2
Thank you, Simon-san.

I will post the backport patch to next LTSI kernel.

(2013/07/10 22:20), Simon Horman wrote:
> On Wed, Jul 10, 2013 at 10:56:36AM +0900, Tetsuyuki Kobayashi wrote:
>> Instructions start from boot vector must be ARM mode.
>> This patch specify ARM mode explicitly and use 'bx' instruction to be
>> able to change to Thumb mode.
>>
>> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
>> ---
>>   arch/arm/mach-shmobile/headsmp.S |    5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> Thanks, I have queued this up with Magnus's ack in the thumb-fixes
> branch of my renesas tree on kernel.org. It should be
> included in the renesas-next-20130710v2 tag.
>
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 559d1ce..afed58e 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -26,10 +26,13 @@  ENDPROC(shmobile_invalidate_start)
  * This will be mapped at address 0 by SBAR register.
  * We need _long_ jump to the physical address.
  */
+	.arm
 	.align  12
 ENTRY(shmobile_boot_vector)
 	ldr     r0, 2f
-	ldr     pc, 1f
+	ldr     r1, 1f
+	bx	r1
+
 ENDPROC(shmobile_boot_vector)
 
 	.globl	shmobile_boot_fn