Re: [PATCH] crypto: talitos - Remove GFP_DMA and add DMA alignment padding

From: Herbert Xu
Date: Mon Jan 09 2023 - 02:38:38 EST


On Mon, Jan 09, 2023 at 07:18:27AM +0000, Christophe Leroy wrote:
>
> Doesn't GFP_DMA guarantees that the provided memory is addressable for
> DMA ? Or do we assume that all memory returned by kmalloc can be used
> for DMA ?

No it does not. Please refer to the DMI API documentation.

> kmalloc() already returns not DMA aligned memory, why does it becomes a
> problem now ?

As it stands kmalloc on arm64 returns DMA-aligned memory. This
will soon no longer be the case.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt