[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220222155947.GB13323@lst.de>
Date: Tue, 22 Feb 2022 16:59:47 +0100
From: Christoph Hellwig <hch@....de>
To: Baoquan He <bhe@...hat.com>
Cc: Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, akpm@...ux-foundation.org, cl@...ux.com,
42.hyeyoo@...il.com, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, vbabka@...e.cz, David.Laight@...lab.com,
david@...hat.com, herbert@...dor.apana.org.au, davem@...emloft.net,
linux-crypto@...r.kernel.org, steffen.klassert@...unet.com,
netdev@...r.kernel.org, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com,
svens@...ux.ibm.com, linux-s390@...r.kernel.org, michael@...le.cc,
linux-i2c@...r.kernel.org, wsa@...nel.org
Subject: Re: [PATCH 2/2] kernel/dma: rename dma_alloc_direct and
dma_map_direct
On Tue, Feb 22, 2022 at 09:42:22PM +0800, Baoquan He wrote:
> In the old dma mapping, coherent mapping uses dma_alloc_coherent() to
> allocate DMA buffer and mapping; while streaming mapping can only get
> memory from slab or buddy allocator, then map with dma_map_single().
> In that situation, dma_alloc_direct() checks a direct mapping for
> coherent DMA, dma_map_direct() checks a direct mapping for streaming
> DMA.
>
> However, several new APIs have been added for streaming mapping, e.g
> dma_alloc_pages(). These new APIs take care of DMA buffer allocating
> and mapping which are similar with dma_alloc_coherent(). So we should
> rename both of them to reflect their real intention to avoid confusion.
>
> dma_alloc_direct() ==> dma_coherent_direct()
> dma_map_direct() ==> dma_streaming_direct()
No, these new names are highly misleading.
Powered by blists - more mailing lists