Re: [PATCH 1/2] dma-coherent: Add one parameter to save available coherent memory

2018-06-02 Thread Baolin Wang
On 1 June 2018 at 01:25, Robin Murphy wrote: > On 31/05/18 06:55, Baolin Wang wrote: >> >> It is incorrect to use mem->size to valid if there are enough coherent >> memory to allocate in __dma_alloc_from_coherent(), since some devices >> may mark some occupied coherent memory by >> dma_mark_declar

Re: [PATCH 1/2] dma-coherent: Add one parameter to save available coherent memory

2018-05-31 Thread Robin Murphy
On 31/05/18 06:55, Baolin Wang wrote: It is incorrect to use mem->size to valid if there are enough coherent memory to allocate in __dma_alloc_from_coherent(), since some devices may mark some occupied coherent memory by dma_mark_declared_memory_occupied(). So we can introduce one 'avail' parame

[PATCH 1/2] dma-coherent: Add one parameter to save available coherent memory

2018-05-31 Thread Baolin Wang
It is incorrect to use mem->size to valid if there are enough coherent memory to allocate in __dma_alloc_from_coherent(), since some devices may mark some occupied coherent memory by dma_mark_declared_memory_occupied(). So we can introduce one 'avail' parameter to save the available device coheren