Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-13 Thread Sinan Kaya
On 4/13/2018 11:41 AM, David Laight wrote: > From: James Hogan >> Sent: 12 April 2018 22:52 >> On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: >>> While a barrier is present in writeX() function before the register write, >>> a similar barrier is missing in the readX() function after th

RE: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-13 Thread David Laight
From: James Hogan > Sent: 12 April 2018 22:52 > On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: > > While a barrier is present in writeX() function before the register write, > > a similar barrier is missing in the readX() function after the register > > read. This could allow memory ac

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-12 Thread Sinan Kaya
On 4/12/2018 5:58 PM, James Hogan wrote: > On Thu, Apr 12, 2018 at 10:51:49PM +0100, James Hogan wrote: >> On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: >>> While a barrier is present in writeX() function before the register write, >>> a similar barrier is missing in the readX() funct

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-12 Thread Sinan Kaya
On 4/12/2018 5:51 PM, James Hogan wrote: > But why don't we always use wmb() in the writeX() case? Might not the > cached write to DMA buffer be reordered with the uncached write to MMIO > register from the coherent DMA point of view? I'm waiting on feedback > from MIPS hardware folk on this topic.

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-12 Thread James Hogan
On Thu, Apr 12, 2018 at 10:51:49PM +0100, James Hogan wrote: > On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: > > While a barrier is present in writeX() function before the register write, > > a similar barrier is missing in the readX() function after the register > > read. This could

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-12 Thread James Hogan
On Tue, Apr 03, 2018 at 08:55:04AM -0400, Sinan Kaya wrote: > While a barrier is present in writeX() function before the register write, > a similar barrier is missing in the readX() function after the register > read. This could allow memory accesses following readX() to observe > stale data. > >

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-11 Thread Sinan Kaya
On 4/11/2018 4:26 PM, James Hogan wrote: > On Wed, Apr 11, 2018 at 01:10:41PM -0400, Sinan Kaya wrote: >> How is the likelihood of getting this fixed on 4.17 kernel? > > High. > Thanks for the confirmation. > Thanks > James > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affili

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-11 Thread James Hogan
On Wed, Apr 11, 2018 at 01:10:41PM -0400, Sinan Kaya wrote: > How is the likelihood of getting this fixed on 4.17 kernel? High. Thanks James signature.asc Description: Digital signature

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-11 Thread Maciej W. Rozycki
Hi James, > > Any news on the MIPS front? Is this something that Arnd can merge? or does > > it have > > to go through the MIPS tree. > > It needs some MIPS input really. I'll try and take a look soon. Thanks > for the nudge. > > > It feels like the MIPS is dead since nobody replied to me in th

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-11 Thread Sinan Kaya
On 4/7/2018 5:43 PM, Sinan Kaya wrote: > On 4/6/2018 5:26 PM, James Hogan wrote: >> On Fri, Apr 06, 2018 at 02:15:57PM -0400, Sinan Kaya wrote: >>> On 4/5/2018 9:34 PM, Sinan Kaya wrote: Can we get these merged to 4.17? There was a consensus to fix the architectures having API viola

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-07 Thread Sinan Kaya
On 4/6/2018 5:26 PM, James Hogan wrote: > On Fri, Apr 06, 2018 at 02:15:57PM -0400, Sinan Kaya wrote: >> On 4/5/2018 9:34 PM, Sinan Kaya wrote: >>> Can we get these merged to 4.17? >>> >>> There was a consensus to fix the architectures having API violation issues. >>> https://www.mail-archive.com/

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-06 Thread James Hogan
On Fri, Apr 06, 2018 at 02:15:57PM -0400, Sinan Kaya wrote: > On 4/5/2018 9:34 PM, Sinan Kaya wrote: > > Can we get these merged to 4.17? > > > > There was a consensus to fix the architectures having API violation issues. > > https://www.mail-archive.com/netdev@vger.kernel.org/msg225971.html > >

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-06 Thread Sinan Kaya
On 4/5/2018 9:34 PM, Sinan Kaya wrote: > On 4/3/2018 8:55 AM, Sinan Kaya wrote: >> While a barrier is present in writeX() function before the register write, >> a similar barrier is missing in the readX() function after the register >> read. This could allow memory accesses following readX() to obs

Re: [PATCH v3 2/2] MIPS: io: add a barrier after register read in readX()

2018-04-05 Thread Sinan Kaya
On 4/3/2018 8:55 AM, Sinan Kaya wrote: > While a barrier is present in writeX() function before the register write, > a similar barrier is missing in the readX() function after the register > read. This could allow memory accesses following readX() to observe > stale data. > > Signed-off-by: Sinan