linux/drivers/crypto/marvell
Bharat Bhushan 90bc643296 crypto: octeontx2 - Fix address alignment on CN10KB and CN10KA-B0
commit a091a58b8a upstream.

octeontx2 crypto driver allocates memory using kmalloc/kzalloc,
and uses this memory for dma (does dma_map_single()). It assumes
that kmalloc/kzalloc will return 128-byte aligned address. But
kmalloc/kzalloc returns 8-byte aligned address after below changes:
  "9382bc44b5 arm64: allow kmalloc() caches aligned to the
   smaller cache_line_size()

Memory allocated are used for following purpose:
 - Input data or scatter list address - 8-Byte alignment
 - Output data or gather list address - 8-Byte alignment
 - Completion address - 32-Byte alignment.

This patch ensures all addresses are aligned as mentioned above.

Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Cc: <stable@vger.kernel.org> # v6.8+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:30:55 +02:00
..
cesa crypto: marvell/cesa - Fix engine load inaccuracy 2025-08-15 12:13:49 +02:00
octeontx crypto: octeontx - Remove unused declaration otx_cpt_callback() 2024-08-30 18:22:31 +08:00
octeontx2 crypto: octeontx2 - Fix address alignment on CN10KB and CN10KA-B0 2025-08-28 16:30:55 +02:00
Kconfig crypto: octeontx* - Select CRYPTO_AUTHENC 2024-09-06 14:50:46 +08:00
Makefile crypto: marvell - add Marvell OcteonTX2 CPT PF driver 2021-01-22 14:58:02 +11:00