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

2016-08-22 Thread Arnd Bergmann
n 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 t

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
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
6: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 AR

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

2016-08-16 Thread Colin Cross
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, ato

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

2016-08-16 Thread Mark Rutland
/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_writecombine &g

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

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 an

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 an

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,

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

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. Atomi

Problem with atomic accesses in pstore on some ARM CPUs

2016-08-15 Thread Guenter Roeck
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 when selecting PAGE_KERNEL protection. Debugging on rk3399 shows