aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/relocate_kernel.S
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2011-08-26 11:32:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-08-28 05:39:41 -0400
commit552e0c8da8ff7099e6fe060cd7ec36ae11f5465b (patch)
tree9cec5232f51a023374a3ee66520ea7da056d9f32 /arch/arm/kernel/relocate_kernel.S
parent0ebb962e00a52b644433065d224ed89f72a84756 (diff)
ARM: 7065/1: kexec: ensure new kernel is entered in ARM state
Commit 540b5738 ("ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state") mandates that the kernel should be entered in ARM state. If a Thumb-2 kernel kexecs a new kernel image, we need to ensure that we change state when branching to the new code. This patch replaces a mov pc, lr with a bx lr on Thumb-2 kernels so that we transition to ARM state if need be. Reviewed-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/relocate_kernel.S')
-rw-r--r--arch/arm/kernel/relocate_kernel.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S
index 9cf4cbf8f95b..d0cdedf4864d 100644
--- a/arch/arm/kernel/relocate_kernel.S
+++ b/arch/arm/kernel/relocate_kernel.S
@@ -57,7 +57,8 @@ relocate_new_kernel:
57 mov r0,#0 57 mov r0,#0
58 ldr r1,kexec_mach_type 58 ldr r1,kexec_mach_type
59 ldr r2,kexec_boot_atags 59 ldr r2,kexec_boot_atags
60 mov pc,lr 60 ARM( mov pc, lr )
61 THUMB( bx lr )
61 62
62 .align 63 .align
63 64