Thread (12 messages) 12 messages, 3 authors, 2025-08-16

Re: [PATCH 8/9] crypto: sun8i-ce - save hash buffers and dma info to request context

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-08-16 09:09:27
Also in: linux-crypto, linux-sunxi, lkml

On Mon, Jul 28, 2025 at 09:07:00AM +0300, Ovidiu Panait wrote:
+	u8 result[CE_MAX_HASH_DIGEST_SIZE] ____cacheline_aligned;
To get proper alignment for the reqctx, the driver should use
the ahash_request_ctx_dma helper.  Of course, the reqsize should
also be increased by CRYPTO_DMA_PADDING.

For the struct member, instead of __cacheline_aligned use
__aligned(CRYPTO_DMA_ALIGN).
+	u8 pad[2 * CE_MAX_HASH_BLOCK_SIZE] ____cacheline_aligned;
This is to-devce only, right? If so it doesn't need to be aligned.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help