Subject: Re: [PATCH 22/22] mtd: rawnand: Use dma_alloc_noncoherent() for dma buffer

From: Christoph Hellwig <[email-masked]>
Date: Sat, 19 Feb 2022 08:19:00 +0100

On Sat, Feb 19, 2022 at 08:52:21AM +0800, Baoquan He wrote:
> Use dma_alloc_noncoherent() instead of directly allocating buffer
> from kmalloc with GFP_DMA. DMA API will try to allocate buffer
> depending on devices addressing limitation.

I think it would be better to still allocate the buffer at allocation
time and then just transfer ownership using dma_sync_single* in the I/O
path to avoid the GFP_ATOMIC allocation.