ANDROID: fs: 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)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
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 7125b398d312e71714d96d4ed51baeff2e149601..379b53546fe82c724f253b577656dd81dad58e56 100644 (file)
@@ -707,6 +707,12 @@ static int ramoops_parse_dt(struct platform_device *pdev,
        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 9395f06e837217f05d039eab57c39d71ae0fd9cb..10fe2e28701faad19811d1d26ef05644571aafc3 100644 (file)
@@ -80,6 +80,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