Dear All:
we use arm64 dma_alloc_coherent to get a expected non-cacheable buffer. but when we use the buffer as a dma memory for device, after cpu write datas to the buffer, It is not coherent in ddr so that device cann't get proper datas. so we find the LSK current version's dma alloc is malfunctional.
we have to flushcacheall after cpu write datas and It is ok. It shows that dma_alloc_coherent doesn't work properly.
thanks
Peter
________________________________________ 发件人: Alex Shi [alex.shi@linaro.org] 发送时间: 2014年5月7日 12:06 收件人: Panshilin (Peter); Mark Brown; Guodong Xu; Haojian Zhuang 主题: Re: 答复: 答复: Is this patch included in LSK April release
CC to guodong.
Peter,
I am not MM experts. So could you like to give bit more detailed info of your concern? I did find not any abuse of flush_cache_all in arm64 code.
And AFAIK, If you have no a *hardware* cache coherency unit for DMA access, do you? kernel need to flush(inv) cache lines which involved. but don't need to flush all. Flush range of involved address is fine. Did you try this?
On 05/06/2014 05:10 PM, Panshilin (Peter) wrote:
we verified the patch based on linaro lsk April release and it didn't work .now we have to call flush cache all before start dma transfer. obviously it is not ok for dma coherent function in LSK. Please solve this issue as soon as you can. urgency, thanks . ________________________________________ 发件人: Alex Shi [alex.shi@linaro.org] 发送时间: 2014年5月6日 10:08 收件人: Panshilin (Peter); Mark Brown 主题: Re: 答复: Is this patch included in LSK April release
On 05/05/2014 03:18 PM, Panshilin (Peter) wrote:
de2db74 arm64: Make DMA coherent and strongly ordered mappings not
Peter, did you try the patch in your hardware? Does it work?
-- Thanks Alex
-- Thanks Alex