aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r--fs/pstore/ram.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index ec881b312700..2f389ce5023c 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -61,6 +61,11 @@ module_param(mem_size, ulong, 0400);
61MODULE_PARM_DESC(mem_size, 61MODULE_PARM_DESC(mem_size,
62 "size of reserved RAM used to store oops/panic logs"); 62 "size of reserved RAM used to store oops/panic logs");
63 63
64static unsigned int mem_type;
65module_param(mem_type, uint, 0600);
66MODULE_PARM_DESC(mem_type,
67 "set to 1 to try to use unbuffered memory (default 0)");
68
64static int dump_oops = 1; 69static int dump_oops = 1;
65module_param(dump_oops, int, 0600); 70module_param(dump_oops, int, 0600);
66MODULE_PARM_DESC(dump_oops, 71MODULE_PARM_DESC(dump_oops,
@@ -79,6 +84,7 @@ struct ramoops_context {
79 struct persistent_ram_zone *fprz; 84 struct persistent_ram_zone *fprz;
80 phys_addr_t phys_addr; 85 phys_addr_t phys_addr;
81 unsigned long size; 86 unsigned long size;
87 unsigned int memtype;
82 size_t record_size; 88 size_t record_size;
83 size_t console_size; 89 size_t console_size;
84 size_t ftrace_size; 90 size_t ftrace_size;
@@ -366,7 +372,8 @@ static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,
366 size_t sz = cxt->record_size; 372 size_t sz = cxt->record_size;
367 373
368 cxt->przs[i] = persistent_ram_new(*paddr, sz, 0, 374 cxt->przs[i] = persistent_ram_new(*paddr, sz, 0,
369 &cxt->ecc_info); 375 &cxt->ecc_info,
376 cxt->memtype);
370 if (IS_ERR(cxt->przs[i])) { 377 if (IS_ERR(cxt->przs[i])) {
371 err = PTR_ERR(cxt->przs[i]); 378 err = PTR_ERR(cxt->przs[i]);
372 dev_err(dev, "failed to request mem region (0x%zx@0x%llx): %d\n", 379 dev_err(dev, "failed to request mem region (0x%zx@0x%llx): %d\n",
@@ -396,7 +403,7 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
396 return -ENOMEM; 403 return -ENOMEM;
397 } 404 }
398 405
399 *prz = persistent_ram_new(*paddr, sz, sig, &cxt->ecc_info); 406 *prz = persistent_ram_new(*paddr, sz, sig, &cxt->ecc_info, cxt->memtype);
400 if (IS_ERR(*prz)) { 407 if (IS_ERR(*prz)) {
401 int err = PTR_ERR(*prz); 408 int err = PTR_ERR(*prz);
402 409
@@ -443,6 +450,7 @@ static int ramoops_probe(struct platform_device *pdev)
443 450
444 cxt->size = pdata->mem_size; 451 cxt->size = pdata->mem_size;
445 cxt->phys_addr = pdata->mem_address; 452 cxt->phys_addr = pdata->mem_address;
453 cxt->memtype = pdata->mem_type;
446 cxt->record_size = pdata->record_size; 454 cxt->record_size = pdata->record_size;
447 cxt->console_size = pdata->console_size; 455 cxt->console_size = pdata->console_size;
448 cxt->ftrace_size = pdata->ftrace_size; 456 cxt->ftrace_size = pdata->ftrace_size;
@@ -572,6 +580,7 @@ static void ramoops_register_dummy(void)
572 580
573 dummy_data->mem_size = mem_size; 581 dummy_data->mem_size = mem_size;
574 dummy_data->mem_address = mem_address; 582 dummy_data->mem_address = mem_address;
583 dummy_data->mem_type = 0;
575 dummy_data->record_size = record_size; 584 dummy_data->record_size = record_size;
576 dummy_data->console_size = ramoops_console_size; 585 dummy_data->console_size = ramoops_console_size;
577 dummy_data->ftrace_size = ramoops_ftrace_size; 586 dummy_data->ftrace_size = ramoops_ftrace_size;