aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2014-05-02 20:23:21 -0700
committerAmit Pundir <amit.pundir@linaro.org>2016-01-04 13:09:13 +0530
commit66b36195be4bf3e10af781dcbc33569ca6d6ee97 (patch)
tree01ffaebc068c03c61a728aac9736781504417505
parenta237f387a5ae25bd98e3242be1c6b6ba8276d477 (diff)
pstore/ram: Add ramoops_console_write_buf api
Allow writing into the ramoops console buffer. Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47 Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--fs/pstore/ram.c6
-rw-r--r--include/linux/pstore_ram.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 319c3a60cfa5..2f4ddb8ca1eb 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -458,6 +458,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;
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h
index 9c9d6c154c8e..712757f320a4 100644
--- a/include/linux/pstore_ram.h
+++ b/include/linux/pstore_ram.h
@@ -68,6 +68,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