Re: [PATCH 2/2] dma-contiguous: page-align the size in dma_free_contiguous()

2019-07-26 Thread Christoph Hellwig
On Thu, Jul 25, 2019 at 04:39:59PM -0700, Nicolin Chen wrote: > According to the original dma_direct_alloc_pages() code: > { > unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; > > if (!dma_release_from_contiguous(dev, page, count)) > __free_pages(page,

[PATCH 2/2] dma-contiguous: page-align the size in dma_free_contiguous()

2019-07-25 Thread Nicolin Chen
According to the original dma_direct_alloc_pages() code: { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; if (!dma_release_from_contiguous(dev, page, count)) __free_pages(page, get_order(size)); } The count parameter for dma_release_from_contiguous() was