From ea5c90a736833f0585a4d5f535777656e625d86d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Fri, 2 May 2014 20:23:21 -0700 Subject: [PATCH] ANDROID: fs: pstore: ram: Add ramoops_console_write_buf api MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Allow writing into the ramoops console buffer. Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47 Signed-off-by: Arve Hjønnevåg --- fs/pstore/ram.c | 6 ++++++ include/linux/pstore_ram.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 7125b398d312..379b53546fe8 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -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; diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 9395f06e8372..10fe2e28701f 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -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 -- 2.20.1