Skip to content

Commit bafe586

Browse files
bebarinoRussell King
authored andcommitted
ARM: 8302/1: Add a secondary_startup that assumes ARM mode
Some platforms always enter the kernel in ARM mode even if the kernel is compiled for THUMB2. Add a small wrapper on top of secondary_startup() that switches into THUMB2 mode. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent ada63d4 commit bafe586

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎arch/arm/kernel/head.S‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ __turn_mmu_on_loc:
346346

347347
#if defined(CONFIG_SMP)
348348
.text
349+
ENTRY(secondary_startup_arm)
350+
.arm
351+
THUMB( adr r9, BSYM(1f) ) @ Kernel is entered in ARM.
352+
THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
353+
THUMB( .thumb ) @ switch to Thumb now.
354+
THUMB(1: )
349355
ENTRY(secondary_startup)
350356
/*
351357
* Common entry point for secondary CPUs.
@@ -385,6 +391,7 @@ ENTRY(secondary_startup)
385391
THUMB( add r12, r10, #PROCINFO_INITFUNC )
386392
THUMB( ret r12 )
387393
ENDPROC(secondary_startup)
394+
ENDPROC(secondary_startup_arm)
388395

389396
/*
390397
* r6 = &secondary_data

0 commit comments

Comments
 (0)