Messages in this thread | | | Date | Mon, 28 Nov 2022 11:59:59 +0800 | From | Herbert Xu <> | Subject | Re: [v2 PATCH 2/9] crypto: api - Add crypto_tfm_ctx_dma |
| |
On Fri, Nov 25, 2022 at 11:31:56AM +0000, Catalin Marinas wrote: > > Is the CRYPTO_DMA_PADDING used anywhere? I couldn't find it in this > series and I'd rather drop it, together with CRYPTO_DMA_ALIGN (see > below).
Yes it's used by caam which needs it in a struct initialiser.
> We have a generic dma_get_cache_alignment() function which currently is > either 1 or ARCH_DMA_MINALIGN, if the latter is defined. My plan is to > make eventually make this dynamic based on the actual cache line size > (on most arm64 systems it would be 64 rather than 128). So could you use > this instead of defining a CRYPTO_DMA_ALIGN? The only difference would > be that dma_get_cache_alignment() returns 1 rather than > ARCH_KMALLOC_MINALIGN if ARCH_DMA_MINALIGN is not defined, but I don't > think that's an issue.
I'm trying to make the driver patches as robotic as possible.
We could always improve upon this with driver-specific patches to change the struct initialiser to a run-time assignment to improve things further.
Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
| |