crypto: fsl_hash: fix flush dcache alignment in caam_hash()
authorBenjamin Lemouzy <blemouzy@centralp.fr>
Fri, 21 Feb 2025 07:05:01 +0000 (08:05 +0100)
committerPeng Fan <peng.fan@nxp.com>
Mon, 3 Mar 2025 06:18:50 +0000 (14:18 +0800)
commitef0e979e14332e37421eb3ebe5b88c2409a8803a
tree679cd0cd04581b188dbe5a83cf101ec463824627
parent9f258e4820026790ba0dfc27030a5c66d7169973
crypto: fsl_hash: fix flush dcache alignment in caam_hash()

Loading a FIT kernel image with hash hardware acceleration enabled
(CONFIG_SHA_HW_ACCEL=y) displays the following CACHE warning:

    [...]
    Trying 'kernel-1' kernel subimage
    [...]
    Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [160001281673fae8]
    [...]
    Trying 'ramdisk-1' ramdisk subimage
    [...]
    Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [1676d6d41737a5d4]
    [...]
    Trying 'fdt-imx6q-xxx.dtb' fdt subimage
    [...]
    Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [1673fbdc1674b0dc]
    [...]

This patch fixes it.

Tested on:
- i.MX 6 custom board
- LS1021A custom board

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/crypto/fsl/fsl_hash.c