From: Will Deacon Date: Fri, 26 Aug 2011 15:32:57 +0000 (+0100) Subject: ARM: 7065/1: kexec: ensure new kernel is entered in ARM state X-Git-Tag: v3.1-rc5~9^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=552e0c8da8ff7099e6fe060cd7ec36ae11f5465b;p=profile%2Fcommon%2Fkernel-common.git 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 Signed-off-by: Will Deacon Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index 9cf4cbf..d0cdedf 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S @@ -57,7 +57,8 @@ relocate_new_kernel: mov r0,#0 ldr r1,kexec_mach_type ldr r2,kexec_boot_atags - mov pc,lr + ARM( mov pc, lr ) + THUMB( bx lr ) .align