All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with atomic accesses in pstore on some ARM CPUs
@ 2016-08-15 23:19 ` Guenter Roeck
  0 siblings, 0 replies; 31+ messages in thread
From: Guenter Roeck @ 2016-08-15 23:19 UTC (permalink / raw)
  To: linux-arm-kernel

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 the following crash.

[    0.912669] Bad mode in Error handler detected, code 0xbf000002 -- SError
[    0.920140] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.4.14 #389
[    0.926838] Hardware name: Google Kevin (DT)
[    0.931533] task: ffffffc0edfe0000 ti: ffffffc0edf7c000 task.ti:
ffffffc0edf 7c000
[    0.939780] PC is at __ll_sc___cmpxchg_case_mb_4+0x2c/0x5c
[    0.945811] LR is at 0x1

The "solution" for this problem in various Chrome OS releases is to
disable atomic accesses in pstore entirely, which seems to be a bit
brute-force. Question is what a proper upstream-acceptable solution
might be. Introduce another memory type to select PAGE_KERNEL ? Is
there some means to determine if atomic operations are supported with
a given protection mask, maybe ? Anything else ?

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-08-22 21:04 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15 23:19 Problem with atomic accesses in pstore on some ARM CPUs Guenter Roeck
2016-08-15 23:19 ` Guenter Roeck
2016-08-16 10:32 ` Robin Murphy
2016-08-16 10:32   ` Robin Murphy
2016-08-16 10:45   ` Will Deacon
2016-08-16 10:45     ` Will Deacon
2016-08-16 13:21     ` Guenter Roeck
2016-08-16 13:21       ` Guenter Roeck
2016-08-16 13:14   ` Guenter Roeck
2016-08-16 13:14     ` Guenter Roeck
2016-08-16 13:21     ` Will Deacon
2016-08-16 13:21       ` Will Deacon
2016-08-16 15:02       ` Guenter Roeck
2016-08-16 15:02         ` Guenter Roeck
2016-08-15 22:15         ` Mark Rutland
2016-08-15 22:15           ` Mark Rutland
2016-08-16 17:35           ` Colin Cross
2016-08-16 17:35             ` Colin Cross
2016-08-16 20:26             ` Guenter Roeck
2016-08-16 20:26               ` Guenter Roeck
2016-08-16 20:50               ` Kees Cook
2016-08-16 20:50                 ` Kees Cook
2016-08-17  0:26                 ` Guenter Roeck
2016-08-17  0:26                   ` Guenter Roeck
2016-08-18 14:02                   ` Tony Lindgren
2016-08-19  9:35             ` Russell King - ARM Linux
2016-08-19  9:35               ` Russell King - ARM Linux
2016-08-19 12:47               ` Guenter Roeck
2016-08-19 12:47                 ` Guenter Roeck
2016-08-22 21:03           ` Arnd Bergmann
2016-08-22 21:03             ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.