[PATCH v2] ARM: kexec: Use the right ISA for relocate_new_kernel

Will Deacon will.deacon at arm.com
Fri Nov 8 08:34:27 EST 2013


On Fri, Nov 08, 2013 at 12:24:04PM +0000, Dave Martin wrote:
> 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 at arm.com>
> ---
> Changes since v1:
> 
>   * Move ENDPROC() after relocate_new_kernel's literals, to be
>     consistent the location of relocate_new_kernel_end and with the way
>     GCC sets ELF symbol sizes for functions.  This is just a tidyup,
>     with no functional impact.

Cheers Dave:

  Acked-by: Will Deacon <will.deacon at arm.com>

Will



More information about the linux-arm-kernel mailing list