Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-22 Thread Arnd Bergmann
On Monday, August 15, 2016 11:15:18 PM CEST Mark Rutland wrote: > On Tue, Aug 16, 2016 at 08:02:53AM -0700, Guenter Roeck wrote: > > On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: > > > On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrote: > > >> On Tue, Aug 16, 2016 at 3:32 AM, Robi

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-19 Thread Guenter Roeck
On Fri, Aug 19, 2016 at 2:35 AM, Russell King - ARM Linux wrote: > On Tue, Aug 16, 2016 at 10:35:52AM -0700, Colin Cross wrote: >> persistent_ram uses atomic ops in uncached memory to store the start >> and end positions in the ringbuffer so that the state of the >> ringbuffer will be valid if the

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-19 Thread Russell King - ARM Linux
On Tue, Aug 16, 2016 at 10:35:52AM -0700, Colin Cross wrote: > persistent_ram uses atomic ops in uncached memory to store the start > and end positions in the ringbuffer so that the state of the > ringbuffer will be valid if the kernel crashes at any time. This was > inherited from Android's ram_c

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 1:50 PM, Kees Cook wrote: [ ... ] >>> persistent_ram uses atomic ops in uncached memory to store the start >>> and end positions in the ringbuffer so that the state of the >>> ringbuffer will be valid if the kernel crashes at any time. This was >>> inherited from Android

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 1:26 PM, Guenter Roeck wrote: > On Tue, Aug 16, 2016 at 10:35 AM, Colin Cross wrote: >> On Mon, Aug 15, 2016 at 3:15 PM, Mark Rutland wrote: >>> On Tue, Aug 16, 2016 at 08:02:53AM -0700, Guenter Roeck wrote: On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: >

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 10:35 AM, Colin Cross wrote: > On Mon, Aug 15, 2016 at 3:15 PM, Mark Rutland wrote: >> On Tue, Aug 16, 2016 at 08:02:53AM -0700, Guenter Roeck wrote: >>> On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: >>> > On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrot

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Colin Cross
On Mon, Aug 15, 2016 at 3:15 PM, Mark Rutland wrote: > On Tue, Aug 16, 2016 at 08:02:53AM -0700, Guenter Roeck wrote: >> On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: >> > On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrote: >> >> On Tue, Aug 16, 2016 at 3:32 AM, Robin Murphy >>

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Mark Rutland
On Tue, Aug 16, 2016 at 08:02:53AM -0700, Guenter Roeck wrote: > On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: > > On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrote: > >> On Tue, Aug 16, 2016 at 3:32 AM, Robin Murphy wrote: > >> > On 16/08/16 00:19, Guenter Roeck wrote: > >> >>

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 6:21 AM, Will Deacon wrote: > On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrote: >> On Tue, Aug 16, 2016 at 3:32 AM, Robin Murphy wrote: >> > On 16/08/16 00:19, Guenter Roeck wrote: >> >> we are having a problem with atomic accesses in pstore on some ARM >> >>

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 3:45 AM, Will Deacon wrote: > On Tue, Aug 16, 2016 at 11:32:04AM +0100, Robin Murphy wrote: >> On 16/08/16 00:19, Guenter Roeck wrote: >> > we are having a problem with atomic accesses in pstore on some ARM >> > CPUs (specifically rk3288 and rk3399). With those chips, atomi

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Will Deacon
On Tue, Aug 16, 2016 at 06:14:53AM -0700, Guenter Roeck wrote: > On Tue, Aug 16, 2016 at 3:32 AM, Robin Murphy wrote: > > On 16/08/16 00:19, Guenter Roeck wrote: > >> we are having a problem with atomic accesses in pstore on some ARM > >> CPUs (specifically rk3288 and rk3399). With those chips, at

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Guenter Roeck
On Tue, Aug 16, 2016 at 3:32 AM, Robin Murphy wrote: > Hi Guenter, > > On 16/08/16 00:19, Guenter Roeck wrote: >> Hi, >> >> we are having a problem with atomic accesses in pstore on some ARM >> CPUs (specifically rk3288 and rk3399). With those chips, atomic >> accesses fail with both pgprot_noncac

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Will Deacon
On Tue, Aug 16, 2016 at 11:32:04AM +0100, Robin Murphy wrote: > On 16/08/16 00:19, Guenter Roeck wrote: > > we are having a problem with atomic accesses in pstore on some ARM > > CPUs (specifically rk3288 and rk3399). With those chips, atomic > > accesses fail with both pgprot_noncached and pgprot_

Re: Problem with atomic accesses in pstore on some ARM CPUs

2016-08-16 Thread Robin Murphy
Hi Guenter, On 16/08/16 00:19, Guenter Roeck wrote: > Hi, > > we are having a problem with atomic accesses in pstore on some ARM > CPUs (specifically rk3288 and rk3399). With those chips, atomic > accesses fail with both pgprot_noncached and pgprot_writecombine > memory. Atomic accesses do work w