From: Arve Hjønnevåg Date: Sat, 3 May 2014 03:23:21 +0000 (-0700) Subject: pstore/ram: Add ramoops_console_write_buf api X-Git-Tag: firefly_0821_release~4090^2~332 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3e966cff406d9b43a16e07291a918cb2a098e32f;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 1376e5a8f0d6..058f17f0b466 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -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; diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 9974975d40db..9e370618352a 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -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