]> Gentwo Git Trees - linux/.git/commit
crypto: sun8i-ce - save hash buffers and dma info to request context
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Tue, 2 Sep 2025 13:21:33 +0000 (16:21 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 13 Sep 2025 04:11:05 +0000 (12:11 +0800)
commitc3a61eea658a9f6808a3d466a0978320b3855b49
treea6a32243d97d04d07f157cf159b45bb8577bd4e7
parent49034c03b5814ba4257927be2916bdadfe281be7
crypto: sun8i-ce - save hash buffers and dma info to request context

Similar to sun8i-ce skcipher code, move all request-specific data to
request context. This simplifies sun8i_ce_hash_run() and it eliminates
the remaining kmalloc() calls from the digest path.

Since the 'result' buffer in the request ctx struct is used for from-device
DMA, it needs to be properly aligned to CRYPTO_DMA_ALIGN. Therefore:
- increase reqsize by CRYPTO_DMA_PADDING
- add __aligned(CRYPTO_DMA_ALIGN) attribute for the 'result' buffer
- convert all ahash_request_ctx_dma() calls to ahash_request_ctx_dma()

Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h