]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: octeontx2 - Fix address alignment on CN10KB and CN10KA-B0
authorBharat Bhushan <bbhushan2@marvell.com>
Thu, 22 May 2025 10:06:27 +0000 (15:36 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jun 2025 09:26:16 +0000 (17:26 +0800)
commita091a58b8a1eba2f243b0c05bcc82bdc2a4a338d
tree4702d944c05c0620f8ba5210cd635801bcc4750f
parent2e13163b43e6bb861182ea999a80dd1d893c0cbf
crypto: octeontx2 - Fix address alignment on CN10KB and CN10KA-B0

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:
  "9382bc44b5f5 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>
drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h