diff options
author | Dave Martin <dave.martin@linaro.org> | 2013-11-25 14:54:47 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-11-30 23:21:02 +0100 |
commit | e2ccba49085ab5d71b092de2a5176eb9b19cc876 (patch) | |
tree | bbc2d16349c5f6deef37e2b0dc51422158fa4730 /arch/arm/kernel/relocate_kernel.S | |
parent | ARM: 7895/1: signal: fix armv7-m build issue in sigreturn_codes.S (diff) | |
download | linux-e2ccba49085ab5d71b092de2a5176eb9b19cc876.tar.xz linux-e2ccba49085ab5d71b092de2a5176eb9b19cc876.zip |
ARM: 7897/1: kexec: Use the right ISA for relocate_new_kernel
Copying a function with memcpy() and then trying to execute the
result isn't trivially portable to Thumb.
This patch modifies the kexec soft restart code to copy its
assembler trampoline relocate_new_kernel() using fncpy() instead,
so that relocate_new_kernel can be in the same ISA as the rest of
the kernel without problems.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Reported-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Tested-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
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.S | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index d0cdedf4864d..95858966d84e 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S @@ -2,10 +2,12 @@ * relocate_kernel.S - put the kernel image in place to boot */ +#include <linux/linkage.h> #include <asm/kexec.h> - .globl relocate_new_kernel -relocate_new_kernel: + .align 3 /* not needed for this code, but keeps fncpy() happy */ + +ENTRY(relocate_new_kernel) ldr r0,kexec_indirection_page ldr r1,kexec_start_address @@ -79,6 +81,8 @@ kexec_mach_type: kexec_boot_atags: .long 0x0 +ENDPROC(relocate_new_kernel) + relocate_new_kernel_end: .globl relocate_new_kernel_size |