]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7897/1: kexec: Use the right ISA for relocate_new_kernel
authorDave Martin <dave.martin@linaro.org>
Mon, 25 Nov 2013 13:54:47 +0000 (14:54 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 30 Nov 2013 22:21:02 +0000 (22:21 +0000)
commit429aa1fdd1b449b391549ed6ae6dfeab3345a7b6
treebbc2d16349c5f6deef37e2b0dc51422158fa4730
parentf55a1e84dfaab6d13e2f777692f77ddeffdb8fa3
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>
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/relocate_kernel.S