]> git.baikalelectronics.ru Git - uboot.git/commit
armv8: layerscape: rework spin table
authorMichael Walle <michael@walle.cc>
Mon, 1 Jun 2020 19:53:36 +0000 (21:53 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 27 Jul 2020 08:46:28 +0000 (14:16 +0530)
commitb867b84d13f8ea3eb6aa3e1621aa5bd893e11337
tree1b505d82985a39e56e07293dabefa7d56a6d5c65
parent1153c4b3dbef1062531a4f8e2ba0d6726be37e2d
armv8: layerscape: rework spin table

There are two issues:

 (1) The spin table doesn't convert the endianness of the jump address.
     Although there is code for it, the result isn't used at all (x0).
 (2) If something goes wrong, the function returns. But that doesn't
     make sense at all.

Use the actual converted jump address as destination to fix. If
there is an error, jump to a trap loop. And rearrange the code exception
level switching code to make it smaller and clearer.

This reduces the size of the spin table code section from 696 bytes to
424 bytes. If CONFIG_ARMV8_SWITCH_TO_EL1 the code size reduced from 696
bytes to 632 bytes.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/spintable.S