Re: [PATCH] ARM: dma-mapping: always clear allocated buffers

2018-07-24 Thread YueHaibing
On 2018/7/25 2:09, Christoph Hellwig wrote: > On Tue, Jul 24, 2018 at 10:04:35PM +0800, YueHaibing wrote: >> Sean Wang report dma_zalloc_coherent doesn't work as expect on his >> armv7,the allocated mem is not zeroed.The reason is __alloc_from_pool >> doesn't honor __GFP_ZERO. > > Please explain

Re: [PATCH] ARM: dma-mapping: always clear allocated buffers

2018-07-24 Thread Christoph Hellwig
On Tue, Jul 24, 2018 at 10:04:35PM +0800, YueHaibing wrote: > Sean Wang report dma_zalloc_coherent doesn't work as expect on his > armv7,the allocated mem is not zeroed.The reason is __alloc_from_pool > doesn't honor __GFP_ZERO. Please explain the "why" a little more. All the explanations are in

[PATCH] ARM: dma-mapping: always clear allocated buffers

2018-07-24 Thread YueHaibing
Sean Wang report dma_zalloc_coherent doesn't work as expect on his armv7,the allocated mem is not zeroed.The reason is __alloc_from_pool doesn't honor __GFP_ZERO. Like commit 6829e274a623 ("arm64: dma-mapping: always clear allocated buffers") does,always clear allocated buffers to fix this.