pstore/ram: Add ramoops_console_write_buf api
authorArve Hjønnevåg <arve@android.com>
Sat, 3 May 2014 03:23:21 +0000 (20:23 -0700)
committerArve Hjønnevåg <arve@android.com>
Sat, 3 May 2014 03:47:54 +0000 (20:47 -0700)
Allow writing into the ramoops console buffer.

Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47
Signed-off-by: Arve Hjønnevåg <arve@android.com>
fs/pstore/ram.c
include/linux/pstore_ram.h

index 1376e5a8f0d6c6cfa430f87ed31d36cc9af5e007..058f17f0b466aaee343cc76adc654cdd15f8d6ec 100644 (file)
@@ -377,6 +377,12 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
        return 0;
 }
 
+void notrace ramoops_console_write_buf(const char *buf, size_t size)
+{
+       struct ramoops_context *cxt = &oops_cxt;
+       persistent_ram_write(cxt->cprz, buf, size);
+}
+
 static int ramoops_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
index 9974975d40dba9ea9ba9fe5179ae9276995c7376..9e370618352a1bd86ccc6ced2d5ae3af0cc371cb 100644 (file)
@@ -67,6 +67,8 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz);
 ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
        char *str, size_t len);
 
+void ramoops_console_write_buf(const char *buf, size_t size);
+
 /*
  * Ramoops platform data
  * @mem_size   memory size for ramoops