When the kernel is compiled in Thumb mode (CONFIG_THUMB2_KERNEL)
copying and jumping/returning to/from the suspend code in OCM failed due
to misinterpreting or ignoring bit 0 of function addresses - which
indicates the execution state at the jump destination - , resulting
with the kernel crashing on an undefined instruction.
In detail, the suspend code was copied with an erroneous, additional
offset of 1 due to the LSB in the address of zynq_sys_suspend being set.
And jumping to the code failed as
1. the additional offset wasn't taken into account when jumping
2. the jump switched to ARM state even though the destination contains
Thumb code
Fixed by using the 'fncpy' macro to do the copying and obtaining the
function pointer to call.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>