]> git.baikalelectronics.ru Git - uboot.git/commit
crypto/fsl: fix unaligned access
authorMichael Walle <michael@walle.cc>
Thu, 4 Jun 2020 19:05:33 +0000 (21:05 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 27 Jul 2020 08:46:28 +0000 (14:16 +0530)
commit9a01299e4fd5cae46043d725503b73ca5459f621
treed30721499b90748b251201ad7b07fef2d16c3084
parentd1263692dbab47c6c10ab7e9ee58f2c7754538b1
crypto/fsl: fix unaligned access

On aarch64 running with dcache off, will result in an unaligned access
exception:

   => dcache off
   => hash sha1 $kernel_addr_r 100
   "Synchronous Abort" handler, esr 0x96000061
   elr: 00000000960317d8 lr : 00000000960316a4 (reloc)
   elr: 00000000fbd787d8 lr : 00000000fbd786a4
   [..]

The compiler emits a "stur x1, [x0, #12]". x1 is might just be 32 bit
aligned pointer. Remove the unused u64 element from the union to drop
the minimal alignment to 32 bit. Also remove the union, because it is
no more needed.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/crypto/fsl/desc_constr.h