Re: [Linaro-mm-sig] [PATCH 2/4] staging: android: ion: Restrict cache maintenance to dma mapped memory

2019-02-28 Thread Liam Mark
+ Sumit Hi Sumit, Do you have any thoughts on this patch? It fixes a potential crash in on older kernel and I think limiting begin/end_cpu_access to only apply cache maintenance when the buffer is dma mapped makes sense from a logical perspective and performance perspective. On Wed, 6

Re: [Linaro-mm-sig] [PATCH 2/4] staging: android: ion: Restrict cache maintenance to dma mapped memory

2019-02-07 Thread Ørjan Eide
On Wed, Feb 06, 2019 at 11:31:04PM -0800, Christoph Hellwig wrote: > The CPU may only access DMA mapped memory if ownership has been > transferred back to the CPU using dma_sync_{single,sg}_to_cpu, and then > before the device can access it again ownership needs to be transferred > back to the

Re: [Linaro-mm-sig] [PATCH 2/4] staging: android: ion: Restrict cache maintenance to dma mapped memory

2019-02-06 Thread Christoph Hellwig
The CPU may only access DMA mapped memory if ownership has been transferred back to the CPU using dma_sync_{single,sg}_to_cpu, and then before the device can access it again ownership needs to be transferred back to the device using dma_sync_{single,sg}_to_device. > I've run some testing, and

Re: [Linaro-mm-sig] [PATCH 2/4] staging: android: ion: Restrict cache maintenance to dma mapped memory

2019-02-06 Thread Ørjan Eide
On Wed, Jan 30, 2019 at 11:31:23AM +, Brian Starkey wrote: > > On Tue, Jan 29, 2019 at 03:44:53PM -0800, Liam Mark wrote: > > On Fri, 18 Jan 2019, Liam Mark wrote: > > > > > On Fri, 18 Jan 2019, Andrew F. Davis wrote: > > > > > > > On 1/18/19 12:37 PM, Liam Mark wrote: > > > > > The ION