aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ramoops.txt
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2014-09-16 16:50:01 -0400
committerTony Luck <tony.luck@intel.com>2014-12-11 16:38:31 -0500
commit027bc8b08242c59e19356b4b2c189f2d849ab660 (patch)
tree4bd5ad81fef12692af2c9d278f14903d15ddfb60 /Documentation/ramoops.txt
parent7ae9cb81933515dc7db1aa3c47ef7653717e3090 (diff)
pstore-ram: Allow optional mapping with pgprot_noncached
On some ARMs the memory can be mapped pgprot_noncached() and still be working for atomic operations. As pointed out by Colin Cross <ccross@android.com>, in some cases you do want to use pgprot_noncached() if the SoC supports it to see a debug printk just before a write hanging the system. On ARMs, the atomic operations on strongly ordered memory are implementation defined. So let's provide an optional kernel parameter for configuring pgprot_noncached(), and use pgprot_writecombine() by default. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Rob Herring <robherring2@gmail.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Anton Vorontsov <anton@enomsg.org> Cc: Colin Cross <ccross@android.com> Cc: Olof Johansson <olof@lixom.net> Cc: Russell King <linux@arm.linux.org.uk> Cc: stable@vger.kernel.org Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'Documentation/ramoops.txt')
-rw-r--r--Documentation/ramoops.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/ramoops.txt b/Documentation/ramoops.txt
index 69b3cac4749d..5d8675615e59 100644
--- a/Documentation/ramoops.txt
+++ b/Documentation/ramoops.txt
@@ -14,11 +14,19 @@ survive after a restart.
14 14
151. Ramoops concepts 151. Ramoops concepts
16 16
17Ramoops uses a predefined memory area to store the dump. The start and size of 17Ramoops uses a predefined memory area to store the dump. The start and size
18the memory area are set using two variables: 18and type of the memory area are set using three variables:
19 * "mem_address" for the start 19 * "mem_address" for the start
20 * "mem_size" for the size. The memory size will be rounded down to a 20 * "mem_size" for the size. The memory size will be rounded down to a
21 power of two. 21 power of two.
22 * "mem_type" to specifiy if the memory type (default is pgprot_writecombine).
23
24Typically the default value of mem_type=0 should be used as that sets the pstore
25mapping to pgprot_writecombine. Setting mem_type=1 attempts to use
26pgprot_noncached, which only works on some platforms. This is because pstore
27depends on atomic operations. At least on ARM, pgprot_noncached causes the
28memory to be mapped strongly ordered, and atomic operations on strongly ordered
29memory are implementation defined, and won't work on many ARMs such as omaps.
22 30
23The memory area is divided into "record_size" chunks (also rounded down to 31The memory area is divided into "record_size" chunks (also rounded down to
24power of two) and each oops/panic writes a "record_size" chunk of 32power of two) and each oops/panic writes a "record_size" chunk of
@@ -55,6 +63,7 @@ Setting the ramoops parameters can be done in 2 different manners:
55static struct ramoops_platform_data ramoops_data = { 63static struct ramoops_platform_data ramoops_data = {
56 .mem_size = <...>, 64 .mem_size = <...>,
57 .mem_address = <...>, 65 .mem_address = <...>,
66 .mem_type = <...>,
58 .record_size = <...>, 67 .record_size = <...>,
59 .dump_oops = <...>, 68 .dump_oops = <...>,
60 .ecc = <...>, 69 .ecc = <...>,